Skip to content
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

Add HackRF support #51

Merged
merged 3 commits into from
Dec 29, 2023
Merged

Add HackRF support #51

merged 3 commits into from
Dec 29, 2023

Conversation

tjmullicani
Copy link
Contributor

No description provided.

tjmullicani and others added 3 commits November 17, 2023 17:27
struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
while (!Modes.exit) {
threadTimedWait(&Threads.reader, &ts, 50);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While loop is needed since hackrf_start_rx returns immediately. Not sure of the best way to handle waiting, since the HackRF API doesn't provide a blocking function similar to bladerf_stream or rtlsdr_read_sync.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tjmullicani
Copy link
Contributor Author

Sample run:

tim@sdr1:~/readsb$ ./readsb --device-type hackrf --gain 32 --hackrf-vgagain 48 
invoked by: ./readsb --device-type hackrf --gain 32 --hackrf-vgagain 48
[2023-11-19 03:17:59.572 UTC] readsb starting up.
readsb version: 3.14.1606 wiedehopf git: ca544e7 (committed: Sun Nov 19 02:58:34 2023 0000)
Opening HackRF: (null)
HackRF successfully initialized (AMP Enable: 0, LNA Gain: 32, VGA Gain: 48).
*5dabb2d5737f37;
hex:  abb2d5   CRC: 000000 fixed bits: 0 decode: ok
RSSI:     -9.9 dBFS   reduce_forward: 1
Score: 750
receiverTime:                   989309.00us
utcTime: 03:18:00.565 epoch: 1700363880.565
DF: 11 AA:ABB2D5 IID:0 CA:5
 All Call Reply
  ICAO Address:  ABB2D5 (mode_s)
  Air/Ground:    airborne

*8dabb2d5ea428867af5c0846a7ea;
hex:  abb2d5   CRC: 80665f fixed bits: 1 decode: ok
RSSI:    -12.7 dBFS   reduce_forward: 1
Score: 900
receiverTime:                  1439307.00us
utcTime: 03:18:01.015 epoch: 1700363881.015
DF: 17 AA:ABB2D5 CA:5 ME:EA428867AF5C08
 Extended Squitter Target state and status (V2) (29/1)
  ICAO Address:  ABB2D5 (adsb_icao)
  Air/Ground:    airborne
  NIC-baro:      1
  NACp:          10
  SIL:           3 (p <= 0.00001%, unknown type)
  Selected heading: 331.2
  MCP selected altitude:      34016 ft
  QNH:                     1013.6 millibars

@wiedehopf wiedehopf merged commit 117a5bc into wiedehopf:dev Dec 29, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants