Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions for flooded 2.4 GHz WiFi #804

Closed
daniele-athome opened this issue Feb 16, 2021 · 3 comments
Closed

Suggestions for flooded 2.4 GHz WiFi #804

daniele-athome opened this issue Feb 16, 2021 · 3 comments

Comments

@daniele-athome
Copy link

I'm running snapclient on Raspberry Pi Zero W and having buffering issues on my 2.4 GHz WiFi home network. I live in an apartment so it's probably a flooding issue (ping latency suddendly increase up to 800 ms - per packet! - every 30 seconds or so). I've been able to reproduce the latency issue with other WiFi clients (even a laptop), so the problem is indeed the 2.4 GHz band. This means that every 30 seconds I get holes in the sound because packets are not coming in.

Since I can't use the 5 GHz band (unless I plug a USB WiFi adapter, but that's another story) and my ISP modem (which I'm forced to use at the moment) doesn't allow me to change WiFi channel, do you have any suggestion for configuring snapcast (server or client) for having a clean sound? I tried to increase snapserver buffer parameter: I had to increase it to 3000 ms to produce a smooth and continuous sound.
Also, it's not clear how chunk_ms can impact on performance. It would be great to have a documentation article to read about tuning buffer and chunk_ms.
Thanks!

@daniele-athome
Copy link
Author

For anyone reading this: I was able to drop my router and buy a new one. I configured it to use a 20MHz WiFi channel (1, 6 or 11, analyze your area with a WiFi analyzer to choose the best one for you). The situation has improved dramatically: I'm now able to use a 500 ms buffer and I had like one brief skip in maybe 10-12 days.

Anyway, documentation about the relation between buffer and chunk_ms would still be great :-)

@duhow
Copy link
Contributor

duhow commented Apr 25, 2021

@daniele-athome can you share the settings you're using on snapserver?
Sounds like you're using default codec FLAC, you may try by using Opus, which uses way less data, and should not cause this network issues.

@daniele-athome
Copy link
Author

I tried Opus too, but without getting any improvement. Generally speaking my WiFi settings suggestions above will definitely help in any application (you can find them anywhere on the Internet).

Also I did a more thorough analysis of my old (carrier-provided) router and I found out it was using a 20/40 MHz channel width and it was constantly changing channel, using also the overlapping ones which is clearly a problem in 2.4 GHz networks. Sometimes hardware is the problem :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants