MicroPhase / antsdr_uhd

This repo contains both the uhd host driver and firmware for microphase antsdr devices.
GNU General Public License v3.0
46 stars 30 forks source link

No UHD devices found #56

Open simransaxena08 opened 8 months ago

simransaxena08 commented 8 months ago

Hello, recently purchased an ANTADR E200 and have been facing issues with establishing a communication between the SDR and the host computer. We have successfully built the host UHD firmware on the host computer. The SDR Fat 32 SD card came preloaded with the UHD firmware and we have been trying to work with the same. However, the computer returns "No devices found" for commands: uhd_find_devices and uhd_usrp_probe. The computer sees the SDR as a USB device- Bus 001 Device 006: ID 1a86:7523 QinHeng Electronics CH340 serial converter.

The SDR boots up and has the red light blinking as well.

The host computer runs the following OS- Distributor ID: Ubuntu Description: DragonOS FocalX R31 Release: 22.04 Codename: jammy

Kernel Information: Linux dragon 6.2.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

lone-boy commented 8 months ago

The dragonos system you are using, I think the e200 can support this system. Can you check whether the network is connected?

simransaxena08 commented 8 months ago

Hello, yes, seems like the network in connected. I am able to ping 192.168.1.10 but still no uhd devices found.

The dragonos system you are using, I think the e200 can support this system. Can you check whether the network is connected?

uptools commented 8 months ago

Same issue here. We can login to E200 console and even connect using ssh to E200 via the ethernet ifce, but uhd_find_devices cannot find the E200. When we check using tcpdump, we see that the E200 is not answering the packages sent by uhd_find_devices. It looks as the OS image contained in the included SD card has no uhd client. Any clues?

lone-boy commented 8 months ago

Please check the following boot modes. The uhd firmware is boot from SD. You need to move the DIP switch to SD boot. If everything goes well, the username and password to enter the uhd firmware is root:microphase. If everything goes well, you can check whether the network is connected through the host, ping 192.168.1.10. Before doing this, you need to set the host IP to 192.168.1.xx. If you can ping successfully, you can install the antsdr_uhd driver on the host. After everything is completed Run uhd_find_devices. Hope this helps you

uptools commented 8 months ago

Thank @lone-boy ! We can now connect from a Linux host to the E200:

# uhd_find_devices 
[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; UHD_4.1.0.0-38-g84372477
--------------------------------------------------
-- UHD Device 0
--------------------------------------------------
Device Address:
    serial: F5B1D172CA34935BFB4703304F4E7CB0
    addr: 192.168.1.10
    name: ANTSDR-E200
    product: E200  v1
    type: ant

But when we try to do the same from the embedded Linux in the E200, the udh_find_devices fail to detect the local device. For this we had to compile and install the antsdr_uhd driver and utils within the buildroot environment, and then we execute from the embedded Linux:


# uhd_find_devices 
[INFO] [UHD] linux; GNU C++ version 12.3.0; Boost_108200; UHD_4.3.0.0-275-g177170f4
No UHD Devices Found[ERROR] [UHD] Device discovery error: AssertionError: libusb_init(&_context) == 0
  in libusb_session_impl
  at /home/dertis25/projects/buildroot/output/build/uhd-4.3.0.0/host/lib/transport/libusb1_base.cpp:37

# uhd_find_devices --args serial=F5B1D172CA34935BFB4703304F4E7CB0
[INFO] [UHD] linux; GNU C++ version 12.3.0; Boost_108200; UHD_4.3.0.0-275-g177170f4
No UHD Devices Found[ERROR] [UHD] Device discovery error: AssertionError: libusb_init(&_context) == 0
  in libusb_session_impl
  at /home/dertis25/projects/buildroot/output/build/uhd-4.3.0.0/host/lib/transport/libusb1_base.cpp:37

# uhd_find_devices --args addr=192.168.1.10
No UHD Devices Found

Did anyone succeed in accessing the UHD device from the embedded Linux?

simransaxena08 commented 7 months ago

@lone-boy thanks for the help so far! I was able to get the sdr working with DragonOS. However, I was trying to make srsenb and srsepc work with antsdr e200 and ever since I am unable to find the uhd device on my host computer. I can ping 192.168.1.10, i can ssh into it as well, but unable to find it anymore. Any thoughts?

lone-boy commented 5 months ago

The native UHD driver of ettus you use needs to use the uhd driver in this repository.

nitinvjain commented 4 months ago

Hi @lone-boy , @simransaxena08

I got antsdr E200 a few weeks back. I don't have ethernet port in my machine and I am using a USB 3 to ethernet (1000 Mb/s)

converter to connect AntSDR. I built antsdr_uhd from source as per instructions.

I am unable to detect it using _uhd_finddevices though I can ping it and ssh also (root/microphase)also in SD boot

mode. I am using ubuntu 22.04 LTS by reaching out 192.168.1.10 Also I am keeping DIP switch to SD boot mode.

Above proves that SDR has got alloted right IP of 192.168.1.10 and it is up as such.

Below is the response when using _uhd_finddevices command

./uhd_find_devices --args addr=192.168.1.10 [INFO] [UHD] linux; GNU C++ version 11.2.0; Boost_107400; UHD_4.1.0.5-3 No UHD Devices Found

I am also attaching file which contains output when I run uhd_find_devices 4 times and logging using tcpdump: sudo tcpdump -i enxc84d4429dc85 -vv > ~/eth_traffic_sdr_addr.txt

It appears that AntSDR is not responding to UDP packet sent by host program (uhd_find_devices).

Any tips on solutions on how to solve it, please.

eth_traffic_sdr_addr.txt

gettyhub commented 1 month ago

It seems ant doesn't work without installing the uhd host drivers. Generic uhd doesn't seem to work even though iio_info might give details if I specify IP address. Iio will also list cpu thermal sensors. It will compile on Ubuntu which is what dragonOS is based on. Ubuntu like Debian doesn't always use the latest version, so other distributions seem to fail when compiling the host driver. I tried on raspbian which is also Debian based, but it didn't compile, have to check it for everything installed that it may need. (It is architecture mismatch won't build on armhf).

Compiled under Ubuntu it still complains about bandwidth out of range limiting it to 0.2MHz or something like that under gqrx. (After setting sample rate, bandwidth had to be set separately). Strangely, uhd_find_devices will show other sdrs connected. Ones I didn't think were considered uhd.

simransaxena08 commented 2 weeks ago

Hello, I noticed that whenever I run uhd_usrp_probe, it runs fine once and soon after it keeps throwing this error to me:

[INFO] [UHD] linux; GNU C++ version 11.4.0; Boost_107400; 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...

[ERROR] [UHD] Exception caught in safe-call. in virtual radio_ctrl_core_3000_impl::~radio_ctrl_core_3000_impl() at /home/arpad/antsdr_uhd/host/lib/usrp/cores/radio_ctrl_core_3000.cpp:66 this->peek32(0); _async_task.reset(); -> EnvironmentError: IOError: Radio ctrl (0) packet parse error - AssertionError: packet_info.packet_count == (seq_to_ack & 0xfff) in uint64_t radio_ctrl_core_3000_impl::wait_for_ack(bool) at /home/arpad/antsdr_uhd/host/lib/usrp/cores/radio_ctrl_core_3000.cpp:261

Error: EnvironmentError: IOError: Radio ctrl (0) packet parse error - AssertionError: packet_info.packet_count == (seq_to_ack & 0xfff) in uint64_t radio_ctrl_core_3000_impl::wait_for_ack(bool) at /home/arpad/antsdr_uhd/host/lib/usrp/cores/radio_ctrl_core_3000.cpp:261

Can someone please explain to me what this means and a workaround this? Even when I try to run uhd_usrp_probe --args="recv_frame_size=64,send_frame_size=64" I run into the same error. With every system reboot, the error goes away but during the second or third run comes back.

The uhd_find_devices command works fine. I am also successfully able to log into the device.

Here are some details about my system and the setup:

Distributor ID: Ubuntu Description: Ubuntu 22.04.4 LTS Release: 22.04 Codename: jammy Linux xxx 5.15.0-112-generic #122-Ubuntu SMP Thu May 23 07:48:21 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

The antsdr e200 is connected through the ethernet interface with a speed of 1000Mb/s.

Thank you!

Simran Saxena || Lead Network Engineer

+1 213 551 3401 <+1+213+551+3401> || @.***

[image: Beamlink Logo] https://beamlink.io

6060 Center Drive, Suite 1000

Los Angeles, CA 90045, USA

beamlink.io

[image: LinkedIn] https://linkedin.com/company/beamlink[image: Twitter] https://twitter.com/beamlinkio[image: Instagram] https://www.instagram.com/beamlink.io/