Giter Club home page Giter Club logo

dump1090_rs's Introduction

dump1090_rs

github build status

Demodulate a ADS-B signal from a software defined radio device tuned at 1090mhz and forward the bytes to applications such as adsb_deku/radar.

Tested Support

Through the use of the rust-soapysdr project, we support many different software defined radio devices. If you have tested this project on devices not listed below, let me know! (you will need to add gain settings to config.toml or use --custom-config)

Device Supported/Tested Recommend argument
rtlsdr x x --driver rtlsdr
HackRF x --driver hackrf
uhd(USRP) x --driver uhd
bladeRF 2.0 micro xA4 x --driver bladerf

Usage

Minimum Supported Rust Version: 1.70.0

Build

Install soapysdr drivers and library and libclang-dev.

Note

Using debug builds will result in SDR overflows, always using --release for production.

Ubuntu

> apt install libsoapysdr-dev libclang-dev

Cross Compile

Use hub.docker.com/r/rsadsb for cross compiling to the following archs. These images already have soapysdr installed with the correct cross compilers. This uses cross-rs.

> cargo install cross
> cross build --workspace --target x86_64-unknown-linux-gnu --relese

# Used for example in Raspberry Pi (raspios) 32 bit
> cross build --workspace --target armv7-unknown-linux-gnueabihf --release

# Used for example in Raspberry Pi (raspios) 64 bit
> cross build --workspace --target aarm64-unknown-linux-gnu --release

Release Builds from CI

Check the latest release for binaries built from the CI.

Run

Run the software using the default rtlsdr.

> cargo r --release

help

See --help for detailed information.

ADS-B Demodulator and Server

Usage: dump1090_rs [OPTIONS]

Options:
      --host <HOST>                    ip address to bind with for client connections [default: 127.0.0.1]
      --port <PORT>                    port to bind with for client connections [default: 30002]
      --driver <DRIVER>                soapysdr driver name (sdr device) from default `config.toml` or `--custom-config` [default: rtlsdr]
      --driver-extra <DRIVER_EXTRA>    specify extra values for soapysdr driver specification
      --custom-config <CUSTOM_CONFIG>  Filepath for config.toml file overriding or adding sdr config values for soapysdr
  -h, --help                           Print help (see more with '--help')
  -V, --version                        Print version

Performance tricks

To enable maximum performance, instruct rustc to use features specific to your cpu.

> RUSTFLAGS="-C target-cpu=native" cargo r --release

Always use the latest rust releases including nightly, currently this gives around a 5-10% performance boost.

Testing

> cargo t --workspace --release

Benchmark

Reading from a 512KB iq sample to ADS-B bytes takes ~3.0 ms, but feel free to run benchmarks on your own computer.

> RUSTFLAGS="-C target-cpu=native" cargo bench --workspace

Intel i7-7700K CPU @ 4.20GHz

01                      time:   [2.9850 ms 2.9859 ms 2.9868 ms]
02                      time:   [2.9260 ms 2.9279 ms 2.9308 ms]
03                      time:   [2.8449 ms 2.8525 ms 2.8653 ms]

Changes

See CHANGELOG.md

dump1090_rs's People

Contributors

dependabot[bot] avatar johnwstanford avatar step-security-bot avatar tjmullicani avatar wcampbell0x2a avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dump1090_rs's Issues

Feature request

It would be useful if the rtlsdr version could select by device number.

SoapySDR remote questions

I'm working on getting dump190_rs and radar running using SoapySDR remote with an Airspy. It seems to be running, but I'm not actually seeing any airplanes in radar and using netcat to connect to port 30002 shows no output.
Airspy has three gain controls:
LNA gain range: [0, 15] dB
MIX gain range: [0, 15] dB
VGA gain range: [0, 15] dB

My questions:

  1. Ignore this question - I see now in the config.toml how each of the gains can be set - sorry
    It seems I can only specify one gain key in the custom-config file unless I'm missing something?
  2. While dump1090_rs is running, it prints a steady stream of characters (mostly 'S', some '0') to stdout. Is that expected? Do the characters mean anything?

Thanks for these projects - I was very happy to find an ads-b project that supports remote hw as my sdr and antenna are located in a barn away from the e noise of my house.

Please include an example rtl-sdr.rules

running dump1090 as myself I get

usb_open error -3
Please fix the device permissions, e.g. by installing the udev rules file rtl-sdr.rules
Error: "Expected result code of zero"

Though running sudo dump1090 works fine, it'd be good to play by the rules. Google cannot point me to a definitive answer. Please consider an example .rules file and a sentence or two on how to install it.

I'm enjoying this project as a fellow rustacean who lives under the flightpath from LHR. I can now put my SDR to useful work. Kudos!

Trying to use SDRPLAY (RSP2Duo)

Hello

I'm trying to use a RSP2Duo without success 5I'm able to see around 30 planes using an oldest dump1090)

No ioda about the parameter I should use ....

I've not more text than this one ...

[-] read in custom config: /home/pi/config.toml
[-] using soapysdr driver: driver=sdrplay
[INFO] devIdx: 0
[INFO] SerNo: 1708004110
[INFO] hwVer: 2
[INFO] rspDuoMode: 0
[INFO] tuner: 1
[INFO] rspDuoSampleFreq: 0.000000
[-] using config: Sdr {
channel: 0,
driver: "sdrplay",
setting: None,
gain: [
Gain {
key: "LNA",
value: 0.0,
},
Gain {
key: "VGA",
value: 0.0,
},
],
antenna: None,
}
[-] Writing gain: LNA = 0
[-] Writing gain: VGA = 0
[-] frequency: Ok(1090000000.0)
[-] sample rate: Ok(2400000.0)
[INFO] Using format CS16.

Success report: PlutoSDR

PlutoSDR works with uri parameter set correctly for soapySDR (ip:192.168.2.1 is a good default guess). Tested with gain 24, but unsure of ideal default value.

Run as normal user

Hi all, the only way to dump1090_rs detect the SDR is running as root. Is there a way to run as a normal user?

use SoapySDR

this would allows cross-sdr support, for example hackRF.

Selecting antenna to use

Hi,

Thanks for the project! I am using dump1090_rs with my USRP B210 which has two antennas per frontend. Right now it does not appear to be possible to select which antenna to use, which is a bit annoying for my use case.

It appears it might be settable using soapysdr::Device::set_antenna.

Would you consider adding support for setting the antenna via e.g. command line options?

Specifying additional options in `--driver`-argument results in panic

Hi,

I'm trying to run dump1090_rs on a nuc which has multiple rtlsdr connected. AFAICT it should be possible (after using rtl_eeprom to program a different serial number per rtlsdr) to tell SoapySDR which one should be used by appending ,serial=XXXXXXXX to the driver argument.

SoapySDR seems to open the correct device, but dump1090_rs crashes, probably because it tries to lookup some additional options using the full name instead of only rtlsdr?

root@tv ~/src/dump1090_rs (git)-[master] # RUST_BACKTRACE=full cargo run -- --driver 'rtlsdr,serial=00001000'
    Finished dev [unoptimized + debuginfo] target(s) in 0.04s
     Running `target/debug/dump1090_rs --driver rtlsdr,serial=00001000`
[-] using soapysdr driver: driver=rtlsdr,serial=00001000
Found Rafael Micro R820T tuner
Detached kernel driver
Found Rafael Micro R820T tuner
Reattached kernel driver
[INFO] Opening Generic RTL2832U OEM :: 00001000...
Detached kernel driver
Found Rafael Micro R820T tuner
thread 'main' panicked at dump1090_rs/src/main.rs:119:9:
[-] selected --driver gain values not found in custom or default config
[backtrace removed]

I'd guess changing this line to split the options.driver on , before comparing could solve this. I don't know rust but this change seems to work for me:

    let checkdriver = options.driver.split(",").next().unwrap();

    // check if --driver exists in config, with selected driver
    let channel = if let Some(sdr) = config.sdrs.iter().find(|a| a.driver == checkdriver) {

It seems short messages are not decoded

I put this in the "discussion" section but on second thought maybe I should bring this up as an issue. The Rust version decodes less messages than the "normal" dump1090 (if such a thing exists). It documented this in my comparison write up:
Comparing rust version of dump1090 The traditional dump1090 decodes shorter messages.

Is anything useful not being decoded?

I find the rust version gets more position data which is the objective after all.

Bias Tee support

Hello, I'm using regular RTL-SDR V3 with a general-use LNA. But I'm not able to enable the bias-t when using dump1090_rs.

Is it supported?

SoapySDR remotes aren't matching

I'm unable to select a remote device using SoapySDR's driver syntax, even thought SoapySDRUtil can find it:

$ SoapySDRUtil --find="driver=remote, remote=192.168.1.184, remote:driver=rtlsdr"
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Found device 0
  available = Yes
  driver = remote
  label = Generic RTL2832U OEM :: 
  manufacturer = Realtek
  product = RTL2838UHIDIR
  remote = tcp://192.168.1.184:55132
  remote:driver = rtlsdr
  rtl = 0
  serial = 
  tuner = Elonics E4000


$ dump1090 --driver "driver=remote, remote=192.168.1.184, remote:driver=rtlsdr"
[-] using driver: driver=remote, remote=192.168.1.184, remote:driver=rtlsdr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { code: Other, message: "SoapySDR::Device::make() no match" }', dump1090_rs/src/main.rs:81:75
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

There aren't any examples, really for doing this type of connectivity with the code, but it seems like it should work as other applications (CubicSDR, for example) can use the same remote sdr source just fine. It's most likely something to do with the driver selection in the command line, but without any good docks here, i'm just trying various combinations and still getting nowhere.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.