-
Notifications
You must be signed in to change notification settings - Fork 102
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
Improve resilience of wireless service #143
Comments
An initial version implementing the above can be reviewed here: master...earlchew:issue-143
|
Thanks @earlchew this is really helpful. I think it can probably bring a very mature, tested, and supported way to implement hotspot function within Volumio, without too much custom rework, and bug crawling through many tricky issues. |
Interesting and well done, really. I would like to give it a go. |
A couple of other notes and observations:
|
@volumio wrote:
I'm not sure I understand the issue you are referring to. I think you are describing the use of dnsmasq in the context of the hotspot. Would you provide a more detailed description? |
@macmpi wrote:
I suppose it could, but I think it's worth also asking what is expected from the wifi hotspot. I see that My understanding is that the intent of the hotspot is to function as a backup means to connect to the volumio application in the absence of any other viable network (Ethernet, or wifi network). If that remains the case, maybe it is worth keeping the configuration of the hotspot as straightforward as possible. Providing a lot of functionality and complexity here might make it less reliable or harder to use as a means of connection of last resort. Should there be a desire to use
|
@earlchew wrote:
Yes, I was thinking along this line indeed: activation logic is most likely Volumio specific, but actual operation may be performed by such specialized "unit" under systemd. Anyway, your call obviously: glad this overall feature can be revisited and improved. PS: It's important to keep in mind some devices (like piZero) have no default built-in network interfaces to avoid explicit dependencies & issues linked to |
@macmpi I appreciate the feedback. You wrote:
For the present, I don't believe I have made that situation any worse, but would appreciate any comments you might have regarding the reworked implementation in this regard. The netplug modifications include supporting the The wireless modifications attempt to manage If as you say If it makes sense, the situation regarding |
Appreciate your systematic approach. |
@macmpi I saw your reference to volumio/Volumio2#791. In that issue the hotspot was started even though it was set to OFF. I believe these changes would address that first part:
The other question pertains to DNS. The only time a DNS server is run is when the hotspot is started. The only reason I can think of to run the DNS server is to make is easier for clients to connect to the Volumio device by name, rather than by IP address. Apart from that, I can't think of any other reason to run the DNS server. Is there any expectation that the DNS server actually provide a fully-featured hotspot service to allow clients to connect to the internet via the volumio hotspot? |
@earlchew Anyway, back to your question, I concur that one would not expect to run DNS server on Volumio in general (or at all). To me (but other may think differently?) the hotspot is merely an accesspoint servicing primarily as a basic bridge: it should not hamper with any DHCP or DNS server, or router eventually existing on the local network. Just in case there is no DHCP & DNS service available (i_e. router-less point-to-point network), it may just provide Zeroconf-type addressing & discovery to ease initial setup from most common platforms. Typical case illustrating this:
PS: |
FYI, a seemingly RPi3 wifi specific issue about how Hostspot management (combined with likely driver issue) may adversely affect how RPi3 can connect AP in client mode. |
@macmpi wrote:
The only reason I have five possibilities, rather than three, is for the code to support existing configurations ( |
I would say on\off\auto is the ideal configuration |
I wrote:
Today I had the chance to remove my Wifi dongle, and boot with Ethernet available. I confirmed that the revised wireless service loops at intervals trying to enable wlan0 for the hotspot, and then for the client. Neither of course succeeds because wlan is not available. I used top(1) to confirm that the cpu is idle (ie none of the wireless services are causing the cpu to loop hard). |
Hi nice to hear we are probably getting closer to experiment your PR. There's a use-case you may be interested in testing/reviewing, particularly if your have a Pi3 or PiZeroW (please check this Forum thread). In current implementation, its seems handover between Hotspot mode and client mode causes issue with those devices. Such handovers situations happen often in current implementation as Hotspot is mostly in AUTO mode (hotspot start at boot, automatic hotspot connextion if home AP fails). With some chipsets (like the one of Pi3 and PiZeroW), AP and client mode can happen simultaneously, but on the same wifi channel (HW limitation). Therefore once Volumio sets Hotspot (AP) mode, typically on channel#4 by default, then if client mode handover to Home Wifi is not properly handled (properly turning OFF AP mode first, or restarting wifi chipset), then client can only join Home Wifi on channel#4!... I'm still trying to better characterize the issue and possible workaround in the mentioned Forum thread, but as I do not own those devices, it's quite difficult as I rely on impacted users availability for tests. |
@macmpi It would be fairly straightforward to apply some kind of reset strategy prior to bringing up the wifi client, or even prior to bringing up the hotspot. Unfortunately, right now I do not have access to either of the newer RPi models mentioned, so I'm unable to either reproduce or test this failure scenario. A fix will have to wait until better information is available. |
Great, I feel we're having a fix soon? |
What's really critical to avoid former issue or similar, is to make sure Client & AP modes are mutually exclusive, and one is never launched before previous is properly shut-down. This is particularly true in AUTO mode (where each of the 2 modes should actually only follow each other). Indeed, should Volumio really intend to run Client & AP modes simultaneously, then it should be done by setting-up one virtual network interface for each, which is a bit more complex to handle, and not necessarily properly supported by many wifi chipsets (create_ap to the rescue!): hence very few users would benefit from such rare use-case anyway, and many could complain about it not working... Therefore, I do not think such simultaneous use is at-all important for Volumio (we are not making a full blown AP), and therefore we just need one standard physical interface BUT then we must also make sure simultaneous modes do never happen by "mistake",...or we may end-up in complex bugs to figure-out, linked to particular chipsets & drivers limitations (like for instance the "same channel limitation" on Pi3/PiZeroW chipset). I guess your new code does keep those 2 modes mutually exlusives? |
@macmpi wrote:
Totally agree, stability is a way more important than this feature that wouldn't be very useful. But I think that LAN should be working at any time, and should have the priority over Wifi as soon as it is connected. If I can't connect to my Volumio (2.118 / RPI3) over WiFi, I try to connect over LAN ; but sometimes it doesn't work (I don't see it in my LAN, so I have no choice but restart my RPI). Unfortunately, I wasn't able to reproduce it in a reproducible way. |
@macmpi My proposed reimplementation of wireless.js will only run either the hotspot or the wireless client, but not both at the same time. |
Great thanks. |
Hello, I'm on 2.163 and I didn't see any change regarding wifi stability in the changelog. Do you still plan to integrate your improvements? I'm available to test: good luck! |
Thanks for the reminder and for your interest. With other matters to take care of, and lack of HW, I haven't put any more time into this recently. I'll find time to make some progress shortly. |
Great, thanks a lot! (this is quite annoying on RPI 3...) |
Hello @volumio |
This was a big issue with me due to my need for hotspot only (car media player). However the boot time on 2.201 has now significantly improved to 55 seconds on a 2B which is quite acceptable. This issue still shows itself on an older B+ which boots slower at 2 and a half minutes whilst it tries connecting every which way but hotspot. |
Hello @volumio |
@volumio For the record, I dug into this, and I think the problem is that RPI3 (maybe other systems?) needs to see the full path for cron jobs (for example |
We have planned a rework: if wifi is dropped there will be a setting for it to reconnect automatically. |
As a user, I want to have access to the volumio wifi hotspot when I do have use of any wifi networks, so that I will always have some means to connect to the volumio service.
Related Issues:
Use Cases
The text was updated successfully, but these errors were encountered: