-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hackrf_transfer sample type for stdout #1524
Comments
The information you're getting is correct: HackRF outputs signed 8-bit samples. So you will need to either convert the data, or modify dump1090 to accept signed 8-bit samples. As that article mentions, there's a fork of dump1090 with direct support for HackRF but it's not the latest version at this point. |
Thanks for the reply but it's buffer are already unsigned so how it could output signed samples. Thanks |
The It's common practice in C to use It's up to the code reading the buffer to decide how to interpret the bytes. For instance, in an RX handler you could interpret the sample data by casting the buffer to an array of a type like: struct sample {
int8_t i;
int8_t q;
}; |
For what it's worth, you could perform the conversion by piping the output to the Sound eXchange program to do the conversion on the fly. I've done with this hackrf_transfer, sox, and dump1090 in the past with success. This is the full command I use on macOS terminal to get
EDIT: Looking back on this, you may want of slightly offset the frequency to avoid the DC spike. |
Thanks for the useful suggestions. I did same but not receiving anything . I am doing this all on my raspberry pi and installed everything correctly. I have also tried with different Antennas but no luck . While my other pc with rtl sdr is receiving and decoding ADS-B data using dump1090. Any idea what could be wrong. |
What would you like to know?
Hi,
I want to pipe output of hackrf_transfer to dump1090 for decoding but over the web, people are referring that hackrf outputs signed 8 bit signed samples but dump1090 expects 8 bit unsigned values. same mentioned here (https://medium.com/@rxseger/flight-tracking-with-ads-b-using-dump1090-mutability-and-hackrf-one-on-os-x-3e2d5e192d6f)
However i see that hackrf buffer inside structure "hackrf_transfer" is already declared as "uint8_t* buffer;" in hackrf.h but in any case the samples passed are not decoded by dump1090. Can anyone guide me. Thanks
The text was updated successfully, but these errors were encountered: