You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank-you for the Code Example provided by :
// Transmit a 440Hz triangle wave through FM (144.5MHz) using the libhackrf API
// Copyright (c) 2022 László Baráth "Uncle Dino" HA7DN https://github.com/Sasszem
hackrf_info:
hackrf_info version: git-6211fbb0*
libhackrf version: git-6211fbb0* (0.8)
Found HackRF
Index: 0
Serial number: 000000000000000057b068dc22276763
hackrf_open_setup
libusb_get_configuration result: 0
hackrf_open_setup: set_hackrf_configuration result: 0
libusb_claim_interface result: 0
Board ID Number: 2 (HackRF One)
Firmware Version: 2023.01.1 (API:1.07)
Part ID Number: 0xa000cb3c 0x00644754
Hardware Revision: older than r6
Hardware supported by installed firmware:
HackRF One
hackrf_close
Host code also at 2023.
The text was updated successfully, but these errors were encountered:
Compiling the Example TX code utilizing the transfer and flush callback that is in hackrf.h file, copied to another file rfgen_tx.c
There was a compile error when doing (note: possible fix below, others may run into this issue). If the fix is incorrect possibly understand why.
gcc -o rfgen_tx rfgen_tx.c -lm -lhackrf
rfgen_tx.c: In function ‘main’:
rfgen_tx.c:80:36: warning: passing argument 2 of ‘hackrf_enable_tx_flush’ from incompatible pointer type [-Wincompatible-pointer-types]
80 | hackrf_enable_tx_flush(device, flush_callback, NULL);
| ^~~~~~~~~~~~~~
| |
| void (*)(hackrf_transfer ) {aka void ()(struct )}
In file included from rfgen_tx.c:3:
/usr/local/include/libhackrf/hackrf.h:1150:21: note: expected ‘hackrf_flush_cb_fn’ {aka ‘void ()(void , int)’} but argument is of type ‘void ()(hackrf_transfer )’ {aka ‘void ()(struct *)’}
1150 | hackrf_flush_cb_fn callback,
Needed to change line
** void flush_callback(hackrf_transfer *transfer) { **
to:
void flush_callback(void * transfer, int success) {
to get the source to compile and run the file.
Verified the signal transmitted and debug printed
hackrf_open
hackrf_open_setup
libusb_get_configuration result: 0
hackrf_open_setup: set_hackrf_configuration result: 0
libusb_claim_interface result: 0
hackrf_set_freq
hackrf_set_txvga_gain
hackrf_enable_tx_flush
hackrf_close
Thank-you for the Code Example provided by :
// Transmit a 440Hz triangle wave through FM (144.5MHz) using the libhackrf API
// Copyright (c) 2022 László Baráth "Uncle Dino" HA7DN https://github.com/Sasszem
hackrf_info:
hackrf_info version: git-6211fbb0*
libhackrf version: git-6211fbb0* (0.8)
Found HackRF
Index: 0
Serial number: 000000000000000057b068dc22276763
hackrf_open_setup
libusb_get_configuration result: 0
hackrf_open_setup: set_hackrf_configuration result: 0
libusb_claim_interface result: 0
Board ID Number: 2 (HackRF One)
Firmware Version: 2023.01.1 (API:1.07)
Part ID Number: 0xa000cb3c 0x00644754
Hardware Revision: older than r6
Hardware supported by installed firmware:
HackRF One
hackrf_close
Host code also at 2023.
The text was updated successfully, but these errors were encountered: