Open gvanem opened 3 years ago
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
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.
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.
Closing as per above comment.
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.
There is a new Soapy driver for AFEDRI SDR (Network only).
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)
.