additional OS requirements dependencies:
sudo apt install sphinx-basic-ng, furo
libiio needs to be installed from the libiio-v0 branch, and not the master one.
Otherwise the libad9361 won't build.
non-blocking (but annoying) error during make in libad9361-iio, python-binding:
WARNING: autodoc: failed to import module 'ad9361'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc/importer.py", line 69, in import_module
return importlib.import_module(modname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "~/src/libad9361-iio/bindings/python/ad9361.py", line 88, in <module>
_ad9361_multichip_sync = _lib.ad9361_multichip_sync
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/ctypes/__init__.py", line 392, in __getattr__
func = self.__getitem__(name)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/ctypes/__init__.py", line 397, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: /usr/bin/python3: undefined symbol: ad9361_multichip_sync
It seems the libad9361.so is not yet build when make tries to build the Python bindings at first iteration, hence we need to run make twice. The Python bindings will build on the 2nd run.
some non-blocking errors regarding docstrings remain however:
~/src/libad9361-iio/bindings/python/ad9361.py:docstring of ad9361.fmcomms5_multichip_sync:1: WARNING: py:class reference target not found: iio.Context
~/src/libad9361-iio/bindings/python/ad9361.py:docstring of ad9361.fmcomms5_multichip_sync:1: WARNING: py:class reference target not found: iio.Context
~/src/libad9361-iio/bindings/python/ad9361.py:docstring of ad9361.fmcomms5_phase_sync:1: WARNING: py:class reference target not found: iio.Context
~/src/libad9361-iio/bindings/python/ad9361.py:docstring of ad9361.fmcomms5_phase_sync:1: WARNING: py:class reference target not found: iio.Context
~/src/libad9361-iio/bindings/python/ad9361.py:docstring of ad9361.get_trx_fir_enable:1: WARNING: py:class reference target not found: iio.Device
~/src/libad9361-iio/bindings/python/ad9361.py:docstring of ad9361.multichip_sync:1: WARNING: py:class reference target not found: iio.Device
~/src/libad9361-iio/bindings/python/ad9361.py:docstring of ad9361.multichip_sync:1: WARNING: py:class reference target not found: iio.Device
~/src/libad9361-iio/bindings/python/ad9361.py:docstring of ad9361.set_bb_rate:1: WARNING: py:class reference target not found: iio.Device
~/src/libad9361-iio/bindings/python/ad9361.py:docstring of ad9361.set_bb_rate_custom_filter_auto:1: WARNING: py:class reference target not found: iio.Device
~/src/libad9361-iio/bindings/python/ad9361.py:docstring of ad9361.set_bb_rate_custom_filter_manual:1: WARNING: py:class reference target not found: iio.Device
~/src/libad9361-iio/bindings/python/ad9361.py:docstring of ad9361.set_trx_fir_enable:1: WARNING: py:class reference target not found: iio.Device
The IIO driver seems to be working OK afterward.
2) UHD based firmware
error compiling UHD host driver:
Need to declare #include <cstdint> in:
~/src/antsdr_uhd/host/include/uhd/cal/database.hpp
~/src/antsdr_uhd/host/include/uhd/rfnoc/defaults.hpp
~/src/antsdr_uhd/host/lib/usrp/dboard/magnesium/magnesium_constants.hpp
Need to declare #include <boost/math/special_functions/sign.hpp> in:
~/src/antsdr_uhd/host/lib/usrp/cores/rx_dsp_core_3000.cpp
~/src/antsdr_uhd/host/lib/usrp/cores/rx_frontend_core_3000.cpp
~/src/antsdr_uhd/host/lib/usrp/cores/dsp_core_utils.cpp
Need to declare #include <array> in:
~/src/antsdr_uhd/host/lib/usrp/common/lmx2592.cpp
Need to declare #include <complex> in:
~/src/antsdr_uhd/host/test/tx_streamer_test.cpp
All the UHD calibration routines are leading to a similar error as this:
$ uhd_cal_tx_dc_offset
Creating the usrp device with: ,ignore_cal_file=1,ignore-cal-file=1...
[INFO] [UHD] linux; GNU C++ version 13.2.0; Boost_108300; UHD_4.1.0.0-0-9abe8bc8
[INFO] [ANT] Detected Device: ANTSDR
[INFO] [ANT] Initialize CODEC control...
[INFO] [ANT] Initialize Radio control...
[INFO] [ANT] Performing register loopback test...
[INFO] [ANT] Register loopback test passed
[INFO] [ANT] Performing register loopback test...
[INFO] [ANT] Register loopback test passed
[INFO] [ANT] Setting master clock rate selection to 'automatic'.
[INFO] [ANT] Asking for clock rate 16.000000 MHz...
[INFO] [ANT] Actually got clock rate 16.000000 MHz.
Running calibration for FE-TX1
Daughterboard serial:
Error: This board does not have the CAL antenna option, cannot self-calibrate.
Here is an attempt with uhd_fft:
$ uhd_fft -a "type=ant,addr=192.168.1.10" -s 10M -f 2.4G
QSocketNotifier: Can only be used with threads started with QThread
[INFO] [UHD] linux; GNU C++ version 13.2.0; Boost_108300; UHD_4.6.0.0+ds1-5.1build4
Traceback (most recent call last):
File "/usr/bin/uhd_fft", line 627, in <module>
main()
File "/usr/bin/uhd_fft", line 608, in main
top_block = uhd_fft(args)
^^^^^^^^^^^^^
File "/usr/bin/uhd_fft", line 138, in __init__
self.setup_usrp(uhd.usrp_source, args)
File "/usr/lib/python3/dist-packages/gnuradio/uhd/uhd_app.py", line 149, in setup_usrp
self.usrp = ctor(
^^^^^
RuntimeError: LookupError: KeyError: No devices found for ----->
Device Address:
type: ant
addr: 192.168.1.10
Benchmarking the Ethernet link is fine, up to 20Msps:
$ ./benchmark_rate --args "type=ant,addr=192.168.1.10" --duration=10 --rx_rate 20000000 --tx_rate 20000000
[INFO] [UHD] linux; GNU C++ version 13.2.0; Boost_108300; UHD_4.1.0.0-0-9abe8bc8
[00:00:00.002934] Creating the usrp device with: type=ant,addr=192.168.1.10...
[INFO] [ANT] Detected Device: ANTSDR
[INFO] [ANT] Initialize CODEC control...
[INFO] [ANT] Initialize Radio control...
[INFO] [ANT] Performing register loopback test...
[INFO] [ANT] Register loopback test passed
[INFO] [ANT] Performing register loopback test...
[INFO] [ANT] Register loopback test passed
[INFO] [ANT] Setting master clock rate selection to 'automatic'.
[INFO] [ANT] Asking for clock rate 16.000000 MHz...
[INFO] [ANT] Actually got clock rate 16.000000 MHz.
Using Device: Single USRP:
Device: B-Series Device
Mboard 0: B210
RX Channel: 0
RX DSP: 0
RX Dboard: A
RX Subdev: FE-RX1
RX Channel: 1
RX DSP: 1
RX Dboard: A
RX Subdev: FE-RX2
TX Channel: 0
TX DSP: 0
TX Dboard: A
TX Subdev: FE-TX1
TX Channel: 1
TX DSP: 1
TX Dboard: A
TX Subdev: FE-TX2
[00:00:01.25434459] Setting device timestamp to 0...
[INFO] [ANT] Asking for clock rate 20.000000 MHz...
[INFO] [ANT] Actually got clock rate 20.000000 MHz.
[00:00:01.497791405] Testing receive rate 20.000000 Msps on 1 channels
Setting TX spp to 364
[00:00:01.521816999] Testing transmit rate 20.000000 Msps on 1 channels
[00:00:11.984896350] Benchmark complete.
Benchmark rate summary:
Num received samples: 205479536
Num dropped samples: 0
Num overruns detected: 0
Num transmitted samples: 205235212
Num sequence errors (Tx): 0
Num sequence errors (Rx): 0
Num underruns detected: 0
Num late commands: 0
Num timeouts (Tx): 0
Num timeouts (Rx): 0
Done!
Testing for UHD control messages shows all of them are failing, except the late command ones:
./test_messages --args "type=ant,addr=192.168.1.10"
Creating the usrp device with: type=ant,addr=192.168.1.10...
[INFO] [UHD] linux; GNU C++ version 13.2.0; Boost_108300; UHD_4.1.0.0-0-9abe8bc8
[INFO] [ANT] Detected Device: ANTSDR
[INFO] [ANT] Initialize CODEC control...
[INFO] [ANT] Initialize Radio control...
[INFO] [ANT] Performing register loopback test...
[INFO] [ANT] Register loopback test passed
[INFO] [ANT] Performing register loopback test...
[INFO] [ANT] Register loopback test passed
[INFO] [ANT] Setting master clock rate selection to 'automatic'.
[INFO] [ANT] Asking for clock rate 16.000000 MHz...
[INFO] [ANT] Actually got clock rate 16.000000 MHz.
Using Device: Single USRP:
Device: B-Series Device
Mboard 0: B210
RX Channel: 0
RX DSP: 0
RX Dboard: A
RX Subdev: FE-RX1
RX Channel: 1
RX DSP: 1
RX Dboard: A
RX Subdev: FE-RX2
TX Channel: 0
TX DSP: 0
TX Dboard: A
TX Subdev: FE-TX1
TX Channel: 1
TX DSP: 1
TX Dboard: A
TX Subdev: FE-TX2
[INFO] [ANT] Asking for clock rate 32.000000 MHz...
[INFO] [ANT] Actually got clock rate 32.000000 MHz.
Test time error message... failed:
Async message recv timed out.
Test underflow message... Ufailed:
Async message recv timed out.
Test burst ack message... failed:
Async message recv timed out.
Test underflow message... Ufailed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test late command message... success:
Got error code late command message.
Test underflow message... Ufailed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test late command message... success:
Got error code late command message.
Test late command message... success:
Got error code late command message.
Test late command message... success:
Got error code late command message.
Test late command message... success:
Got error code late command message.
Test late command message... success:
Got error code late command message.
Test late command message... success:
Got error code late command message.
Test late command message... success:
Got error code late command message.
Test time error message... Lfailed:
Async message recv timed out.
Test underflow message... Ufailed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test late command message... success:
Got error code late command message.
Test burst ack message... failed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test burst ack message... failed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test late command message... success:
Got error code late command message.
Test late command message... success:
Got error code late command message.
Test burst ack message... failed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test underflow message... Ufailed:
Async message recv timed out.
Test burst ack message... failed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test burst ack message... failed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test underflow message... Ufailed:
Async message recv timed out.
Test burst ack message... failed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test underflow message... Ufailed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test underflow message... Ufailed:
Async message recv timed out.
Test burst ack message... failed:
Async message recv timed out.
Test underflow message... Ufailed:
Async message recv timed out.
Test burst ack message... failed:
Async message recv timed out.
Test burst ack message... failed:
Async message recv timed out.
Test late command message... success:
Got error code late command message.
Test underflow message... Ufailed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Test time error message... Lfailed:
Async message recv timed out.
Summary:
Test Burst ACK -> 0 successes, 10 failures
Test Underflow -> 0 successes, 10 failures
Test Time Error -> 0 successes, 18 failures
Test Late Command -> 12 successes, 0 failures
Done!
Finally, it seems no signal is received when testing with:
There is nothing over -80dB, while a WiFi antenna is on the RX port and I believe some signals should appear.
4) Testing with radio applications
ICE9 Bluetooth Sniffer (compiled from source): application launches OK, but no packets are captured.
SDRAngel (installed from snap 2024/05/22): does not find the device, whatever args are passed.
osmocom_fft (installed from apt): does not find the device, whatever args are passed.
One of the main issue seems to be the kind of arguments that need to be passed, e.g. -a "driver=uhd,type=ant,addr=192.168.1.10,..."
It seems the device in UHD mode is not recognized by most of the SDR applications.
Here is my adventure in trying to make my ant-sdr work. date: 2024/06/06 OS: Ubuntu 24.04 Following: https://antsdr-docs.microphase.cn/en/latest/device_and_usage_manual/E200_Getting_Started_Guide.html
1) IIO based firmware
additional OS requirements dependencies: sudo apt install sphinx-basic-ng, furo
libiio needs to be installed from the libiio-v0 branch, and not the master one. Otherwise the libad9361 won't build.
non-blocking (but annoying) error during make in libad9361-iio, python-binding:
It seems the libad9361.so is not yet build when
make
tries to build the Python bindings at first iteration, hence we need to runmake
twice. The Python bindings will build on the 2nd run.The IIO driver seems to be working OK afterward.
2) UHD based firmware
Need to declare
#include <cstdint>
in: ~/src/antsdr_uhd/host/include/uhd/cal/database.hpp ~/src/antsdr_uhd/host/include/uhd/rfnoc/defaults.hpp ~/src/antsdr_uhd/host/lib/usrp/dboard/magnesium/magnesium_constants.hppNeed to declare
#include <boost/math/special_functions/sign.hpp>
in: ~/src/antsdr_uhd/host/lib/usrp/cores/rx_dsp_core_3000.cpp ~/src/antsdr_uhd/host/lib/usrp/cores/rx_frontend_core_3000.cpp ~/src/antsdr_uhd/host/lib/usrp/cores/dsp_core_utils.cppNeed to declare
#include <array>
in: ~/src/antsdr_uhd/host/lib/usrp/common/lmx2592.cppNeed to declare
#include <complex>
in: ~/src/antsdr_uhd/host/test/tx_streamer_test.cppThe UHD driver seems to be working OK afterward.
3) Testing the UHD mode with Ettus tools
The device radio front-end is recognized:
All the UHD calibration routines are leading to a similar error as this:
Here is an attempt with uhd_fft:
Benchmarking the Ethernet link is fine, up to 20Msps:
Testing for UHD control messages shows all of them are failing, except the
late command
ones:Finally, it seems no signal is received when testing with:
There is nothing over -80dB, while a WiFi antenna is on the RX port and I believe some signals should appear.
4) Testing with radio applications
One of the main issue seems to be the kind of arguments that need to be passed, e.g. -a "driver=uhd,type=ant,addr=192.168.1.10,..." It seems the device in UHD mode is not recognized by most of the SDR applications.