ka9q / ka9q-radio

Multichannel SDR based on fast convolution and IP multicasting
GNU General Public License v3.0
165 stars 38 forks source link

Disconnection of RealVNC after starting application #12

Closed alphafox02 closed 2 years ago

alphafox02 commented 2 years ago

As promised, I was able to try this out again (still remote). I did a git pull of the latest ka9q-radio from this repo, compiled the code, and to the best of my understanding attempted to run it with ./airspy 2M.

It's possible that I'm doing it all wrong, but what I can say is that upon running that command the last line mentions eth0 not found and then I immediately lose the RealVNC connection to the Raspberry Pi. The Pi4 is connected to a network using it's internal wireless card. Sorry for being short on details, happy to investigate further.

Screen attached. screen18

argilo commented 2 years ago

The Pi4 is connected to a network using it's internal wireless card.

Maybe that's causing problems? The documentation mentions warns that WiFi and multicast don't play well together:

Most access points send multicasts (and broadcasts) without link-level acknowledgements at some fixed, low speed that presumably reaches every client on the network and this speed stayed the same as faster modulation and coding methods were added. That's OK for low rate resource discovery, but a real time multicast stream can bring an entire WiFi network to its knees.

alphafox02 commented 2 years ago

I think you’re probably right. I have had nearly the same issue with SDRAngel when running it’s server only mode on the Pi while trying to connect to it remotely. I believe it’s also using multicast. If there’s any additional things I can check I’m happy to do so, otherwise I can close the ticket since it seems to be documented above.

ka9q commented 2 years ago

Thanks. Looks like you've confirmed my suspicions -- radiod is setting up its multicast groups before the ethernet interface is actually ready. (You do actually have eth0, right? And do you have a smart switch with STP? That was my main problem.) I've seen similar problems with (and complaints from others about) network-related services (not even multicast!) started by systemd before the network is really and truly operational. Just waiting for the network-online target isn't sufficient.

A simple though inelegant workaround is a delay in the systemd service file. I can't think of any better way without digging into systemd and how it reaches the network-online target.

alphafox02 commented 2 years ago

Looking at this locally on a Pi4 with eth0 plugged in I’m still able to connect via realvnc. The remote Pi4 was only connected by WiFi and had nothing plugged into eth0. Probably safe to say it’s not recommended to have the internet facing side being ran over WiFi even if there’s something plugged into eth0.

That’s about as far as I made it with having a close look at the Airspy conf file and not being sure how to setup all the .local addresses for multicast. I’ll come back around to this and see if I can get a working setup for me that I can then expand on.