I have a project where I'm am provided a `complex<int8_t>` buffer of samples for a HackRF. All values in the buffer are either `0+j0` or `127+j127` (zero power or max power). I'm wanting to convert it to the bladerf SC16.Q11 format of little endian `complex<int16_t>` covered here: https://www.nuand.com/libbladeRF-doc/v2 ... m_a_t.html
I perform the simple complex int8 to complex int16 mapping of `0+j0` to `0+j0` and `127+j127` to `2048+j2048`, which are the equivalent zero and max power values and I write them as little endian. Here is an `xxd` hex visual for the complex int8 samples I'm given (HackRF format):
Code: Select all
...
00000300: 7f7f 0000 7f7f 0000 0000 0000 0000 7f7f ................
00000310: 0000 7f7f 0000 0000 0000 0000 0000 0000 ................
...
Code: Select all
00000600: ff07 ff07 0000 0000 ff07 ff07 0000 0000 ................
00000610: 0000 0000 0000 0000 0000 0000 ff07 ff07 ................
00000620: 0000 0000 ff07 ff07 0000 0000 0000 0000 ................
00000630: 0000 0000 0000 0000 0000 0000 0000 0000 ................
The HackRF complex int8 buffer I'm given is very very short (2048 samples @ 2MSPS). I want to TX on bladerf TX1, but I'm unsure which `tx config` options suit my requirements. Here is my `bladeRF-cli` command list:
Code: Select all
set samplerate tx1 2M
set bandwidth tx1 2M
set frequency tx1 900
set gain tx1 18
tx config file=/tmp/brf_out.sc16q11 format=bin repeat=1 delay=0 samples=1024 buffers=8 xfers=4 channel=1
tx start
tx wait
As is, the emitted waveform isn't quite right. The original complex int8's TX'd via a HackRF are processed correctly by my receiver, but the converted samples TX'd via bladerf aren't processed correctly. So something must be incorrect with my conversion or transmission.
Thank you for any help!