I’m a tragic for RISC based devices to run a NIX, whether it be GNU/Linux, a BSD derivative, or the likes of MacOS (100% POSIX compliant, and licensed “UNIX”) on Apple Silicon…
Got an email alert today that the new Pi 5 was available - from my favourite Aussie outlet - Core Electronics in The Hunter Valley NSW - but they’re now fresh out of them again… So took a look at the Aussie Pi store - and when I started looking they still had Pi5 4GB model - but within 15-30 minutes all of them were gone too!
MAN! I waited 4-5 months to get my 2nd Pi Zero 2 W…
I inherited 5 pi computers from a friend who sadly died 18 months back he bought them from new with the idea of creating something but he never did, they sat on my workshop bench for a year untouched, so passed them on to my step son who promised to finish connecting them and get them running a television system. Server. And a robot. They are still sat on his workbench untouched. They were pi 1, 2, and 3. Complete with boxes, robot, usb and cards with raspberry on, small screens and more LEDs than I have seen in a long time.
Wanted to get excited by them but failed… So question
What are you going to do with the new model when it finally is available?
Probably run a desktop on it via my Nextdock - probably Kali… compare its performance to my 3 x Pi4 machines…
1 Pi4 (4 GB model) runs Ubuntu 22.04 server “headless” mode… doesn’t do much but allow me to SSH (on a non standard port, and running fail2ban) - but it used to run OpenVPN servers and PiHole (don’t use either any more, my router has OpenVPN and I don’t need PiHole now I’m using Brave).
I have 2 x Pi3B (one is idle - main one runs TVHeadend with a TV tuner “hat” on the Pi “pins”).
I have 2 Pi Zero 2W - one is a “gadget” - storage and other stuff, one is the computer for my Beepy (formerly called BeepBerry).
I have 3 x Pi Zero W - not currently using them… shelved project - also have a USB “A” adaptor so I can make the Pi Zero look like a USB thumb drive…
I also have my trusty reliable Orange Pi 2E+ running Armbian 16 (i.e. headless Ubuntu 16 - yeah I know it’s end of life - I DON’T CARE!) - it’s got 394 days of uptime and pretty much ALL it does is manage my torrents via transmission-daemon (it saves them to my NAS over NFS).
In our village we have a guy who reads the water meter to see how much we use for the pool, gardens and how much is just lost due to leaks. Yes the water Company do the same from a distance and each home has its own water meter. They calculate that what is not used by each household on total is what we use in general and then charge the village based on a calculation I cannot follow if it’s pool garden or lost.
The water meter is about 2 metres below ground and is read electronically by a technician as he drives by.
Our guy was climbing down to read it but then discovered it could be done electronically using a pi with radio receiver, he downloaded a software tool from GitHub and using his pi, connected through windows he wants to get the reading. He tells me it’s a compiled program in C but each time he tries to compile it fails…
Being the in house computer guy he said make it work, I have yet to see it or the interface, or why he uses windows with Linux in a command windows. No idea why he has done this and not running pi Linux on the board.
He tells me it’s a pi zero
Any pointers to look for or suggestions. Before he drops round
Intelligent questions I can ask him
Btw water is an extremely expensive product here as we have not had any rain for over a year, we have a ban in place for watering the garden or washing the car. Pools could only open under restrictions and showers must be less that 2 mins. (I did offer to police the showers and watch or time them but it was rejected) the water table below us has never been as low.
Our electricity company has meters with a mobile phone built into them. Every 3 months it makes a call and sends the readings to the company. We no longer have meter readers.
Our water meter is still read by hand, but it is above ground.
If it is a C program, you should be able to compile it in Linux .
The use of windows may be to get drivers for the radio receiver.
How does the water meter get power? If it sends a radio message it must have power?
Our water is mains water arrival by pipe, but the reading is local as the water loss from the main supply to the meter is considerable
Yes they read at a distance and yes it’s a form of transmission not sure at this stage by what except mobile device
Yes the water company supply a reading each month of consumption
Here lies the problem, we discovered it was not correct the reading they supplied. The water company were sent back to investigate, they discovered that of the 100 or so homes, some measured zero use, others were over using compared to others with no reason, water loss was great, we were paying one rate where it should have been 3, pool, homes and gardens rate different, the effect on that was waste water charges are based on use different.
It has got complex to explain and the water company are on site many days measuring and testing.
Our guy wants to walk behind them and do the same readings to confirm or deny.
We did a similar thing in another part of the village and obtained a massive reduction, but these were manual meters and above ground so easy to check.
I am waiting to see the equipment for confirmation of what is used and why, our guy is a electronics engineer so radio part is down to him it’s the computer bit they look to me
Been a while since I posted this but finally met with the water guy and looked at his home built kit.
He has a pi zero connected via a set of cables to a external card which reads the frequency of the meter I think he said 2600 Hz.
He access the pi via windows in a terminal mode using vertical mode in that he can see the raspberry pi zero and using command line can access directories on the pi no problem change directories, list files and do everything as normal without a graphical screen.
He downloaded a software tool from git hub, updated the pi system and the. Compiled the program creating a ,Linux program, this he can see in the directory structure. It’s green in colour not sure that makes a difference. Everything appears to run fine… . But when he tries to run the program it fails and the bash says not found.
I ran through the process and can see no error but I am at the limit of my knowledge on bash and Linux programming.
Any help much appreciated
The git hub link is
Where (ie which directory) is the program installed?
Is that directory in the user’s PATH?
Use echo $PATH to see what the users path is
If it is not in the users PATH , run the program using the full
pathname, or add its directory to PATH.
ksh is a shell, not a compiler. It is an alternative to bash.
Does the program require ksh? ksh may not be installed, most Linuxes use bash by default. Maybe it is ksh that is not found?
Maybe the program is just a shell script which runs under ksh?
We need to determine exactly what it is that cant be found.
Sorry error on my part
GCC is the compiler
That worked fine and gave the same results as the screen said it would
Yes I was in the right folder
Even tried going directly into the folder and changing commands to suit
Still not correct
Forgot to say the sites are in french but it’s easy to read or translate and the code is English anyway
No that is not make… you are using gcc directly… that is OK
So you successfully make the binary… it is called radian_tryx, you can find it and execute it , and it says
Bash not found
That is weird?
I assume you have bash installed, it is in nearly every linux.
We have to find out what radian_tryx is doing.
look at the source code radian_tryx.c
ldd home/pi/conoEAU/radian_trx that will list all the libraries it calls dynamically
strace radian_tryx that will list all the system calls it makes while running… you might need to install strace
I am still mystified… why would it be needing bash? It is a C program… the shell it runs in is the shell your terminal is in when you say radian_tryx to execute it… it should not need another instance of bash.?
Is there anything else other than the compiled radian_tryx that ii needs when it executes?
How did you get it from that Github site? Are there other things that should be present? I cant read the French.
I googled bash not found
and got this
There may be something wrong with your PATH variable, for example it may contain a directory which does not exist.
We need to see what echo $PATH gives.
The message may not mean that bash could not be found, it might mean that bash could not find something.
Typical ambiguous error message
I am on my way to Fuerteventura fir a holiday next 3 weeks. But plan to copy your ideas to our water guy and when he replies will copy it back to you.
We did the download using FileZilla and I did it again just in case he missed something.
Thanks for the help
I’d HATE to have to try compiling anything on a single core Pi Zero… bad enough on a Pi3 or Pi4 with 4 cores…
If I had to do it often, I’d probably try and setup a cross-compiler environment, so on my Linux desktop machine, with 4, or 8 or more cores, I could compile a native binary, and armhf, armel, arm7l or whatever…
Pi Zero 2W is completely different to the old Pi Zero, i.e. still credit card sized form factor, all the connectors in same place, but has 4 cores, which can do arm64/aarch64 (note I’m still running 32 bit [arm7l / armhf] on both my Pi Zero 2W boards).
And here’s the confusion (for me anyway) - the old PiZero need armel, and/or arm7l and/or armhf.
e.g. everywhere I ran ResilioSync, it just worked, native binaries - EXCEPT on the Pi Zero - I could install it - but the armhf binaries would crash - so I managed to find armel binary, and run it manually (i.e. outside of systemd). I don’t know if that was Resilio Sync not compiling properly, or that version of Raspbian for the Pi Zero (Raspbian=Debian for arm, I think it was Stretch or Bullseye)…
Ok my french water guy tried the recompile and got
J’ai recommencé à zéro la compilation
J’ai rentré cette exactement cette commande : ./radian_trx
le résultat est :
pi@raspberrypi:~/consoEAU $ ./radian_trx
Unable to open SPI device: No such file or directory
Le SPI est activé dans sudo raspi-config
Voilà les news
./radian_trx n’est pas la même chose que radian_trx
La couleur verte du nom veut dire Exécutable ou un fichier de données reconnues par le système
Basically I think the source code is wrong with the paths it uses.
Perhaps time to go back to the original writer and ask them.