Archive | SDR RSS feed for this section

Sceptre Tips

22 Dec

X300 MTU
Note that the USRP X300 has both 1G and 10G interfaces. Sceptre will find both IP during USRP configuration. Delete the IP for the 1G interface as UHD will query both and use the lower of the two MTU to set the frame size, possibly resulting in lower performance.

DVR RAM Disk
Using the DVR with high sample rates can chew through an SSD. Make a RAM filesystem and use that for the DVR. If the system has 128 GB RAM then 96 GB is appropriate for DVR use, which will give a 90 second DVR at 200 Msps.

Create a RAM disk in Linux



free -g
sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o size=96G tmpfs /mnt/ramdisk
chmod 777 /mnt/ramdisk/
df -h /mnt/ramdisk/

Sceptre on Xubuntu

10 Dec

sudo apt-get install libqt5x11extras5

sudo apt-get install –reinstall libxcb-xinerama0

sudo apt-get install python2

Sceptre on Fedora 36

17 Sep

https://github.com/unicode-org/icu/releases/download/release-70-1/icu4c-70_1-src.tgz
sudo dnf install bzip2-devel
sudo ln -s /usr/lib64/libbz2.so.1.0.8 /usr/lib64/libbz2.so.1.0
sudo dnf install python2.7

Setting up Ettus USRP X300

18 Dec

https://kb.ettus.com/USRP_Host_Performance_Tuning_Tips_and_Tricks
https://files.ettus.com/manual/page_usrp_x3x0.html
https://files.ettus.com/manual/page_transport.html

Increase Socket Buffers
sudo vi /etc/sysctl.conf
# Increase buffers for USRP
net.core.wmem_max=100000000
net.core.rmem_max=100000000
net.core.wmem_default=100000000
net.core.rmem_default=100000000

Realtime Priority
sudo vi /etc/security/limits.conf
# Add for USRP realtime priority
myusername - rtprio 99

Will require re-login

Adjust Ethernet MTU
9000

Note intervening switches need jumbo frames enabled.

Set CPU Performance
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Change GRUB
sudo vi /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="pti=off spectre_v2=off l1tf=off nospec_store_bypass_disable no_stf_barrier"
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Updating Firmware and FPGA
uhd_usrp_probe --args "addr=192.168.1.13"
sudo /usr/local/lib64/uhd/utils/uhd_images_downloader.py
/usr/local/bin/uhd_image_loader --args="type=x300,addr=192.168.1.13"

Cycle power on the USRP

Benchmark
cd /usr/local/lib64/uhd/examples
./benchmark_rate --rx_rate 100E6 --tx_rate 100E6 --args "addr=192.168.1.13"

Setting up the Airspy R2

4 Jun

https://github.com/airspy/airspyone_host

Add udev Rules
sudo vi /etc/udev/rules.d/99-airspy.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="60a1", MODE:="0666"
sudo udevadm control --reload-rules

CMakeLists.txt for dial_tone.cc

30 May

If you want to compile dial_tone.cc outside of either the GR source tree or OOT module, this is the minimum required CMakeLists.txt (courtesy of Johnathan Corgan)

https://github.com/gnuradio/gnuradio/blob/64a702e19d1e8e1b948e6ef76e98dff41837bb92/gr-audio/examples/c%2B%2B/dial_tone.cc


cmake_minimum_required(VERSION 2.6)
project(dialtone CXX)

find_package(Boost "1.35" COMPONENTS system)
set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG AUDIO)
find_package(Gnuradio "3.7.2" REQUIRED)

include_directories(${GNURADIO_ALL_INCLUDE_DIRS})

add_executable(dialtone dial_tone.cc)
target_link_libraries(dialtone ${Boost_LIBRARIES} ${GNURADIO_ALL_LIBRARIES})

Setting up the Ettus USRP E310

29 Jun

Add udev Rules for E310 Serial Console
sudo vi /etc/udev/rules.d/99-usrp-e310.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", MODE:="0666"
sudo udevadm control --reload-rules

Serial Console Login
Plug in power and wait a few seconds for E310 to boot, then plug in microUSB.
dmesg to figure out the assigned serial port (i.e. /dev/ttyUSB4)
screen /dev/ttyUSB4 115200
Login as root

Setting Static IP
vi /etc/network/interfaces
# Wired or wireless interfaces
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.14
netmask 255.255.255.0
gateway 192.168.1.1
iface eth1 inet dhcp


/etc/init.d/networking stop

GQRX Tips

21 Dec

Pulse Audio
Prior to installation of gqrx make sure pulseaudio is available during build by installing the following:
pavucontrol
pavumeter
pulseaudio-libs-devel

Install gqrx
git clone https://github.com/csete/gqrx.git
cd gqrx
mkdir build
cd build
qmake-qt5 ..
make -j8
sudo make install

Typical device strings
For the b200:
uhd,type=b200,nchan=1

For the X310 with LFRX in slot 2:
uhd,addr=192.168.1.13,subdev=B:A,nchan=1

For the X310 with WBX in slot 1:
uhd,addr=192.168.1.13,nchan=1

For the N210 with LFRX:
uhd,addr=192.168.1.11,subdev=A:A,nchan=1

When switching between devices in gqrx the gain control changes will segfault the application.  Fix this by deleting the “gains” section in:
~/.config/gqrx/default.conf

Sending gqrx audio to fldigi
Install fldigi with yum

Configure fldigi sound card to use pulseaudio, leaving server string empty

Launch pulseaudio volume control, and under recording tab, fldigi capture from monitor of built-in audio analog stereo, and set level to 0 dB.

Adjust fldigi waterfall upper signal level and signal range.

Sending gqrx audio to UDP

Streaming audio over UDP

Configure the network settings in the Network tab of the audio settings window:
UDP host: localhost
UDP port: 7355

Verify the data is coming through at the opposite end using netcat:
nc -l -u 7355
nc -l -u localhost 7355
nc -l -u 127.0.0.1 7355

Pipe the output of netcat to other applications.
The following example will send the audio to the ALSA player application:
nc -l -u 7355 | aplay -r 48k -f S16_LE -t raw -c 1

The following command line will re-sample the raw audio to 22.05 kHz and send it to multimon-ng and decode POCSAG data (thanks to André Schmelzer for this):
nc -l -u 7355 | \
sox -t raw -esigned-integer -b16 -r 48000 - -esigned-integer -b16 -r 22050 -t raw - | \
multimon-ng -t raw -a SCOPE -a POCSAG512 -a POCSAG1200 -a POCSAG2400 -f alpha -

Setting up the Ettus USRP B200

10 Jun

Add udev Rules
sudo vi /etc/udev/rules.d/99-usrp-b200.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0020", MODE:="0666"
sudo udevadm control --reload-rules

Realtime Priority
sudo vi /etc/security/limits.conf
# Add for USRP realtime priority
myusername – rtprio 99

Will require re-login

Update Firmware
sudo /usr/local/lib64/uhd/utils/uhd_images_downloader.py

Probe
uhd_find_devices --args="type=b200"

Benchmark
cd /usr/local/lib64/uhd/examples
./benchmark_rate --rx_rate 60E6 --args "type=b200, master_clock_rate=60E6"

Baudline Tips

20 Apr

Install extra Fedora fonts
sudo yum install xorg-x11-fonts-misc
sudo yum install xorg-x11-fonts-ISO8859-1-75dpi

Reading data file from GNU Radio
GNU Radio file sink with input type complex writes IEEE 754 single-precision floats:
f = scipy.fromfile(open("filename"), dtype=scipy.complex64)

Baudline file raw parameters
Decompression: OFF
Initial byte offset: 0
Sample Rate: custom
Channels: 2
Quadrature: ON
Flip Complex: ON
Decode Format: 32 bit float, little endian
Normalization: 1 maximum sample value