Due to life decisions that I am comfortable with , I use my SDRs over the network with my own goofball protocol.

Existing apt installable programs don't support it, so I figured it was high time to do what any normal person would do -- convincingly implement librtlsdr.so off my rust sdr codebase (sparky) and make it work without any other changes. Obviously.

https://k3xec.com/sparky-rtlsdr/

#hztools #radio #rf #sdr #rtl #rtlsdr #rust

@paul could i inquire about your reasons for a custom protocol, the advantages it has, and perhaps even which SDRs you use it with (besides the rtl-sdr)?

@laund Sure! The radios I use most often are Ettus (B210 and B200mini), HackRF, PlutoSDR, AirspyHF+ Discovery (and I don't use as often my LimeSDR or ADRV9364-Z7020 - although the latter I have plans for)

I don't like plugging stuff into my laptop (and like using them remotely when traveling). RTL-TCP is good, but it doesn't support things like many gain stages, transmitting, different iq formats - and it's hard for me to experiment (e.g., 4-channel beamforming, etc)

@laund I also mostly use riq on my 10GbE lan, so I can also get higher bandwidths, and network stacks tend to be more reliable/tolerant at high transfer than USB is. Mostly out of laziness :)

@laund the reason for my own IQ on disk format (rfcap) was to provide a lightweight way for me to not forget capture metadata (e.g., format, frequency, time) -- but still be streamable (vs things like raw iq misses the former and/or the grown-up SigMF project misses the latter-ish)

ARF is a bit more complex, but it allows me in-band coherent multi-channel IQ streams and coherent metadata (e.g., two coherent IQ streams with in-band GPS information, timing information) which has been really handy

@paul That does indeed sound incredibly useful. And thats a pretty sizeable collection of SDRs. I just have a single SDRPlay RSP1B, which i begrudgingly chose because it covers the widest range while having 14 bit accuracy at that pricepoint, tho in hindsight i should have valued open-source alignedness more than i did.

What sorts of devices do you use to connect the USB-only SDRs to your network? (feel free to point me at a relevant blog post, if one exists, i only briefly looked)

@laund Yeah, I have a SDRPlay RSP1B too, but didn't realize it didn't have a F/OSS driver when I bought it. I haven't had the time to RE it, but would love to add it!

As for serving -- I have some machines (running Debian) that have USB radios attached, that are running some sparky-based daemons (riqd). I've had to tune them a bit to get USB to behave (mostly buffers/scheduler/nice), but those servers are what I talk to remotely, which talk to specific radios. I'll post about that soon, I think

@laund The neat thing about doing it this way means I can use whatever to talk to my radios -- even an OpenBSD box -- which is really hard with normal USB based radios, since libusb and the obsd kernel's ehci/xhci drivers can be .... temperamental.
@laund just wanted to refresh my memory on what broke last time I tried getting libuhd working on OpenBSD -- dug up this post: https://marc.info/?l=openbsd-misc&m=168031384303433&w=2
'what tools exist to help a beginner debug a hung syscall?' - MARC

@paul I wouldn't even be that annoyed if their library actually controlled the device, but no, it talks to a daemon that has to be running which makes it an incredibly strange setup. I honestly have no idea how reverse engineering it could be done, mostly because I've never attempted something like that before.

Have you tried using a raspi as the intermediate? if you have, can you recommend it? I'm thinking of turning my rsp1b into a mobile setup that way

@laund

I have used rpis for this! They're good as long as you don't push load or drop power to the pi, it does well. I have one on my roof now

A lot of code out there even has some really great NEON SIMD code for pis. The 1B may be a bit old (and USBv2 only) -- but I think that's fine for an rtlsdr -- my 2c if you're looking for it would be to try rtl_tcp - its well supported, and an rtl-sdr at 2Msp/s is 32Mbps of transfer -- not a huge issue for even a 1B iirc. I'd love to hear any results!

@paul I was thinking a level higher: Run SDR++ server on it and use that, as it even runs on phones. Many of the decoders i'm interested in, like multimon-ng, can be hooked up to SDR++ with a network sink. In any case, sounds like my rpi 5 should be plenty powerful enough, and i'll keep rtl_tcp in mind. Tho i mostly run my rsp1b at 8-10Msp/s so i'l have to see.
@laund ah very cool! Great idea! Super interested to hear what you learn!