Page 1 of 1

Pi Zero W hangs during Mono install-Why?

Posted: Sat 15 Feb 2020 10:31 am
by Dublin-Bay-Prawn
I'm new 'ish to Pi's

I am intending to run Cumulus on a Pi Zero W to display the data from my Fine Offset (Maplin WH 1080).

I am following the post "Instructions: Installing CumulusMX on Raspberry Pi"

During the section

Code: Select all

sudo apt install apt-transport-https dirmngr gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/debian stable-raspbianbuster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt-get update && sudo apt-get upgrade 
sudo apt-get install mono-complete
sudo apt autoremove
the pi hangs!

When I try again it says "dpkg was interrupted, you must run 'sudo dpkg --configure -a' to correct"

then the same happens......

Any ideas?

Re: Pi Zero W hangs during Mono install-Why?

Posted: Sat 15 Feb 2020 8:15 pm
by HansR
So assuming you can reboot and return to the command prompt as root you could try the commands one by one and see at which command it hangs?

I use the following sequence to upgrade my system regularly:

Code: Select all

apt-get update
apt-get dist-upgrade
apt-get clean

apt-get purge libmono* cli-common mono-runtime
apt-get autoremove

apt install apt-transport-https dirmngr gnupg ca-certificates
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/debian stable-raspbianbuster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
apt update
apt-get update && sudo apt-get upgrade 
apt-get install mono-complete
apt autoremove
Especially the lines which purge mono may be of use: they give a clean start for a new mono install.

If this is not working, I would say reinstall Raspian from scratch and run my update script. Should do the job (though never tried on a Zero yet ;) ).

Re: Pi Zero W hangs during Mono install-Why?

Posted: Sat 15 Feb 2020 8:23 pm
by mcrossley
Mono also takes a looong time to install on a pi zero. I am running one as a test platform, and I think it is only just up to the task of running Cumulus. One of the big problems is the single CPU so multitasking takes a hit if any lengthy process is going on.

For instance my pi 3b opens the records editor monthly files in around 6 secs, the pi zero takes 80 seconds!

Re: Pi Zero W hangs during Mono install-Why?

Posted: Sat 15 Feb 2020 8:45 pm
by HansR
Ah, impatience iso hanging. Yes.

Soon I'll try the zero with some other sensors to see if I can read those with a c# / mono config. I'll see how that goes.

If the sensors from China are an omen it may be more than extremely slow: 6 six weeks and they have just been sent with at least 4 weeks under way... But that's another story. Never again.

Re: Pi Zero W hangs during Mono install-Why?

Posted: Sun 16 Feb 2020 2:22 pm
by Dublin-Bay-Prawn
Well, things have moved on.....

Previously, when I executed the line "sudo apt-get install mono-complete" the pi would hang after a few minutes (the clock seconds would stop)

But, id I did "mono --version" I got an answer:

Image

And Cumulus runs :D :D
pi@CumulusPi:~/CumulusMX $ sudo mono CumulusMX.exe
Current culture: English (United States)
Serial: E0090FE69F20A66972345301DE3D4EA8
Cumulus MX v.3.3.0 build 3063
Today.ini = data/today.ini
Last update=2020-02-16T13:40:00
Looking for Fine Offset station
Fine Offset station found
Connected to station
Cumulus running at: http://*:8998/
(Replace * with any IP address on this machine, or localhost)
2/16/2020 1:48:18 PM
Type Ctrl-C to terminate
Downloading Archive Data
Normal running
but I am not getting data to the dashboard.....I'll leave it for a while in case it needs time....

Thanks for your help so far

Re: Pi Zero W hangs during Mono install-Why?

Posted: Sun 16 Feb 2020 2:42 pm
by water01
Running a browser on a Pi Zero as well as CumulusMX etc. would probably be the problem

On another computer on your network enter http://Pi Zero IP address:8998/ and I would have thought that would work.

Re: Pi Zero W hangs during Mono install-Why?

Posted: Mon 17 Feb 2020 9:28 am
by Dublin-Bay-Prawn
Sorry, to clarify I was conneccting to the Cumulus Pi Zero from a PC on the local network.

Originally I only had power and a USB direct from the Fine Offset (Maplin) weather station. This did not work

If I added a powered USB hub then it worked! So it must be something to do with power required to carry the signals.

So, I resorted to the PI 2 that I had been using for Weewx and all connections seem to work fine. I am now learning how Cumulus works so there will probably be further questions :roll: :roll:

The first is:

On the remote dashboard, after a few minutes the dashboard window greys out and a pop up says "connection is closed". Why is this? Is it the fault of the Firefox browser on the PC, the Pi feeding the data screen or the something in between?

Re: Pi Zero W hangs during Mono install-Why?

Posted: Mon 17 Feb 2020 10:37 am
by HansR
@Dublin-Bay-Prawn:
Back to your first message. I received my own Zero the same day as your message arrived, so I investigated.
I installed 'Buster Lite' and ran the apt commands to install mono.

My conclusion is that @mcrossley is right: it was not a real 'hang', it was impatience. As you install mono-complete the procedure pre-compiles the compilers for all languages and that takes a lot of time using a lot of memory and swapping a lot. That takes time. I let it run for more than 30 minutes (did not time it precisely) and it finished fine. The fact that it works for you is probably because you broke of the installation/creation of mono at the last phase where the runtime had already been finished. So from a user point of view everything was fine.

In future "sudo apt-get install mono-runtime" should be enough if you are not doing other spectacular things.

Re: Pi Zero W hangs during Mono install-Why?

Posted: Mon 17 Feb 2020 1:52 pm
by Dublin-Bay-Prawn
HansR.......are you running CumulusMX on your Pi zero?

If so, with what weather station, and is it performing correctly?

Re: Pi Zero W hangs during Mono install-Why?

Posted: Mon 17 Feb 2020 3:53 pm
by HansR
Dublin-Bay-Prawn wrote: Mon 17 Feb 2020 1:52 pm HansR.......are you running CumulusMX on your Pi zero?

If so, with what weather station, and is it performing correctly?
No, sorry, I don't (see my signature). But I configured the Zero W as if I would/could (Buster/Mono).

To be honest, seeing the performance of the Zero I would say it can handle CumulusMX well if you don't add to many other things to it.
Configuring it on a RPi 3 o r 4 would make life easier in the config phase. Simply transfer the SD card to the zero after configuration and it runs well.

If you have a specific problem or question related to the Zero and the Davis Vantage Pro, I might give it a test run. But I don't think I can solve your network issue.