Running BananaPI M2 Zero

:zany_face: Ok, ok… I get it. I still instinctively confuse piaware and FA. I meant it exactly as you wrote it, I just couldn’t express it correctly.

Ahhh. If I use it on command line I try to start a 2nd instance instead of adding/changing any parameter. So I haven’t to wonder :smirking_face:
So best is to edit the config file add/change commands/values and restart the service? Hope so…

:rofl:

 

 

3 Likes

Just as it says in the readme.
https://github.com/wiedehopf/adsb-scripts/wiki/Automatic-installation-for-readsb

…I’m glad I was able to amuse and entertain you a little :innocent:
But seriously: I get it now. :shushing_face:

@wiedehopf
Yes, you’re right. I probably misinterpreted something due to my lack of English skills.
What I couldn’t figure out, despite all my efforts, is how to enter the sections. That’s nowhere declared in the linked wiki.
In readsb, the four lines that exist so far always begin with “yx_OPTIONS=”. In the help file (readsb --help), the headline of the 1st block is “General options.” However, entries from this can already be found in, for example, “DECODE_OPTIONS”; there is no “GENERAL_OPTIONS” option group in readsb by default.
Is this just for clarity? Do these groups, or rather their names, play no role in readsb and can therefore be named as desired?
Before I lay my hand on it, I’d rather ask…

Another discrepancy:
For example, “readdb --help” says --lat=<lat> Reference/receiver surface latitude.
The definition is therefore
--parameter=value
But in readdb, this is consistently specified as
--parameter value

Is both valid here, i.e., with either an equals sign or a space?

The = vs no = you can just try.
So there is no need to ask.

As for the other stuff, just understand:
/lib/systemd/system/readsb.service

Or as before just change something and see what happens.

The journalctl command from the readme will show you the command line on startup.
Or you can use pgrep -a readsb

Ok… Why simple when you can do it complicated :roll_eyes:
Apparently, I’m getting on your nerves; it’s been understood, and the matter will be remedied immediately.

/lib/systemd/system/readsb.service

Typing how it works is just much longer than pointing to this file.
Plus you can figure out exactly how the various variables in the config file work.

EnvironmentFile=/etc/default/readsb
ExecStart=/usr/bin/readsb \
 $RECEIVER_OPTIONS $DECODER_OPTIONS $NET_OPTIONS $JSON_OPTIONS \
 --write-json /run/readsb --quiet

My answer above gives you tools to figure out stuff.
If i just say it doesn’t matter if you use space or equal, you will repeat asking about things which can be tested very easily. It will not apply to other programs where = might not work.

If you’re curious about the raw data, try this command but replace the ICAO address / hex with a plane that is currently being received.

viewadsb --show-only 780A3E

You’ll probably need to Ctrl-C to stop it and then read some of the data.
There is also --filter-DF=17 you can add to only show a specific type.

https://mode-s.org/1090mhz/

Now i’ll see myself out.

You’re simply making false assumptions and assuming that others/I are just as good programmers as you; but we/I aren’t.

But let’s leave that aside…

Just to conclude; probably just because I have no idea again…

The --write-prom parameter, for example, set to /run/readsb generates an access error.

May 05 20:37:05 SV-ADS-B readsb[540]: writeJsonTo open(): /run/readsb.readsb_tmp: Permission denied

In my completely irrelevant, idiotic opinion, in this case, it should be /run/readsb/readsb_tmp and not /run/readsb.readsb_tmp.

But I’m sure I just don’t understand it again, and you’ve probably already figured out why there’s a period instead of a slash.

/run/readsb is a folder, --write-prom needs a filename as a parameter.

It’s in /run/readsb/stats.prom by default anyhow if --write-json points at that folder.
So you don’t really need that parameter.

I actually don’t know what it’s for. I only came across it because I was trying to generate as much write activity on the SD card as possible with readsb using the options parameters.
I missed the fact that, unlike all the others, a filename is required here.
Ultimately, I want to move everything that readsb writes to or reads from the SD card to an external drive (Samba share) to ensure the SD card has the longest possible lifespan. Because if it’s stuck in the mast with ZERO under the antenna, you won’t be able to access it easily…

/run is a tmpfs.
A default install of readsb will not write to the sd-card at all.

If you can run coax to the base of the mast, i’d highly recommend that instead.
Makes maintenance way easier.

But if you’re doing custom stuff …
https://github.com/wiedehopf/adsb-wiki/wiki/diagnose-disk-usage-IO-inotify-IOPS
This can help you to track down what is writing to disk.

graphs1090 by default is very disk friendly as well, even makes /var/cache/fontconfig a tmpfs to avoid frequent writes to that.
Only writes to disk every 24h.

1 Like

So that interested readers don’t have to wade through the entire thread, here’s a final summary:

  • Basic idea:
    Mount the SDR (here: FlightAware Stick Pro Plus) directly on/under the DIY antenna, including the minicomputer, directly in the mast. This eliminates cable losses and any necessary preamplifiers for long antenna leads.

  • Requirements:
    The minicomputer must fit inside the mast. Therefore, only systems such as a Raspberry Zero and similarly slim derivatives are suitable.

  • Attempt #1:
    For price and performance reasons, the first minicomputer was a BananaPI M2 Zero.
    Ultimately operated with DietPI (I can now highly recommend it. All subsequent attempts are based on DietPI), it turned out that the BananaPI had a hardware problem with the USB interfaces. With two brand new BananaPI M2 Zeros, it was impossible to get the SDR to work! Other operating systems also produced the same result.

  • Attempt #2:
    A RaspBerry PI ZERO 2 was used as the second minicomputer. This one worked right away.

  • Attempt #3
    Another candidate is a RADXA ZERO 3W or 3E with a PoE HAT (Radxa). These also worked right away with DietPI and the SDR. Another advantage is the high performance of these clones, which were previously unknown to me. The CPU (Rockchip RK3566) runs at up to 1.8GHz and can also be overclocked to 2GHz (with appropriate cooling, of course); however, this is completely unnecessary here.
    And another advantage that appeals to me is the ability to add a USB port to the header by re-soldering a few resistors. This eliminates the hassle and wasted space with angled USB-C connectors and potentially loose connections.
    The clone also has an onboard eMMC. However, I haven’t yet figured out how to use it effectively with DietPI.

One final word/image on load:
Readsb is installed with additional options set, tar1090, Graph, TimeLaps, Samba, and NetData.
Despite all of this, the CPU runs at an average of 1.4GHz and an average load of 15%.

What software are you using to get this please?

  • netdata -
    You can also use this to monitor any number of computer systems in one place and set individual alarms.
    Open Source | Netdata

many thanks, that looks really useful

DW

… not for that; you’re welcome :clinking_beer_mugs:

Okay, I have one more question:

Why does the /run/readsb directory, which is set for various things in /etc/default/readsb, disappear as soon as the service is stopped?
I don’t understand the point of this…

Believe that was covered. The idea is use ram for tmpfs - temp file system
No SD killing.

Sorry, but that wasn’t my question…
Firstly, /run/… was only given as an example and has nothing to do with the core question. Secondly, it doesn’t answer the question of why the folder created at runtime is deleted when the service is stopped.

That’s not quite right. Even in a default installation, /run/readsb is created and used at least from the readsb.service

And apart from readsb, a lot of writing is done to the SD card, especially when using Timelapse.

The idea is essentially to offload all necessary and additional write operations to a network share. This, of course, also applies to the temporary files from the service call itself: --write-json /run/readsb --quiet
But since the service deletes this folder when it exits, it simply doesn’t work; the service on the PI has no rights to delete a share on the NAS…

Due to a lack of knowledge and terminology, I may have expressed myself a bit convolutedly or stupidly, but with your knowledge, it should be easy to understand what I’m getting at… If you want to…

I wrote before that /run is a tmpfs.
That means it is not on disk.

Why would the folder persist without the service?
It’s files that are updated constantly, they are out of date when the service isn’t running.