Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 22:07 18 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Pi-cromite . A NOOBSys attempt

     Page 1 of 2    
Author Message
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 02:35pm 19 May 2017
Copy link to clipboard 
Print this post

Hi All,

Has anybody actually got a later version of mmbasic running on a "Pi ver 3 B"?

I must say I have little (read as NO) Linux experience but I am learning quite a bit by playing and have a friend at work who is quite good at it..

The story..

I downloaded NOOBS from the NOOBS site (cant remember the URL now) and used it to install Raspian and from there got to play with wireless and Ethernet and browsing and was quite impressed with it all..

I ran the very first release of mmbasic and all went well (yes learned some new tricks to get it running) so I thought I would play with the web server Peter wrote...

When I try to run the newer (rev 29) ./mmbasic I get a screen full of scrolling text that never ends.. The `cmd' level screen will not respond to any keys (CRT-Y etc) and Carries on scrolling.. I took a picture of this text so I can read what it was saying and it says.

Pigpio uninitialised . Call gpioIinitialise() then a long date/time format string and this scrolls over and over and never stops..

I have been in contact with Peter, who is currently travelling overseas, and he has been wonderful in his support but I still cannot get passed this stage let alone try to run the http server that I was trying to play with.

Peter gave me some commands to download and then install a later version of pigpio which seemed to do its thing (downloaded several files from the net and then installed them) this made no difference.. He also pointed me to a Pi site zxyb.xxx.xxx.xxx or something to download and install the latest and this seemed to go well, I then ran all of the tests that check that the GPIO is available to C,Python and a few other processes and every test worked OK..

Peter is convinced that I must still be running an old version of pigpio as he relies on features in the latest revision of same.

Now how can I check which version I have?
How can I update properly to the latest version if I am indeed on an old version?

I really do not want to disturb Peter on his well earned rest and I am in no real rush to get this going anyway.. It is just play time for me at the moment..

All in all I really love the Pi. But learning Linux is not intuitive to me..

Kind Regards,
Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 04:07pm 19 May 2017
Copy link to clipboard 
Print this post

Hi Mick,

I did look at it weeks back & it just ran.

Was a little confused by the command to start it & where to start it from, but only for a few minutes.

Will check when back in.

No Linux Guru here but finding the rPi port very nice to get around in for a Windows user with a bit of ancient DOS background.

Phil.

Edit:-

I use 1X on my pi, lets me access the local console session via Tight VNC from office, lounge room etc.

Will see if I can find you the right links for that; It took a few attempts to find the best option, then it was a script install with no brain input from me.


Edited by Phil23 2017-05-21
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 04:15pm 19 May 2017
Copy link to clipboard 
Print this post

  bigmik said  How can I update properly to the latest version if I am indeed on an old version?


These might help:-

https://www.raspberrypi.org/documentation/raspbian/updating.md

https://www.raspberrypi.org/documentation/raspbian/updating.md

Phil.
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 04:33pm 19 May 2017
Copy link to clipboard 
Print this post

Thanks Phil,

Did you use a 3B pi?

I will read those updating sites..

I did know a lot of "linux like" commands from using the internet (or its predecessor) in a text based mode (before GUI mode was around) .. but do you think I can remember much of it..

Yes! I agree, the Pi is a neat little box for its size and price.. (mine cost me $60AU inc postage)

Kind Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 261
Posted: 04:44pm 19 May 2017
Copy link to clipboard 
Print this post

Mick,

I'm running LINUX MMBasic Version 5.3.a23 on a PI 3B. I have not tried any of the web server stuff.

Raspian can be updated to the most recent version by typing the following from a terminal window;

sudo apt-get update

sudo apt-get upgrade

I start MMBASIC with sudo ./mmbasic per Peter's instruction.

 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 04:49pm 19 May 2017
Copy link to clipboard 
Print this post

Phil, All,

Commands Peter told me to do are as follows:

Sudo apt-get update
Sudo apt-get install pigpio

They both seemed to work well with no failures or errors.

I also went to http://abyz.co.uk/rpi/pigpio/download.html

I applied the steps (one at a time) in Method 1

rm pigpio.zip
sudo rm -rf PIGPIO
wget abyz.co.uk/rpi/pigpio/pigpio.zip
unzip pigpio.zip
cd PIGPIO
make
sudo make install

Then tested the libs

sudo ./x_pigpio # check C I/F

sudo pigpiod # start daemon

./x_pigpiod_if2 # check C I/F to daemon
./x_pigpio.py # check Python I/F to daemon
./x_pigs # check pigs I/F to daemon
./x_pipe # check pipe I/F to daemon


All tests passed..

I am confused here.. but I am sure Peter is right that for some reason my pigpio is old..

Kind Regards,

Mick

Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 04:59pm 19 May 2017
Copy link to clipboard 
Print this post

Hi All,

  cdeagle said  
sudo apt-get update

sudo apt-get upgrade

I start MMBASIC with sudo ./mmbasic per Peter's instruction.



Hi David,

Ok the second command you posted there is different from what I tried..

Also I didnt run mmbasic with sudo in front I just ran it by

./mmbasic

I will test it out and let you know how I go.

Kind Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 05:59pm 19 May 2017
Copy link to clipboard 
Print this post

  Quote  Also I didnt run mmbasic with sudo in front I just ran it by

./mmbasic


You definitely have to use sudo. I don't understand why any of the versions would have worked if you weren't.

The only other possibility is that the latest version of pigpio is V64 whereas I think I am compiling against V61. I'll update when I get home
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5923
Posted: 08:09pm 19 May 2017
Copy link to clipboard 
Print this post

Mick,
welcome to the strange world of Linux

get used to 'sudo'

Also, when things go horribly wrong, there is no shame in using the tried and true 'turn it off and back on again'
Works as well for Linux as it does for Windows.

I am currently away from my RPi as well so not direct help except to confirm that mmbasic does work on your setup.

As an aside, arriving in Copenhagen on the first sunny period if the year is interesting.
I think Copenhagen girls spend the winter making their new cloths but forget to take into account the fact that their legs grew 100mm over winter.
The city is full of the locals soaking up the sun and rapidly turning lobster coloured.

Oh well, off on another lesson in how to avoid getting run over by a long legged lobster on a bicycle.

mmbasic can wait for some other time...

Jim
VK7JH
MMedit   MMBasic Help
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3678
Posted: 08:46pm 19 May 2017
Copy link to clipboard 
Print this post

Mick,

If you used apt-get install (or upgrade etc) and also downloaded the zip then you may well have two copies installed. (As in: you are almost certain to have two.)

I was under the impression that each copy would be OK and should work, but let's try to get rid of either (or both then start over).

The apt-get one should be removed using apt (so it cleans up properly). It's a bit weird that you can use apt-get (spot its name) to remove things but there it is:
sudo apt-get remove whatever
you can also
sudo apt-get purge whatever
(the difference as the man page says is that the config file goes as well)
I'm not sure whether
sudo apt-get remove --purge whatever
is any use.

The one you unzipped can be removed using rm along the lines already posted so long as you're in the right directory (aka folder) (same idea as in DOS).

If you ever need to find a file (like pigpio) there's the
locate
command. It uses a data file that's periodically updated if your system is left on (a cron job) so can mislead but is very useful on occasion. You could try it before doing the removal but it will mislead if you use it again after as its data file will not have changed. (The better way is to use
find
but it is slower due to traversing the file system(s).)

You can drop the sudo if you're already the super user (aka root). (Not a great idea being root all the time because a badly type command can cause havoc, but it's a worry for another time. By way of example rm -rf x * when you meant rm -rf x* would be bad news.)

JohnEdited by JohnS 2017-05-21
 
RonnS
Senior Member

Joined: 16/07/2015
Location: Germany
Posts: 120
Posted: 10:54pm 19 May 2017
Copy link to clipboard 
Print this post

hi Mick,
try mmbasic V a31 i have had the same effect at earlier version


Ron

 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 12:24am 20 May 2017
Copy link to clipboard 
Print this post

  TassyJim said   I think Copenhagen girls spend the winter making their new cloths but forget to take into account the fact that their legs grew 100mm over winter.
The city is full of the locals soaking up the sun and rapidly turning lobster coloured.

Oh well, off on another lesson in how to avoid getting run over by a long legged lobster on a bicycle. Jim


Say hello to Mary from Tas. for us Jim - and ah.. you could do a lot worse than being run over by one of those!

Greg
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 02:13am 20 May 2017
Copy link to clipboard 
Print this post

Hi all,

Been out all afternoon and just saw the comments.. Thank you all.

Ok I tried using sudo ./mmbasic and it worked on ver 29. But when I loaded the HTML server file I got a comm error (I think com2) so I tried the ver 31 this time I just got returned immediately to the Pi prompt and mmbasic did not run. No sign on mesg not mmbasic prompt.. I went back to ver 29 and same thing..

I think I have cocked every thing up so tomorrow armed with all this information I now have I will try again..
This time i will start with a new clean install using NOOBS ... I am sure I would have by now updated ??? 6 or so times so if they do not overwrite, as John seems to suggest, then I may have many copies floating around the Pi memory banks..

Stay tuned...

Regards,

Mick


Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3678
Posted: 02:31am 20 May 2017
Copy link to clipboard 
Print this post

Multiple uses of unzip will overwrite.

Multiple uses of apt-get are pointless (and do nothing) unless there's a newer version.

Using both is asking for trouble for a newbie. You start needing to care which is used and when, etc. Linux is happy to let you and you can choose which, when etc but do you want to run before walking...

No problem if you do :)

It's akin to the old days of Windows and multiple copies of the same-named DLL (*), but Linux manages it better - if you get your head around it.

(*) as I recall it was known as DLL-hell

JohnEdited by JohnS 2017-05-21
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 08:55am 20 May 2017
Copy link to clipboard 
Print this post

I myself think in Linux it is more that you have to crawl before you can walk. :)

I find the whole MMBasic on the Pi both very interesting and terrible at the same time. I feel Linux is just in the way and could totally be unnecessary if it was possible to write/compile for the barebones of it.

If MMBasic really wants a chance to work good on a Pi (for Linux newbies) it is maybe time for a specific MMBasic distribution, with all the parts needed to get it running in a single 'image'.
Then when questions arise everyone has the same situation and solutions can be shared. Every question should not have to conatin, which distribution, version of this version of that and version of MMBasic. It should be only which version of MMBasic.

With different distributions, versions etc it gets a mess very quickly.
And once it is a mess, you need to 'run' instead of 'walk' with Linux to get things fixed within a reasonable time. Still most of us 'crawl' so it is a long way.

Would it not be a good idea if one of the Linux Gurus made a special distribution so that it can be maintained easily. A common distribution is i think essential.


Microblocks. Build with logic.
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 09:22pm 20 May 2017
Copy link to clipboard 
Print this post

Hooray,

I have got it all working ... well Almost.

I do not know what I did but I must have really stuffed up the debian code somehow

I did a clean install using NOOBS and then I did not try updating anything, I just went into mmbasic 5.3a31 and this time it loaded fine.

I ran the webserver and (this is what doesnt quite work) and cant get it to work (mostly I get a spinning blue wheel in firefox when I try to access my pi from my PC)

But I do know some things are working if I go: (10.0.0.50 is my pi on my network)

10.0.0.50/favicon.ico I get a tiny picture of a raspberry in the centre of firefox and it appears in the left hand corner of the TAB.. So I know it is doing something.

The Pi terminal displays the command it receives as GET /favicon.ico so I am happy...

I just cannot get the web server to display as it should..

Over all I am now very happy I can drive my Pi using RealVNC and not need to switch from HDMI-DVI on my monitor (and swap kb/mouse) and can drive all from my PC..

Anyway I will let this all sit for a while until a new release of the webserver is available as I am sure will come in time... Now I can play with my Pi and see what else I can do to make it unhappy..

@PeterM,

The version of mmbasic that you first released in the INTRODUCTION thread did run without the SUDO command in front so that confused me as I never used sudo for the latter versions but I was getting issues even after realising that but the clean install cured that headache..

Enjoy your maple syrup sandwiches..

Kind Regards,

Mick


Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3027
Posted: 02:50am 21 May 2017
Copy link to clipboard 
Print this post

Can you explain about RealVNC?

I have failed to get my Pi-0W to run headless over wifi by editing the SD card in Linux (which I have succeeded with before with LAN-type connections), and my PS2 keyboard to PS2->USB adapter to USB OTG cable doesn't work, so I can't type, though I can see that the Pi gets to the login prompt.

Will RealVNC allow me to short-circuit my problems, or does the Pi need its wifi connection first?

Lance




PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 04:08am 21 May 2017
Copy link to clipboard 
Print this post

Hi Lance,

Strange me now offering advice... Take with a pinch of salt.

I am using VNC over the Ethernet port, however you need to first enable it as follows:

Click the raspberry icon
Preferences
Raspberry Pi configuration
Interfaces
and check the box for VNC (I enabled everything)

Then with RealVNC Viewer on your PC use the ip of your Pi with a :5900 appended as the connection.. In my case it is 10.0.0.50:5900

Then it will ask for your username/password (after a query do you want to connect blah blah blah)

Note the default config is

pi and raspberry for user/pass (case sensitive)

Then I can control my pi via a VNC window on my PC..

Hope that helps.

Kind Regards,

Mick


Edited by bigmik 2017-05-22
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 05:31am 21 May 2017
Copy link to clipboard 
Print this post

  Quote  until a new release of the webserver is available


The webserver application has been tested on Edge and Chrome. The MMBasic webserver functionality just creates a socket and various HTTP headers and fills in pages with variable information - the application is responsible for the interaction with the browser. There are no updates due which would affect use with Firefox. You will need to understand why Firefox isn't displaying received data the same as other browsers and change the demo application. This is unlikely to be related to the MMBasic server support unless there is something in the constructed HTTP headers.
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 06:36am 21 May 2017
Copy link to clipboard 
Print this post

Could the routing be a problem. then 10.0.0.x address is not often used while testing. Maybe try a 192.168.0.x address and see if that works.
If your router is configured wrong it is possible traffic goes out on the net instead of the internal network.

Microblocks. Build with logic.
 
     Page 1 of 2    
Print this page
© JAQ Software 2024