-
-
Notifications
You must be signed in to change notification settings - Fork 803
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
No Hotspot after Stretch install, detailed debug log with preliminary solution #287
Comments
Ok, performed the follow-up tests.
Sometimes, with only the killall and no sleeps it will work but it is not reliable, sometimes works, sometimes hotspot comes up but can't be joined, sometimes no hotspot at all. So the change that is working for me so far is to do killall and sleep 1 in /etc/init.d/hostapd, below is a fragment of the file to show where I put it.
Hope this is helpful, I'll test on some other PI configurations a bit later. |
@MiloMindbender Thanks for posting. Were you able to easily switch between AP mode and Client mode only using the GUI? |
@danielwilson654 as near as I can tell there is no way to switch between AP and Client mode in the GUI. I think wpa_supplicant needs to be running to do client and it needs to be killed for AP to work. However I think if you just comment out the "killall" in my post above and reboot it will come up in client mode. Also, I tested the fix above on a Rasperry Pi 3B+ and it worked there too. |
RIghtio... so it doesn't really work as the GUI suggests. So this is a bug or a new feature that's needed? |
@danielwilson654 The Raspap package DOES work as the GUI suggests, because (at least as far as I can see) have a way to switch between AP and Client mode. It would be pretty nice feature to have though. The one thing that IS A BUG is the problem I detailed at the beginning of the issue about needing to kill wpa_supplicant. If they could fix this bug it would be a one-command-install which is great! |
@MiloMindbender thanks for taking the time to provide detailed debug info. For clarity and reproducibility, I'll detail my environment and the steps I used to setup my AP, leaving aside the WiFi client mode for the moment: EnvironmentModel: Raspberry Pi 3B+ Initial setup
The reported Observed behaviorOn reboot, the default SSID 'raspi-webgui' appears in the list of available WiFi networks on PC, iOS + Android devices. The raspi-webgui WiFi network is joined successfully with the default password. Confirm internet browsing via the AP works. In the default 802.11g mode, reported bandwidth is capped at 54 Mb/s. Open the RaspAP administration interface in a browser. On the Configure hotspot > Basic tab, change the SSID and set Wireless Mode to 'n'. On the Security tab, set Encryption Type to 'CCMP'. Save settings and stop/start the hotspot from the UI. Result: the new SSID appears in clients with 802.11n mode, able to be joined with a PC and several handheld devices (iOS + Android). Verify that internet browsing works. Given the above, RaspAP does indeed provide a single-command AP setup 🙂 There may indeed be differences with other RPi hardware and/or different kernels and package versions. Probably there's an unpleasant test grid with all the various permutations that I haven't fully addressed, although I've tried to make this project compatible with the most common hardware and the latest available firmware/packages, etc. I'll take up the WiFi client switching in a separate issue. Again, thanks. |
Environment Model: Raspberry Pi 3B+ Initial setup Image Stretch on to new sad card using etcher Observed behavior If I run sudo hostapd /etc/hostapd/hostapd.conf then I get AP started! Please help to make this run on boot. |
Hostapd was just updated from v2.4 to 2.6. Probably there are some new changes that require testing. |
RaspAP starts the hostapd daemon via the service, not by excuting the binary directly. From the shell, try
|
@billz |
@clean-ev I've pushed a hotfix to the installer that resolves this |
@billz - Thanks for the update. sudo apt-mark hold wpasupplicant Now AP raspi-webui comes up the first time and every time I reboot. I can open a new request for suggestion around channel numbers but will continue here for now instead of forgetting what I have done Once logged in to AP GUI, I can see a lot of changes that can be exercised. The challenge is that if I use band ‘a’ then the channel gets stuck between 1-11 for US or 1-13 for SG. If I make a mistake by leaving it at channel 1with band ‘a’ then there is no AP. Also when I change the dhcp scope to a new scope AP gets activated, but there is no internet connection. As usual in past few days read more and found that dhcpcd.conf file kept original settings of 10.3.141.1 while dnsmasq.conf will be showing new dhcp scope. Is this something that can be changed in your script to make changes to both dnsmasq and dhcpcd files? I will continue to test as much as I can to provide with any errors or issues I encounter. Thank you, |
Sorry for the delay getting back, I just tried this with @billz approach, doesn't work. Did not get a hotspot after the quick installer or spending some time messing with (turning interfaces on and off...etc.) Raspberry pi 3b+ Not sure but I suspect part of the problem may be that when stretch comes up it searches for and tries to join a local WiFi? Webgui works fine, suspect wpasupplicant is still interfering with hostapd starting up because after boot the raspap GUI says hostapd is running, but it is not. |
By the way I tested on a blank SD card, fresh install. Was thinking it might be stretch full vs stretch lite, but @clean-ev tested with lite and it didn't work either. Only thing I can think of is it maybe not letting the stretch installer connect to wifi when you are installing? I'll give that a try if I have time. |
Hello - I can confirm that the new hotfix takes care of creating an AP at first reboot. |
Hello, I played around with fresh stretch install and update then RaspAP. No SSID visible after reboot. wlan0 is missing IPv4: lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 looks like hostapd running: mars 26 18:16:44 raspberrypi systemd[1]: Starting Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator... Stop/starting Hostapd from UI make SSID visible and i can connect but this fail after very few time. wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 mars 26 18:28:00 raspberrypi hostapd[1710]: Using interface wlan0 with hwaddr b8:27:eb:f1:2e:2c and ssid "FBOX" Any idea for fixing? |
I am sure this bug is also affecting me also, I have a RaspAp set up using a Wifi USB RTL8192cu Chipset and Stretch. |
@MiloMindbender if you're feeling adventurous, try out the
I'm not aware of conflicts Raspbian desktop might create with wpa_supplicant. Anecdotally, several users have demonstrated setting up this project in a Stretch desktop environment without issues. Having said that, I do think this project is better suited for headless RPi servers. |
Resolved with #300 |
Subject of the issue
Had a lot of problems getting Raspap runningon a Stretch distro I have been using for awhile. Decided to debug using a fresh install of Stretch. Think I have a solution but it points to some kind of timing issue which may be why so many people see this.
Your environment
Steps to reproduce
Install stretch on SD card, do all updates, set wifi to US. During install connected to my office WiFi AP as well as being on a wired ethernet. Did quick install of RaspAP
Expected behaviour
Should have an up-and-running hotspot on reboot.
Actual behaviour
On reboot the Raspap dashboard claims everything is ok but no AP is seen on iPhone or PC.
Starting and stopping the AP in Raspap causes AP to appear but it can't be joined.
DETAILED DEBUG LOG
CONCLUSION
It appears that there is a timing issue during startup, possibly wpa_supplicant needs to come up for a brief period to initialize something, but this is not conclusive. It could easily be something else in the startup. Based on other issues I've read, the issues vary with type of PI which further suggests some kind of timing issue.
It appears that sometimes when you do a "refresh" on a Raspap config page, it doesn't show you the latest state of things (see #13 above), it just repeats the previously seen page.
FURTHER TESTS
It's late now, tomorrow I will try a few more things.
COMMENTS
What I REALLY wanted was the ability to run my PI as EITHER an AP or a client, but not both at the same time. I was really hoping there would be something in Raspap where I could push a few buttons to bring down the AP and bring up client mode. Doesn't seem like Raspap has this. Trying to work out a procedure for switching between modes but really wish you could add this.
I did read almost all the related issues on this subject. It seems like everyone's solution (and problems) were a little different and not every solution worked for everyone. Most had some element that would change the timing of things. When I was testing I also tried turning on the -dd debugging log of hostapd, even this drastically changed how things behaved, but it didn't completely fix the problem. This further points to a timing issue of some kind. It would make sense that differences in people's OS setup of services and startup tasks would cause timing differences that would result in different bugs (and different fixes).
I was having even weirder problems with the PI Stretch installation I'd been using for development, that's why I tried doing this with a clean install. Not sure why, maybe I messed something up trying fixes? Or maybe like I said, the timing of startup was different. But a lot of the problems persisted in the clean install test above.
The text was updated successfully, but these errors were encountered: