Wednesday, November 10, 2021

Sending a file through a LimeSDR mini with a loopback cable using PSK modulation


Generating: '/home/paul/PycharmProjects/grade_thesis/src/sims/qpsk_file_transfer/packet_loopback_hier.py'
>>> Warning: This flow graph contains a throttle block and another rate limiting block, e.g. a hardware source or sink. This is usually undesired. Consider removing the throttle block.

Executing: /usr/bin/python3 -u /home/paul/PycharmProjects/grade_thesis/src/sims/qpsk_file_transfer/packet_loopback_hier.py

qt5ct: using qt5ct plugin
gr::log :WARN: time_sink_c0 - Trigger delay (25) outside of display range (0:0.0002046).
gr::log :WARN: time_sink_c2 - Trigger delay (50) outside of display range (0:0.0002498).
---------------------------------------------------------------
LimeSuite Source (RX) info

##################
Connecting to device
##################
LimeSuite version: 20.10.0-myriadrf2~focal
gr-limesdr version: 3.1.5.0
##################
Device list:
Nr.:0 device:LimeSDR Mini, media=USB 3.0, module=FT601, addr=24607:1027, serial=1D7515E63C15B0
##################
Reference clock 40,00 MHz
Using device: LimeSDR-Mini(1D7515E63C15B0) GW: 1.30 FW: 6
##################

INFO: device_handler::enable_channels(): SISO CH0 set for device number 0.
INFO: device_handler::set_samp_rate(): set sampling rate: 5 MS/s.
INFO: device_handler::set_rf_freq(): Selected RX path: LNAW
RF frequency set [RX]: 400 MHz.
INFO: device_handler::set_analog_filter(): RX LPF configured
INFO: device_handler::set_digital_filter(): GFIR LPF cannot be set to the requested bandwidth
digital filter CH0 [RX]: 5 MHz.
INFO: device_handler::set_gain(): set gain [RX] CH0: 30 dB.
INFO: device_handler::set_antenna(): CH0 antenna set [RX]: LNAW.
INFO: device_handler::calibrate(): Rx calibration finished
---------------------------------------------------------------
LimeSuite Sink (TX) info

##################
Connecting to device
Previously connected device number 0 from the list is used.
##################

INFO: device_handler::enable_channels(): SISO CH0 set for device number 0.
INFO: device_handler::set_samp_rate(): GFIR LPF cannot be set to the requested bandwidth
set sampling rate: 5 MS/s.
INFO: device_handler::set_rf_freq(): RF frequency set [TX]: 400 MHz.
INFO: device_handler::set_analog_filter(): Filter calibrated. Filter order-4th, filter bandwidth set to 20 MHz.Real pole 1st order filter set to 2.5 MHz. Preemphasis filter not active
TX LPF configured
INFO: device_handler::set_digital_filter(): GFIR LPF cannot be set to the requested bandwidth
digital filter CH0 [TX]: 5 MHz.
INFO: device_handler::set_gain(): set gain [TX] CH0: 50 dB.
INFO: device_handler::set_antenna(): Selected TX path: Band 2
CH0 antenna set [TX]: BAND2.
INFO: source_impl::init_stream(): source channel 0 (device nr. 0) stream setup done.
INFO: sink_impl::init_stream(): sink channel 0 (device nr. 0) stream setup done.
gr::log :WARN: tpb_thread_body - asynchronous message buffer overflowing, dropping message
gr::log :WARN: tpb_thread_body - asynchronous message buffer overflowing, dropping message
libusb: warning [libusb_exit] application left some devices open

>>> Done

Hi!

I'm trying to send a file through a LimeSDR mini with a loopback cable using PSK modulation.


The gr-limesdr plugin only works with gnuradio 3.8, so I'm on that version.

OS is Linux Mint 20.2:
$ cat /proc/version
Linux version 5.11.0-37-generic (buildd@lcy01-amd64-021) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021

CPU: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz


The examples that I could find all used the deprecated packet encoder/decoder, so I set up to adapt the packet_loopback_hier example, which relies on packet_tx and packet_rx (documentation here https://www.gnuradio.org/doc/doxygen/page_packet_comms.html).

My flowgraph is here:

grc packet_loopback_hier.grc https://pastebin.com/w1cQxTLJ

screen capture packet_loopback_hier.png https://imgur.com/wccyfwC

(modified from https://github.com/gnuradio/gnuradio/blob/maint-3.8/gr-digital/examples/packet/packet_loopback_hier.grc).

The packet_tx and packet_rx are here:

packet_tx.grc https://pastebin.com/fhqQ1Y4n

packet_rx.grc https://pastebin.com/Zvr3x7vK

(these are exactly the ones from the repo https://github.com/gnuradio/gnuradio/blob/maint-3.8/gr-digital/examples/packet/packet_tx.grc https://github.com/gnuradio/gnuradio/blob/maint-3.8/gr-digital/examples/packet/packet_rx.grc).


At first, I removed the channel model and got it working with a file source and sink, albeit with some limitations:
The file needs to be "small" or I get a buffer overflow error (I'm using an ~8 KiB file, attached), and I had to pad the byte amount of the file to be an integer number of the packet_len, plus an additional full packet (I've attached the sample file that I'm using, input_file_padded.dat https://drive.google.com/file/d/1f3Os_okrn-d-DJrm0L1CyEKUxnOS_TDE/view?usp=sharing). These limitations don't bother me so I didn't look for the cause, I'm just mentioning them in case they are relevant.

Then I added the LimeSDR source and sink, but I don't get any data at the output of Packet Rx. Looking at the constellations at output out of Packet Tx (left) and the LimeSDR source (right) I get this (constellations.png https://imgur.com/a/vGz4sHO).

From what I could research, the left constellation isn't the four dots that I initially expected because of the RRC filter.
On the right constellation, I have no clue if what I'm seeing makes sense.


Before moving forward and investigating why the different blocks of Packet Rx aren't outputting anything, I'm trying to make sure that the received signal is correct.


I've also made a video of the flowgraph running (https://imgur.com/a/opY6dV9): on the first GUI sink from the left is the correlation estimator output, then the output of Packet Tx, LimeSDR source, and Packet Rx; and attached the console output (packet_loopback_hier.txt https://pastebin.com/r3ivn4eq).


Summarizing: Is the output of the LimeSDR source right or am I doing something wrong?


Thanks for taking the time to read my question!

Regards,
Paul

No comments:

Post a Comment