I find myself in the context of a recently acquired KrakenSDR (via Crowd Supply), and I’m attempting to setup the DOA solution.
The purpose of this thread is to describe a situation where running ‘heimdall_daq_fw/Firmware/daq_start_sm.sh’ shows that ‘_daq_core/rtl_daq.out’ returns very soon and reports that it has failed to open device, resource is unavailable.
More Information Below, thanks.
The setup is as follows:
- 1 KrakenSDR connected to five antennas, “POWER” connected to a 4A-capable USB-C source and “DATA” connected to the USB(most probably 3, maybe 2) port of a Raspberry Pi 4B.
- The Raspberry Pi4B is powered via the USB-C port to a 300mA-capable power source
- The Raspberry Pi 4B has an SD Card with the minimal Raspberry 64-bit image (uname -r outputs “6.1.0-rpi8-rpi-v8”) and 8GB RAM.
The installation has been done by running ‘krakensdr_aarch64_install_doa.sh’ twice.
The first time I probably missed some errors, the second time somehow the conda environment was left very well installed/configured, but the following actions were taken.
Manually install what in GitHub - krakenrf/krakensdr_doa are called the prerequisites - I was just checking if they were there and I found they were not.
sudo apt -y install nodejs jq rustc cargo
cargo install miniserve
In particular rustc from apt was at version 1.63 and some dependency required >=1.65 so it was installed from the official installer script which used version 1.76.0.
When “making” _daq_core some file (I believe it was rtl_daq.c) was importing “rtl-sdr_export.h” unsuccessfully, therefore I opened the Makefile and
2.1) Uncommented the optimization flags for Pi 4, the line is as follows
CFLAGS=-Wall -std=gnu99 -mcpu=cortex-a72 -mtune=cortex-a72 -Ofast -funsafe-math-optimizations -I/home/myusername/krakensdr_doa/heimdall_daq_fw/Firmware/_daq_core -funroll-loops
2.2) Please note in the line above that I have added in the includes the _daq_core path so that the headers are found. That’s all!
After running ‘kraken_doa_start.sh’
The server on port 8081 seems to be working O.K.
The server on port 8080 is not listening, but I understand there is probably some blocking event that has not been completed yet. This is why I focused on the Firmware section:
Manually running ‘sudo env “PATH=$PATH” ./Firmware/daq_start_sm.sh’ after having activated the conda environment obviously allows us to focus on only producing firmware-related logs.
The relevant unit that seems to be failing is called ‘rtl_daq.out’ and it produces the following log:
13:13:54 FATAL rtl_daq.c:566: Failed to open RTL-SDR device: Resource temporarily unavailable
- Balena etching the raspi4 image provided on the Mega repository yielded a system that was never registering to my KrakenAndroid/KrakenAndroid mobile hotspot
- My memory is not the best on this, but I’m pretty confident that ‘daq_synthetic_start.sh’ works O.K. and ‘unit_test.sh’ reports its own problems. Should I update on this point?
- also please note that ‘lsusb’ does not display a new line after connecting KrakenSDR’s data port - this was tested on both the Raspberry Pi 4B device and a laptop with Ubuntu 20 installed. On the other hand, other USB devices were plugged to the Raspberry pi 4B to confirm the USB port is working O.K.
- The cable used is data-capable
- I am aware of the warning posted on Script/manual installs from May 3 may have been buggy on ARM devices, the md5sum of the krakensdr_aarch64_install_doa.sh used is f0c8453bbf934a168e226e8729b33488. I will soon check if it’s the latest one or not, thanks.
In a couple of days, if nothing concrete is obtained from this discussion, I will rebuild manually from source on a flashed card to better pinpoint what is the issue.
Thank you all for your time