Closed MaStr closed 7 years ago
The problem is a conflicting udev rule together with wifi detection. The udev rule starts on each detected wifi device (wlan*). This triggers starter.sh (https://github.com/PirateBox-Dev/PirateBoxScripts_Webserver/blob/master/piratebox/piratebox/rpi/bin/starter.sh#L3).
If starter.sh is able to find a valid wifi device, it starts the piratebox automatically.
wifi_detect.sh https://github.com/PirateBox-Dev/PirateBoxScripts_Webserver/blob/master/piratebox/piratebox/rpi/bin/wifi_detect.sh Detects the needed hostap version based on any device-driver message. It favors nl80211 over every other wifi device. The result is, that the realtek chipsets won't come in place, if needed. Or another option is that the onboard device of RPi3 over-rules always.
My assumption for a manual fix (not script fix) is:
A script fix might be something like:
ref: https://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html http://www.reactivated.net/writing_udev_rules.html
@stylesuxx , can you have a look at this patch ced3258 ? Just throw in some comments :)
Did some more bugfixes around this. Works quite well.
Hey looks good to me, I just browsed the source but did not test it. I can see if I can find some time on the weekend to test it. One of my work projects is coming to an end next week (I hope this time for real). After that I should have more time than for sleep and work :-(
No worries. Have a look at the complete branch history of patch-rpi3-wifi-issue I made some tests this morning and added smaller fixes.
In addition I found out that the extra handling for the realtek chips is not needed anymore... 👍 But within 1.1 I won't remove it
https://forum.piratebox.cc/read.php?7,19718
Seems there are inconsistencies or other things that prevent a smooth transition between onboard wifi to external wifi.