Page 1 of 1

Wifi continuously reconnecting

Posted: Wed Dec 14, 2016 8:14 am
by alex88
Hi there,

I'm having issues with wifi, many logs can be found here https://gist.github.com/alex88/bdfc6907 ... -more_logs

basically it loops on these logs

Code: Select all

wlan0: Trying to associate with _hidden_mac_ (SSID='wifinetwork' freq=2462 MHz)
wlan0: Associated with _hidden_mac_
wlan0: WPA: Key negotiation completed with _hidden_mac_ [PTK=CCMP GTK=TKIP]
wlan0: CTRL-EVENT-CONNECTED - Connection to _hidden_mac_ completed [id=0 id_str=]
wlan0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US
wlan0: CTRL-EVENT-DISCONNECTED bssid=_hidden_mac_ reason=0 locally_generated=1
wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
yesterday I got it working by removing the region setting from wpa supplicant and using `iw reg set WORLD` just to set an unknown region and it was stable for a while, today I've the same issue again.

Re: Wifi continuously reconnecting

Posted: Wed Dec 14, 2016 11:10 am
by DougieLawson
What WiFi adapter are you running? Are you using one of Mr Engman's drivers for it? Have you disabled power saving mode?

Re: Wifi continuously reconnecting

Posted: Thu Dec 15, 2016 2:56 pm
by alex88
DougieLawson wrote:What WiFi adapter are you running? Are you using one of Mr Engman's drivers for it? Have you disabled power saving mode?
It's a raspberry PI 3, `lsusb` shows just

Code: Select all

Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I have raspbian minimal image, also it seems a problem with the channel, with a lower channel number the problem doesn't seems to happen all the times as with channel 11.

Re: Wifi continuously reconnecting

Posted: Thu Dec 15, 2016 3:01 pm
by DougieLawson
Try upgrading to Raspbian 2016-11-25. Or bringing your current system up to date with
sudo apt-get update && sudo apt-get -y dist-upgrade && sudo reboot

Re: Wifi continuously reconnecting

Posted: Mon Dec 19, 2016 9:07 am
by alex88
DougieLawson wrote:Try upgrading to Raspbian 2016-11-25. Or bringing your current system up to date with
sudo apt-get update && sudo apt-get -y dist-upgrade && sudo reboot
I did that as first step after flashing the sd card, I've no updates pending

Re: Wifi continuously reconnecting

Posted: Mon Dec 19, 2016 11:28 am
by DougieLawson
Then your problem is either broken hardware or too many obstacles (like walls) between your RPi and your WiFi access point.

Re: Wifi continuously reconnecting

Posted: Mon Dec 19, 2016 11:30 am
by alex88
DougieLawson wrote:Then your problem is either broken hardware or too many obstacles (like walls) between your RPi and your WiFi access point.
However for different channels it works perfectly, and the AP is like 30 cm away

Re: Wifi continuously reconnecting

Posted: Mon Dec 19, 2016 11:35 am
by DougieLawson
Then it's co-channel interference from your neighbours. Pick a non-standard channel (not 1 or 11).

Re: Wifi continuously reconnecting

Posted: Mon Dec 19, 2016 11:38 am
by alex88
DougieLawson wrote:Then it's co-channel interference from your neighbours. Pick a non-standard channel (not 1 or 11).
The only wifi networks available are the one of our office and the one of the repeater (which are on the same channel because of the repeater uses the same channel as the main network)

Re: Wifi continuously reconnecting

Posted: Mon Dec 19, 2016 12:35 pm
by DougieLawson
Why? Spread things round the spectrum, the client machines can automagically switch channel to the one that has the best signal. Run something like ISSIDer to take a look at the crowded channels (you will be amazed at the number of WiFi stations that are broadcasting within range).

Re: Wifi continuously reconnecting

Posted: Mon Dec 19, 2016 2:00 pm
by alex88
DougieLawson wrote:Why? Spread things round the spectrum, the client machines can automagically switch channel to the one that has the best signal. Run something like ISSIDer to take a look at the crowded channels (you will be amazed at the number of WiFi stations that are broadcasting within range).
Because on the repeater there are no options to change the channel while in wisp mode.
And as I told you, there are only 2 wifi. `iwlist scan` in fact shows just 2 cells

Re: Wifi continuously reconnecting

Posted: Mon Dec 19, 2016 2:01 pm
by DougieLawson
Then sorry mate you're on your own.

Re: Wifi continuously reconnecting

Posted: Mon Dec 19, 2016 2:05 pm
by alex88
DougieLawson wrote:Then sorry mate you're on your own.
No problem, I'm trying to understand what generates this event

Code: Select all

CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US