-
Notifications
You must be signed in to change notification settings - Fork 215
Raspberry Edition
Raspberry Edition takes most advantages of the SoftRF technology from ESP hardware platform(s) and brings them onto Raspberry Pi. Despite that few new hardware components are now in use, majority of proven successful software features were transferred either unmodified or slightly adjusted onto this new platform, such as :
- RF IC hardware drivers ;
- SX1276 ("SoftRF LoRa")
- Nordic nRF905
- RF protocol encoders and decoders ;
- "Legacy"
- UAT (ADS-B 978 MHz)
- OGNTP
- P3I
- FANET+
- Data link protocols support ;
- FTD-12 NMEA
- Garmin GDL90
- Dump1090
- GNSS input parser ;
- Traffic processing core.
In addition to that, some new features, unique to Raspberry Edition has come up :
- import of ADS-B traffic (both 1090 ES and 978 UAT) from connected USB RTL-SDR hardware and software (aircraft.json) ;
- support for 2 RF ICs (transceivers) connected to one Raspberry Pi over both of SPI buses ;
- Linux GPSD service can be used as GNSS data source ;
- export and import of traffic information in uAvionix PingStation (JSON) format ;
- transmit packets in an arbitrary (raw) data format. The packet has to be "HEX-packed" inside JSON container. This can be useful for issuing OGNTP or FANET weather and other alerts.
These features that available on ESP platform(s) are NOT included into the Raspberry Pi port :
- WebUI
- Wi-Fi
- LED ring
- Audio
- optional barometric pressure sensor and/or OLED display
- MAVLink protocol
- Bluetooth
They are to be superseded by built-in Raspberry Pi operating system capabilities. There are also chances that some of them will become ported later on.
Summary for key differences of the Raspberry Edition relative to other ones :
- can receive ADS-B traffic 1 ;
- can relay (re-transmit) air traffic of one type (protocol) into a different one ;
- system settings can be changed in runtime, "on-the-fly" 2 ;
- command-line interface is the only one available now.
1 - with connected RTL-SDR USB "stick" ;
2 - this makes possible of time shared multiple RF protocol operation.
Generally, any of Raspberry Pi's that have 40-pin GPIO connector should suffice,
but a multiple-core variant, such as 2 Model B (or more advanced 3 Model B), is highly recommended.
Number | Part | Qty | Picture | Source |
---|---|---|---|---|
1 | Dragino LoRa/GPS HAT 3 | 1 | AliExpress 1 2 3 4 | |
2 | GNSS antenna | 1 | AliExpress |
3 - 868 MHz variant is applicable for these world regions: EU, RU, NZ, SA, IN ;
915 MHz - US, CA, AU, IL, KR ;
433 MHz - CN .
SoftRF LoRa module or other SX1276 breakout board.
If you want to make a relay (from one of RF protocols into other) - you will need two of these modules. 4
4 - due to libBCM2835 h/w resource locking, two modules may not currently work on one board at the same time.
Number | Part | Qty | Picture | Source |
---|---|---|---|---|
1 | PCB | 1 | ||
2 | HopeRF RFM95-868 | 1 | AliExpress | |
3 | Female SMA-KHD | 1 | AliExpress | |
4 | Antenna 868 MHz 5 | 1 |
EBay AliExpress 1 2 |
|
5 | GPS/GLONASS BN-880 | 1 | AliExpress | |
6 | 2x7 male header 2.54mm | 1 | Local | |
7 | Capacitor 10uF | 1 | Local | |
8 | 1x40 male header 2.54mm | 1 | AliExpress | |
9 | 40 pcs. female DuPont jumper wires | 1 | AliExpress |
5 - 868 MHz variant is applicable for these world regions: EU, RU, NZ, SA, IN ;
915 MHz - US, CA, AU, IL, KR ;
433 MHz - CN .
To build SoftRF software from source code, please, follow these instructions.
As a result of the build, two program binaries will become created:
- SoftRF - the program code designed to work with Raspberry Pi's primary SPI bus (SPI 0);
- SoftRF-aux - the same program but to run over auxiliary SPI bus (SPI 1).
Flight computer hardware: Raspberry Pi.
EFB software: XCSoar.
Full picture | Full picture | Full picture | Full picture |
- Example 1 Basic operation.
- Example 2 Change settings onto P3I radio protocol.
- Example 3 NMEA TCP server.
- Example 4 Mix with ADS-B traffic.
- Example 5 Runtime settings update.
- Example 6 Ground station. Relay ADS-B traffic into air for use by OGNTP compatible airborne receivers.
- Example 7 Ground station. Protocol "converter".
"Normal" operation mode.
Default settings activity:
- OGNTP radio protocol is in use ;
- Raspberry Pi system timezone is "Zulu" (UTC) and date&time are in sync with real world ones ;
- GNSS source produces <CR><LF> terminated NMEA sentences ;
- SoftRF takes NMEA GNSS sentences from standard input ;
- it transmits own position report beacon into the RF air within certain time interval ;
- it receives beacons from air traffic around and qualifies them as alerts ;
- SoftRF sends the traffic reports in FLARM-compatible NMEA format over standard output stream.
pi@raspberrypi $ cat /etc/timezone
Etc/UTC
pi@raspberrypi $ date ; ntptime | grep 2020
Mon Apr 27 05:27:34 UTC 2020
time e250ebc6.f3abfb9c Mon, Apr 27 2020 5:27:34.951, (.951843992),
pi@raspberrypi $ stty -F /dev/ttyAMA0 9600 raw
pi@raspberrypi $ cat /dev/ttyAMA0 | sudo ./SoftRF
SX1276 RFIC is detected.
$GPGSA,A,3,02,30,05,06,07,09,,,,,,,5.09,3.19,3.97*04
$GPRMC,145750.00,A,5XXX.XXX68,N,03XXX.XXX33,E,0.701,,051118,,,A*7E
$GPGGA,145750.00,5XXX.XXX68,N,03XXX.XXX33,E,1,06,3.19,179.2,M,12.5,M,,*5E
$PFLAA,3,0,0,0,2,C5D804!OGN_C5D804,0,,0,00000.0,1*60
$PFLAU,1,1,2,1,3,-30,2,0,0*4E
< ... skipped ... >
pi@raspberrypi $ cat /etc/timezone
Etc/UTC
pi@raspberrypi $ stty -F /dev/ttyAMA0 9600 raw
pi@raspberrypi $ { echo "{class:SOFTRF,protocol:P3I,band:UK}" ; cat /dev/ttyAMA0 ; } | sudo ./SoftRF
SX1276 RFIC is detected.
$GPGSA,A,3,02,30,05,06,07,09,,,,,,,5.09,3.19,3.97*04
$GPRMC,145750.00,A,5XXX.XXX68,N,03XXX.XXX33,E,0.701,,051118,,,A*7E
$GPGGA,145750.00,5XXX.XXX68,N,03XXX.XXX33,E,1,06,3.19,179.2,M,12.5,M,,*5E
$PFLAA,3,0,0,0,2,C5D804!PAW_C5D804,0,,0,00000.0,1*60
$PFLAU,1,1,2,1,3,-30,2,0,0*4E
< ... skipped ... >
Default settings.
Listen on TCP port 10110 for incoming connections.
When a client is connected - NMEA data stream is transferred to the client's application.
pi@raspberrypi $ cat /etc/timezone
Etc/UTC
pi@raspberrypi $ stty -F /dev/ttyAMA0 9600 raw
pi@raspberrypi $ cat /dev/ttyAMA0 | sudo ./SoftRF | netcat -l 10110 -k
Default settings.
pi@raspberrypi $ cat /etc/timezone
Etc/UTC
pi@raspberrypi $ stty -F /dev/ttyAMA0 9600 raw
pi@raspberrypi $ cat /dev/ttyAMA0 | sudo ./SoftRF
SX1276 RFIC is detected.
$GPGSA,A,3,02,30,05,06,07,09,,,,,,,5.09,3.19,3.97*04
$GPRMC,145750.00,A,5XXX.XXX68,N,03XXX.XXX33,E,0.701,,051118,,,A*7E
$GPGGA,145750.00,5XXX.XXX68,N,03XXX.XXX33,E,1,06,3.19,179.2,M,12.5,M,,*5E
$PFLAA,3,0,0,0,2,C5D804!OGN_C5D804,0,,0,00000.0,1*60
$PFLAU,1,1,2,1,3,-30,2,0,0*4E
< ... skipped ... >
Open a concurrent shell session. Make sure that dump1090 6 (ADS-B) process is running.
pi@raspberrypi $ ps -ax | grep dump1090
2381 pts/1 Sl+ 1:53 dump1090 --interactive --net
6 - Oliver Jowett's (mutability) variant of dump1090 from unmaintained branch is the only one that is currently supported by SoftRF. Other variants of dump1090 are known to use a different format of JSON output which is not compatible with Raspberry Edition.
Take current ADS-B traffic data from dump1090 web output port and transfer it onto SoftRF's TCP input port (30007):
pi@raspberrypi $ wget -q -O - http://localhost:8080/data/aircraft.json | nc -N localhost 30007
One time transfer is shown in the example. To keep the traffic picture up to date - you need to repeat the transfer at certain interval, say, 6-10 seconds.
"Normal" operation mode. Default settings.
pi@raspberrypi $ cat /etc/timezone
Etc/UTC
pi@raspberrypi $ stty -F /dev/ttyAMA0 9600 raw
pi@raspberrypi $ cat /dev/ttyAMA0 | sudo ./SoftRF
SX1276 RFIC is detected.
$GPGSA,A,3,02,30,05,06,07,09,,,,,,,5.09,3.19,3.97*04
$GPRMC,145750.00,A,5XXX.XXX68,N,03XXX.XXX33,E,0.701,,051118,,,A*7E
< ... skipped ... >
Open a concurrent shell session.
Change protocol setting onto P3I:
pi@raspberrypi $ echo "{ class:SOFTRF,protocol:P3I }" | nc -N localhost 30007
pi@raspberrypi $
Example 6. Ground station. Relay ADS-B traffic into air for use by OGNTP compatible airborne receivers.
"Relay" operating mode.7 Rest of settings are default.
pi@raspberrypi $ cat /etc/timezone
Etc/UTC
pi@raspberrypi $ stty -F /dev/ttyAMA0 9600 raw
pi@raspberrypi $ { echo "{class:SOFTRF,mode:RELAY}" ; cat /dev/ttyAMA0 ; } | sudo ./SoftRF
SX1276 RFIC is detected.
7 - SoftRF application has to be restarted once per every 49 days of uptime to avoid possible issues associated with rollover of 32-bit wide milliseconds counter (drawback of Arduino backend).
Open a concurrent shell session. Make sure that dump1090 8 (ADS-B) process is running.
pi@raspberrypi $ ps -ax | grep dump1090
2381 pts/1 Sl+ 1:53 dump1090 --interactive --net
8 - Oliver Jowett's (mutability) variant of dump1090 from unmaintained branch is the only one that is currently supported by SoftRF. Other variants of dump1090 are known to use a different format of JSON output which is not compatible with Raspberry Edition.
Take current ADS-B traffic data from dump1090 web output port and transfer it onto SoftRF's TCP input port (30007):
pi@raspberrypi $ wget -q -O - http://localhost:8080/data/aircraft.json | nc -N localhost 30007
To keep the traffic picture up to date - you need to repeat the transfer at certain interval, say, 6-10 seconds.
Settings are explained on this page.
Raspberry Edition specific JSON keywords are listed in this table:
1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|
class | SOFTRF | mode | NORMAL | |
RELAY | ||||
protocol | LEGACY | |||
OGNTP | ||||
P3I | ||||
FANET | ||||
band | AUTO | |||
EU | ||||
RU | ||||
CN | ||||
US | ||||
AU | ||||
NZ | ||||
UK | ||||
IN | ||||
IL | ||||
KR | ||||
aircraft_type | GLIDER | |||
TOWPLANE | ||||
POWERED | ||||
HELICOPTER | ||||
UAV | ||||
HANGGLIDER | ||||
PARAGLIDER | ||||
BALLOON | ||||
STATIC | ||||
alarm | NONE | |||
DISTANCE | ||||
VECTOR | ||||
txpower | FULL | |||
LOW | ||||
OFF | ||||
nmea | gnss | true | ||
false | ||||
private | true | |||
false | ||||
legacy | true | |||
false | ||||
sensors | true | |||
false | ||||
output | OFF | |||
UART | ||||
UDP | ||||
gdl90 | OFF | |||
UART | ||||
UDP | ||||
d1090 | OFF | |||
UART | ||||
json | OFF | |||
PING | ||||
stealth | true | |||
false | ||||
no_track | true | |||
false |