Martin Ling
eae7049284
Fix empty report when TX ends soon after the last report.
2022-09-23 05:19:29 -04:00
Martin Ling
14093fe73b
Provide a callback for completion of a TX transfer.
2022-09-23 05:19:29 -04:00
Martin Ling
2448796e35
Handle failures in fread from TX callback.
2022-09-23 05:19:29 -04:00
Martin Ling
cb8fc333aa
Fix inaccurate error message when TX completes near a 1 second boundary.
2022-09-23 05:19:29 -04:00
Martin Ling
98faa5429f
Fix inaccurate statistics in hackrf_transfer.
2022-09-23 05:19:29 -04:00
Martin Ling
b872647e97
Provide a callback for TX flush, rather than a wait function.
2022-09-23 05:19:29 -04:00
Michael Ossmann
c0ba843085
Merge pull request #1175 from grvvy/update-test-device-path
...
update test device path for test server
2022-09-22 23:16:01 -04:00
grvvy
e5c03ba9fe
update test device path for test server
2022-09-22 20:41:21 -06:00
Michael Ossmann
92b15f226e
Merge pull request #1172 from martinling/amp-startup
...
Fix initial state of RF path GPIOs.
2022-09-21 15:19:04 -04:00
Michael Ossmann
0f7d560925
Merge pull request #1167 from martinling/tx-sync-output
...
Don't start baseband streaming until TX buffer is first filled.
2022-09-21 15:05:51 -04:00
Michael Ossmann
1167f49b7f
hackrf_transfer: refer to triggers as "triggers"
2022-09-21 10:37:40 -04:00
Michael Ossmann
0e84382f5a
document hardware triggering
...
This replaces outdated documentation of an older trigger mechanism.
2022-09-21 10:36:06 -04:00
Martin Ling
3dd2e51d71
Initialise rf_path->switchctrl to SWITCHCTRL_SAFE.
...
This was previously never being initialised.
2022-09-21 12:22:58 +01:00
Martin Ling
cf34beebb0
Remove extra call to switchctrl_set and global switchctrl variable.
...
This call is not required since the GPIOs are already configured in
rf_path_pin_setup(). The global switchctrl is not used anywhere else.
2022-09-21 12:17:18 +01:00
Martin Ling
eec6963759
Initialise RF path GPIOs to safe settings.
...
Previously these calls were leaving the amplifiers on, since the
control settings passed were missing SWITCHCTRL_NO_TX_AMP_PWR and
SWITCHCTRL_NO_RX_AMP_PWR. Use the predefined SWITCHCTRL_SAFE here.
Also move these calls before setting the GPIO pins to output mode,
to avoid driving them to the wrong states briefly first.
2022-09-21 12:05:17 +01:00
Michael Ossmann
5c812681ab
docs: Remove outdated clocking page
2022-09-21 04:09:54 -04:00
Martin Ling
767db9f06c
Don't start baseband streaming until TX buffer is first filled.
2022-09-20 11:13:25 +01:00
Michael Ossmann
e623c7aed7
Merge pull request #1103 from dizcza/master
...
fixed firmware manual build docs
2022-09-19 21:30:22 -04:00
Michael Ossmann
8e83506da1
Merge pull request #1166 from martinling/tx-disconnect-hang
...
Fix hang in TX when a libusb error occurs.
2022-09-19 21:28:49 -04:00
Michael Ossmann
6835bc4812
Merge pull request #1165 from greatscottgadgets/board-id-compat
...
libhackrf: #define outdated board IDs
2022-09-19 21:15:26 -04:00
Martin Ling
e53b9d5717
Fix hang in TX when a libusb error occurs.
...
Where our callback is called with a status other than COMPLETED,
something abnormal has happened and we no longer want to either
submit further transfers or await a flush. So clear the streaming
and flush flags, and proceed to transfer_finished.
Do the same in the case where libusb_submit_transfer fails when
called to submit the flush transfer.
2022-09-20 02:07:21 +01:00
Michael Ossmann
471c5bc5de
libhackrf: #define outdated board IDs
2022-09-19 19:55:33 -04:00
Michael Ossmann
c487e3f6b1
Merge pull request #1162 from martinling/ant-bias-glitch
...
Fix antenna bias pulse glitch at startup.
2022-09-19 10:33:57 -04:00
Martin Ling
44511c6c3b
Move RFFC5072 setup before enabling RF power.
2022-09-19 13:02:29 +01:00
Martin Ling
5d78302d97
Change default RFFC5072 register settings to disable antenna bias.
2022-09-19 13:02:01 +01:00
Martin Ling
6d57709000
Move delay after enabling RF power to rad1o-specific code.
2022-09-19 10:46:01 +01:00
Michael Ossmann
555c6fb47b
Merge pull request #1161 from greatscottgadgets/wee-bugs
...
clean-up and small bug fixes
2022-09-19 04:55:53 -04:00
Michael Ossmann
f4202d1163
hackrf_transfer: Don't skip preload stats in RX
...
Fixes a bug introduced in 8a9af7a: Statistics skipped for initial
buffers not only when preloaded in TX mode but also in RX mode with no
preloading.
The total bytes transferred may appear inflated in RX mode when
receiving a small number of samples with -n, but the stats represent
data transferred over USB, some of which may have been discarded by the
host.
2022-09-18 13:27:51 -04:00
Michael Ossmann
82ecfce414
hackrf_transfer: simplify hardware sync mode logic
...
The -H option now requires no argument.
2022-09-18 05:49:03 -04:00
Michael Ossmann
22635bf07d
libhackrf: update hackrf_transfer struct comment
2022-09-18 05:13:25 -04:00
Michael Ossmann
9181cbe049
hackrf_transfer: send signal to own PID
...
Instead of sending a signal to the process group, get our own process ID
and send the signal to it. This fixes a bug that prevented termination
when called from a script.
2022-09-18 05:07:09 -04:00
Michael Ossmann
ca5049fcd3
Merge pull request #1156 from martinling/tx-transfer-sizing
...
Fix handling of the final <256KiB of data transmitted with `hackrf_transfer`
2022-09-18 04:31:47 -04:00
Martin Ling
6ab17209d7
Disable flush when cancelling transfers.
2022-09-16 15:55:20 +01:00
Martin Ling
55fdddd81e
Merge remote-tracking branch 'origin/master' into tx-transfer-sizing
2022-09-15 15:32:20 +01:00
Martin Ling
1b166a5b05
Pad the last data in a transmission to the next 512 byte boundary.
2022-09-15 15:27:53 +01:00
Martin Ling
69823397b1
Submit flush transfer as soon as end of data is reached.
2022-09-15 15:12:41 +01:00
Michael Ossmann
2b1aa545f8
Merge pull request #1157 from martinling/standardise-dbfs
...
Standardise dBFS level
2022-09-15 04:59:45 -04:00
Martin Ling
09c6030ec9
Start TX/RX in hackrf_transfer after all other requests.
...
This avoids glitches and lost samples at the start of a transmission.
2022-09-15 09:51:11 +01:00
Danylo Ulianych
a2c30a8896
Update firmware/README
...
Co-authored-by: Martin Ling <martin-github@earth.li>
2022-09-15 07:39:48 +03:00
Michael Ossmann
75e3137d55
Merge pull request #1155 from greatscottgadgets/platform-detect
...
Detect hardware platform at run-time.
2022-09-14 17:45:58 -04:00
Michael Ossmann
4f779aae7a
Merge pull request #1154 from greatscottgadgets/clkout-source
...
firmware: use consistent clock source
2022-09-14 17:43:28 -04:00
Martin Ling
f1e34b7cea
Correct the calculation of dBfs signal level.
...
dBFS is defined in AES Standard AES17-1998, IEC 61606, and ITU-T Recs.
P.381 and P.382, such that the RMS value of a full-scale sine wave is
designated 0 dBFS.
A full scale sine wave on HackRF has the range -127 to 127.
We calculate the full scale ratio relative to a signal in which both I
and Q are held at 127. This represents a signal with sqrt(2) times
the amplitude, and thus twice the power, of a full scale sine wave.
Therefore to obtain dBfs by the above definition, we add 3dB.
2022-09-14 18:21:07 +01:00
Martin Ling
66fa76c550
In CW mode, set only the I component to the specified amplitude.
2022-09-14 18:14:59 +01:00
Martin Ling
d5d2b09fe8
Restrict CW mode amplitude to 127.
2022-09-14 18:14:23 +01:00
Martin Ling
f2d00adab8
Add commentary to TX callback.
2022-09-14 15:55:07 +01:00
Martin Ling
e38534b99d
Don't return -1 from the TX callback that provides the last data.
2022-09-14 15:55:07 +01:00
Martin Ling
5ad08cfd96
Set valid_length correctly in hackrf_transfer TX callback.
2022-09-14 15:55:04 +01:00
Martin Ling
22846b5682
Make libhackrf honour the valid_length set by TX callback.
2022-09-14 15:48:34 +01:00
Martin Ling
9905e960a4
Rearrange to avoid duplicating sample limit return path.
2022-09-14 15:16:18 +01:00
Martin Ling
16f93d9b27
Move duplicated code to one place.
2022-09-14 15:15:34 +01:00