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

UHD examples not working #60

Open saki92 opened 8 months ago

saki92 commented 8 months ago

When I run the rx_ascii_art_dft uhd example, the spectrum is empty and the control keys don't respond. Also, I don't see any packets in tcpdump through the ethernet interface.

Is all the original UHD examples supported with the ANTSDR?

Edit:

It looks like I can't set sample rate higher than 29.5 Msps. If I set any sample rate <=29.5 Msps I can see the spectrum.

To reproduce:

Working:

/usr/local/lib/uhd/examples/rx_ascii_art_dft --args "addr=192.168.1.10" --rate 29500000 --freq 2400000000 --gain 0. Following is the terminal output and screen shot of the spectrum

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

Setting RX Rate: 29.500000 Msps...
[INFO] [ANT] Asking for clock rate 29.500000 MHz... 
[INFO] [ANT] Actually got clock rate 29.500000 MHz.
Actual RX Rate: 29.500000 Msps...

Setting RX Freq: 2400.000000 MHz...
Actual RX Freq: 2400.000000 MHz...

Setting RX Gain: 0.000000 dB...
Actual RX Gain: 0.000000 dB...

Checking RX: LO: locked ...

Done!

working

Not working:

/usr/local/lib/uhd/examples/rx_ascii_art_dft --args "addr=192.168.1.10" --rate 29600000 --freq 2400000000 --gain 0.

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

Setting RX Rate: 29.600000 Msps...
[INFO] [ANT] Asking for clock rate 29.600000 MHz... 
[INFO] [ANT] Actually got clock rate 29.600000 MHz.
[INFO] [ANT] Asking for clock rate 29.600000 MHz... 
[INFO] [ANT] OK
Actual RX Rate: 29.600000 Msps...

Setting RX Freq: 2400.000000 MHz...
Actual RX Freq: 2400.000000 MHz...

Setting RX Gain: 0.000000 dB...
Actual RX Gain: 0.000000 dB...

Checking RX: LO: locked ...
[INFO] [ANT] Asking for clock rate 29.600000 MHz... 
[INFO] [ANT] OK
[INFO] [ANT] Asking for clock rate 29.600000 MHz... 
[INFO] [ANT] OK

notworking

black-pigeon commented 8 months ago

Hi, When you set the sampling rate to be greater than 29.5 MSPS, the network speed reaches its limit at 118 MB/s. This is due to the current continuous streaming mode of UHD, which may result in dropped data packets. If you implement your own data reception using code and use the STREAM_MODE_NUM_SAMPS_AND_DONE mode, you can achieve non-continuous sampling. For example, at a sampling rate of 56 MSPS, you can sample 1024 points, which can be continuous.