Archive for the ‘Linux’ Category.

adsbox, dump1090 piaware flightaware flightradar24 and IPv6

Recently I switched by flight tracker Bananapi M2 Zero with RTLSDR from adsbox (port 7070) to dump1090 (port 8080). But then, the IPv6 official address does not open the web site any more, although I switched the port forarding from 7070 to 8080 on the router.

After some digging and tests, I found that lighttpd, that was used as web server by dump1090-fa (fligh-warae variant), does not default to use IPv6 too. I had to change the dump1090-fa extension for lighttpd to:


...# Listen on port 8080 and serve the map there, too.
$SERVER["socket"] == ":8080" {
  server.use-ipv6 = "enable"
  alias.url += (
    "/data/" => "/run/dump1090-fa/",
    "/" => "/usr/share/dump1090-fa/html/"

Now,  netstat -tulpn did show that port 80 and 8080 are open for ipv4 and ipv6

tcp        0      0    *               LISTEN      -                   
tcp6       0      0 :::8080                 :::*                    LISTEN      -

Just to remember.

Openvpn server an Deutsche Glasfaser IPv6 only Router und

OpenVPN auf BananaPi M2 Zero W mit Raspbian

Deutsche Glasfaser Genexis Router in Verbindung mit zur Umsetzung ipv4 nach ipv6

Ich versuche hier meine Installation basierend auf den nachfolgenden Quellen zusammenzufassen.

Quellen: und

Nachfolgend sind persönliche Angaben in < und > gesetzt. IP Addressen sind in der Form durch x ersetzt. Universal Portmapper einrichten

Über die öffentliche IP6 Adresse des Servers (VPN Gateway) ermitteln. Portmapper

Bei habe ich eine Port Weiterleitung auf die öffentliche IPv6 Addresse des BananaPi (dem OpenVPN Server) und den Port 443 unter “Universelle Portmapper” angelegt.

Ich habe hier den Port 443 gewählt da dieser auch in vielen Fremdnetzen (zb Mobilfunk Netze) funktioniert. Der Standard VPN Port 1194 ist möglicherweise in dem einen oder anderen Netz gesperrt.

Ich habe einen Alias gewählt den ich mir leichter merken kann als den DNS-Namen. Ausserdem laufen auf demselben BananaPi M2 Zero W noch drei weitere Dienste. Diese sind über den gleichen Alias unter drei anderen Ports erreichbar.

In der Client.conf muss später der Alias Name und der gemapte Port angegeben werden, da die Verbindung nicht über IPv6 und Port 443 hergestellt wird. Siehe client.con Zeile:

remote <aliasname> <auf 443 umgeleiterter port>

Openvpn Server einrichten

Continue reading ‘Openvpn server an Deutsche Glasfaser IPv6 only Router und’ »

adsbox adsb receiver antenna rtlsdr gain

As adsbox did take too much CPU from my main server I moved adsbox to a banana pi zero w. Running Raspbian adsbox used about 200% of the 4 cores and 10% of the 512 MB headless system. That was OK for me and I wanted to extend the range of my rtlsdr antenne. I moved the antenna out side and was impressed about the exended range but nearby aircrafts did not show any more 🙁

As I want to see the nearby aircrafts, we are near düsseldorf in the landing lines and wanted the data of the aircrafts crossing the small home village 30km away from the DUS airport.

adsbox missed too much data or the rtlsdr dongle received too much signals. First I changed the adsbox call to use 4 threads for adsb decoding. That did not help.

Then I looked for the gain values to lower the reception signal strength. My rtlsdr RTL8232u supports gain values (found with rtl_test):

#Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6

I first started with 0.0 and got better nearby results but only a range of about 5km. Using 25.8 gives a range of 120km but too much airplanes (~39) and nearby losts. With the max gain I had more than 59 airplanes at a time. Finally I used 16.6, which still gives a range of 80km and ~5-10 airplanes.

Using the highest gain would give a very large range of ~250km but nearby signals get lost. And we ant to see mainly the nearby airplanes and now use a gain of 16.6.

The cpu usage is now down to 100% (quad core, so that is 25%) and the adsbox decocde threads are down to 15-25%.

FHEM: Home Automation remote display using small OLED and MQTT

I wanted to have a small display with some essential Home Automation data. So I buy an 1.3″ OLED display with I2C interface and started to look for some existing code for an ESP8266. The display should be feed using WiFi and be portable, so I can place it where needed.

I started with ESPeasy, as there is already support for multiple pages with text lines. Unfortunately the code is written to show sensor data of directly connected sensor only. No option to publish free text or data from a Home Automation system. The ESPeasy code will save the text to flash memory on every change when using the Web GUI. The flash memory would wear out after some month with my use case.

Finally I decided to start my own code. First I had to find out that the OLED display is not an SD1306 but a SH1106 one. Although some people state that these are more or less the same, the SD1306 libraries did not work for me. Then I found which works well for me.

Starting with SSD1306UiDemo.ino I added WiFi and MQTT libaries and code.

My code will show 6 lines of text on two frames (3 lines each). The frames will change every 5 seconds. The content of the text lines is published by a FHEM server. As there was no easy way to integrate the display using a MQTT_DEVICE definition in FHEM, I wrote my own perl mqttmsg sub function and used the FHEM notify definition to publish changes to the display.

a small video

Continue reading ‘FHEM: Home Automation remote display using small OLED and MQTT’ »