Chan_usrp & GNU Radio

Edit: I was able to figure this out through some trial and error. I’ll post an update soon.

Has anyone been successful in using a GNU Radio USRP Sink/Source block to connect to AllStar via chan_usrp? I’m running into some issues.

GNU Radio doesn’t let you specify the port for the USRP block, so it defaults to whatever the UHD USRP library is set to. If I manually set that port in ASL, it does attempt to connect, but it gives a bad packet error from chan_usrp:

[Mar 25 18:15:48] NOTICE[18154] chan_usrp.c: Received packet length 16 too short
[Mar 25 18:16:01] NOTICE[18154] chan_usrp.c: Received packet from with invalid data

I was thinking about taking the following approach and just sending the data back to another Python script, but it seems a bit silly to have to do that:

Basically, it just receives and sends data over a local TCP socket so you can pipe the desired data to and from GNU radio. This approach WILL work from what I can tell, but it seems… dirty to me I guess. Lol.

Here’s the gist of the program I’m writing. I’m stripping down the code from here:
GitHub - DVSwitch/USRP_Client to just the basic TX and RX goodies. I’ve tested it and it works great over chan_usrp. You basically get a string of 320 bytes per loop, and can send that to the sound card/to ASL. But I want to send it to GNU radio for further processing. For RX from AllStar, it’ll pretty much just send it straight to the sound card for now. For TX from the microphone/radio, it’ll pass it through GNU radio to do CTCSS, squelch, and all of the other band/low/high pass filtering, then send it over to AllStar via USRP.

This is also to add SDR capabilities to AllStar to allow a cheap way to do full duplex. This would be a really cool feature – imagine having the ability to plug in a ~$25 SDR and your node is then capable of full duplex (with some filtering or crossband). An additional feature this could bring is the ability to do Voter with SDRs – each Voter site/instance only needs an SDR and a Pi.

Is there an easy way to just send that byte stream over to GNU radio in the same script?

If I take the ZeroMQ approach, any recommendations on how the flow chart might look? I’m still trying to figure out how all of the different sampling, resampling, multipliers, selectors, signal source, and all that plays into getting out a clean audio signal, so any insight there is appreciated.

ASL Dev Team