SoapySDR icon indicating copy to clipboard operation
SoapySDR copied to clipboard

Afedri SDR-Net support?

Open gvanem opened this issue 5 years ago • 7 comments
trafficstars

I had just purchased a 2nd hand Afedri SDR-Net box. This box has a USB-connector and an Ethernet connector.

I'm tinkering with the idea to implement a Soapy-driver for this Afedri box myself, but w/o really having a clue where to start. But using SoapyNetSDR as a boiler-plate is perhaps a start?

Or perhaps creating a local shim-process that fakes the NetSDR protocol is better?

Afedri also has a special network-discovery protocol described in sdr_disovery.cpp in the .zip at SDR Network Control Box x4 v5.21h - source code.

I'm not sure how that fits in with a SoapySDR::KwargsList find_afedriSDR(const SoapySDR::Kwargs &args).

gvanem avatar Aug 04 '20 15:08 gvanem

SoapyNetSDR can be a good boilerplate, especially because it manually implements some socket code. There is also a driver guide: https://github.com/pothosware/SoapySDR/wiki/DriverGuide

In regards to discovery, ideally there would be a way to discover devices on the network. And to return something identifiable for each device, like an address or serial number.

If not, you can do something like red pitaya, where the find function only discovers the device that is explicitly identified

  • https://github.com/pothosware/SoapyRedPitaya/blob/master/SoapyRedPitaya.cpp#L527

guruofquality avatar Aug 05 '20 13:08 guruofquality

In regards to discovery, ideally there would be a way to discover devices on the network. And to return something identifiable for each device, like an address or serial number.

And this could or should be cached in a file (or Windows Registry)? With minimal testing so far, this Afedri discovery protocol is not very reliable AFAICS.

I will look into how RedPitaya is coded.

gvanem avatar Aug 05 '20 18:08 gvanem

After creating a small test program for Afredi-SDR, it seems it's very similar to RFSPACE_SDR_IQ etc. So it would be much easier to extend SoapyNetSDR and radio_type with a AFREDI_SDR_NET value.

Edit: Seems there's no point in this issue. Since after building SoapyNetSDR and trying a SoapySDRUtil.exe --find="driver=netsdr", this will print:

Found device 0
  driver = netsdr
  label = RFspace NetSDR SN 31351F39
  name = AFEDRI-SDR
  netsdr = 10.0.0.50:50000
  serial = 31351F39

Which is 100% correct except for the RFSpace part.

gvanem avatar Aug 07 '20 13:08 gvanem

Closing as per above comment.

gvanem avatar Aug 07 '20 13:08 gvanem

But trying this netsdr module in CubicSDR, it seems broken. And also in SoapySDRUtil it behaves strangely. E.g.:

SoapySDRUtil.exe --make=driver=sdrplay
Make device driver=sdrplay
  driver=SDRplay
  hardware=RSP1A
  mir_sdr_api_version=2.130000
  mir_sdr_hw_version=255
  serial=1803049E94

finishes immediately. On the other hand a:

SoapySDRUtil.exe  --make=driver=netsdr
Make device driver=netsdr
Found Address 3200000a hostAddr 3200000a oneNeg ffffffff diff 3200000b
Using RFSPACE AFEDRI-SDR SN 31351F39 BOOT 1 FW 106 HW 5

hangs forever with both the TCP control-connection and UDP data-connection (port 50000) to my Afedri-SDR open. I've no idea what it's waiting for.

gvanem avatar Aug 23 '20 09:08 gvanem

https://www.moetronix.com/files/NetSdrInterfaceSpec105.pdf

2E0WKS avatar Feb 06 '22 21:02 2E0WKS

There is a new Soapy driver for AFEDRI SDR (Network only).

See here: https://github.com/alexander-sholohov/SoapyAfedri

nmaster2042 avatar Feb 11 '24 15:02 nmaster2042