G.R.mk
Posts: 1
Joined: Tue Jan 15, 2019 5:37 am

RPi as an AP keeps on disconnecting

Tue Jan 15, 2019 5:45 am

I have configured my raspberry pi as an Access Point in a standalone network according to this guide:
https://www.raspberrypi.org/documentati ... s-point.md
I changed the MASQUERADE traffic forwarding and made it to work between wlan0 and wlan1 and it forwards the traffic from the AP that has been setup on wlan0 to wlan1 thats connected to my router.
This setup works for about 15-20 min and then disconnects all devices and it then keeps requesting the wifi password and it will prompt me with the incorrect password error even after the device was connected and everything went smooth. I have reset everything and tried to set it up multiple times now and it behaves exactly the same. I don't know where to move from here.
If anyone has any solutions or idea why this happens I would appreciate the help.
Thank you in advance

mattmiller
Posts: 2138
Joined: Thu Feb 05, 2015 11:25 pm

Re: RPi as an AP keeps on disconnecting

Tue Jan 15, 2019 11:07 am

AFAIAN you can't bridge between two WiFi interfaces on a Pi (but maybe something changed recently???)

So the question is how does it work for 20 minutes rather than why it fails

Ernst
Posts: 1257
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: RPi as an AP keeps on disconnecting

Tue Jan 15, 2019 3:33 pm

G.R.mk wrote:
Tue Jan 15, 2019 5:45 am
I have configured my raspberry pi as an Access Point in a standalone network according to this guide:
https://www.raspberrypi.org/documentati ... s-point.md
I changed the MASQUERADE traffic forwarding and made it to work between wlan0 and wlan1 and it forwards the traffic from the AP that has been setup on wlan0 to wlan1 thats connected to my router.
This setup works for about 15-20 min and then disconnects all devices and it then keeps requesting the wifi password and it will prompt me with the incorrect password error even after the device was connected and everything went smooth. I have reset everything and tried to set it up multiple times now and it behaves exactly the same. I don't know where to move from here.
If anyone has any solutions or idea why this happens I would appreciate the help.
Thank you in advance
I suggest you buy an access point instead of using the Raspberry Pi. I have been chasing this problem for many months and I have given up because I have been unable to find a proven method to reproduce the problem because it depends on the number and the type of clients attached to the AP. There are some persons that suspect that Samsung Android clients could be involved but I have seen this with Sony, Asus and Samsung Android clients. I am sure that one day somebody will by accident find the cause of the problem.
The road to insanity is paved with static ip addresses

rrooggiieerr
Posts: 5
Joined: Thu Mar 14, 2013 7:36 pm

Re: RPi as an AP keeps on disconnecting

Tue Jan 15, 2019 6:48 pm

Hi! I just went to the forum to post an exactly similar issue. I'm building a roaming WiFi repeater (https://github.com/rrooggiieerr/WLANderlust) and when I use the Raspberry Pi internal WiFi chip as an AP this network interface crashes/freezes regularly. The Pi still works though. When i use the external USB WiFi as an AP, and the internal WiFi to connect to other APs, the setup works flawlessly. Also with two external USB WiFis, and neglecting the internal WiFi, things work flawlessly.

I can reproduce the crash of the internal WiFi as follows:
* Clean install of Raspbian Stretch Lite
* hostapd on eth0 with the following config:

Code: Select all

interface=wlan0
driver=nl80211
ssid=myssid
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=mysecretpassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
* Connecting to an other AP on wlan1
* Open an SSH tunnel from Pi to external VPN server
* Ping to 8.8.8.8 from my laptop which is connected to the Raspberry Pi AP "myssid"

After one ping response the internal WiFi wlan0 of the Pi crashes.

I can reproduce this every time on a Pi Zero W V1.1 and a Pi 3B V1.2

Ernst
Posts: 1257
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: RPi as an AP keeps on disconnecting

Tue Jan 15, 2019 8:28 pm

rrooggiieerr wrote:
Tue Jan 15, 2019 6:48 pm
I can reproduce this every time on a Pi Zero W V1.1 and a Pi 3B V1.2
That is not the problem, many users will most likely be able to reproduce the problem, the real problem is to identify the root cause so that the developer is able to reproduce the problem. You may not have noticed that there are very few messages on this problem, evenso a few of us can reproduce the problem within our environment successfully every time.

How would you describe the problem is such a way that a developer can/will take a serious look into the code ?
Until now the only symptoms we can describe is that the clients are disassociated and password is rejected on reconnect attempts, the same configuration recovers when the Pi is rebooted.

viewtopic.php?f=28&t=217089#p1335031
The road to insanity is paved with static ip addresses

rrooggiieerr
Posts: 5
Joined: Thu Mar 14, 2013 7:36 pm

Re: RPi as an AP keeps on disconnecting

Tue Jan 15, 2019 9:15 pm

Ok, I found a lot of forum threads regarding hostapd failure, but not that one, interesting. So am I right that 4.14.50 refers to the kernel version? Isn't there a changelog with the changes between 4.14.49 and 4.14.50?

Ernst
Posts: 1257
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: RPi as an AP keeps on disconnecting

Tue Jan 15, 2019 9:31 pm

rrooggiieerr wrote:
Tue Jan 15, 2019 9:15 pm
Ok, I found a lot of forum threads regarding hostapd failure, but not that one, interesting. So am I right that 4.14.50 refers to the kernel version? Isn't there a changelog with the changes between 4.14.49 and 4.14.50?
The last successful kernel version in my environment was 4.14.34, every kernel version afterwards failed.
IMHO the problem is not the kernel but the brcmfmac driver, it looks that the newer kernels are more prone to bring up the problem with multiple diverse clients which can be the reason why it has not really been noticed. My observation is that one, or maybe two, raspberry clients seem to succeed, add some more (like android) clients and problems seem to surface.
The road to insanity is paved with static ip addresses

rrooggiieerr
Posts: 5
Joined: Thu Mar 14, 2013 7:36 pm

Re: RPi as an AP keeps on disconnecting

Tue Jan 15, 2019 9:36 pm

This brcmfmac kernel driver commit might be interesting to look at:
https://github.com/torvalds/linux/commi ... 79255bd89b

Return to “Troubleshooting”