Wifi doesn't reconnect to AP if it uses the same SSID than another AP

Bug #1478319 reported by Jean-Baptiste Lallement
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Incomplete
High
Jason Yen
network-manager (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

current build number: 68
device name: arale
channel: ubuntu-touch/rc-proposed/meizu.en
last update: 2015-07-24 08:00:20
version version: 68
version ubuntu: 20150724
version device: 20150709-8965e37
version custom: 20150716-819-8-42

My ISP (Free in France) provides a hotspot service so that customers can use the connection of any other customer using a generic open Wifi connection (for reference http://www.free.fr/assistance/2303.html - in French)

The SSID is called 'FreeWifi' on all the boxes but obviously APs are all different since it's customers' DSL routers.

When I connect to one of this access point, suspend the phone and resume it in another location where the SSID is available but from a different AP, the phone doesn't connect to this AP and the list of networks in the network-indicator doesn't refresh and still show the list of network from the previous location. I have to forget the network called 'FreeWifi' and reconnect in order to refresh the list and make it work.

It's 100% reproducible.

Tags: bq nm-touch
Changed in canonical-devices-system-image:
assignee: nobody → John McAleely (john.mcaleely)
importance: Undecided → High
milestone: none → backlog
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Tony Espy (awe) wrote :

@Jean-Baptiste

This was reported quite awhile back. Is this behavior still reproducible with OTA9?

Changed in network-manager (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I'll check if it is still an issue with OTA9.

Changed in canonical-devices-system-image:
assignee: John McAleely (john.mcaleely) → Jean-Baptiste Lallement (jibel)
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for network-manager (Ubuntu) because there has been no activity for 60 days.]

Changed in network-manager (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Julia Palandri (julia-palandri) wrote :

@jean-baptiste do you still see this?

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I won't have time to test again. closing.

Changed in canonical-devices-system-image:
status: Incomplete → Won't Fix
Jason Yen (jasonyen)
Changed in canonical-devices-system-image:
status: Won't Fix → Incomplete
Jason Yen (jasonyen)
Changed in canonical-devices-system-image:
assignee: Jean-Baptiste Lallement (jibel) → John McAleely (john.mcaleely)
Revision history for this message
Jason Yen (jasonyen) wrote :

I've checked this issue with 2 APs and have the same SSID but can't reproduce. I don't need to forget the network setting and it will just connect to another one when lost connection of previous one. I didn't set any security or password for these two APs.

I tested with arale r445(rc-proposed)

Changed in canonical-devices-system-image:
assignee: John McAleely (john.mcaleely) → Jason Yen (jasonyen)
Changed in canonical-devices-system-image:
status: Incomplete → Confirmed
Changed in network-manager (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Reproduced on bq 4.5, OTA13. I created two APs with SSID "Ubuntu", same password, same authentication. I connected to one of them:

phablet@ubuntu-phablet:~$ nmcli d wifi
* SSID MODE CHAN RATE SIGNAL BARS SECURITY
   Ubuntu Infra 1 54 Mbit/s 100 **** WPA2
* Ubuntu Infra 11 54 Mbit/s 91 **** WPA2

phablet@ubuntu-phablet:~$ ifconfig wlan0
wlan0 Link encap:Ethernet direcciónHW b8:64:91:47:21:b6
          Direc. inet:192.168.43.189 Difus.:192.168.43.255 Másc:255.255.255.0
          ...

Then I removed the AP in channel 11. After waiting for some minutes to make sure we had re-scanned:

phablet@ubuntu-phablet:~$ nmcli d wifi
* SSID MODE CHAN RATE SIGNAL BARS SECURITY
* Ubuntu Infra 1 54 Mbit/s 88 **** WPA2

It looks like the connection has moved to the other Ubuntu AP, but ping does not work, and the interface address has not changed:

phablet@ubuntu-phablet:~$ ifconfig wlan0
wlan0 Link encap:Ethernet direcciónHW b8:64:91:47:21:b6
          Direc. inet:192.168.43.189 Difus.:192.168.43.255 Másc:255.255.255.0
          ...

Apparently the IP configuration has not completed properly. I was able to return to a working state by doing

phablet@ubuntu-phablet:~$ nmcli d wifi connect Ubuntu

Changed in canonical-devices-system-image:
milestone: backlog → 14
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@jibel, @julia I have a workaround for this in https://bileto.ubuntu.com/#/ticket/2098 . Could you please give this a try?

My suspicion here is that when this happens the two APs have different DHCP servers. The workaround forces a DHCP lease renewal when roaming between APs. However, even if this works in your case, I am not sure if this is the right thing to do. If you have a network sharing SSID between APs (usual case in campus networks, for instance), you usually have just one DHCP server in the whole network. So in cases where the wireless network is properly configured, we would ask for lease renewals unnecessarily when we roam between APs.

Note also that Android actually handles the case of having different DHCP servers in the same way, so maybe this solution is not completely insane. I still need to check in the AOSP code if there is some additional check going on before asking for the new IP.

Revision history for this message
Andrea Bernabei (faenil) wrote :

@All:

do we actually want this behaviour? Is SSID the only ID we can use to identify APs of the same "group"?

I was actually hoping we could *stop* connecting to other APs just because they have the same SSID.

Plenty of routers come preconfigured with the same SSID, see "iPhone" or "Ubuntu" when you create a hotspot on those devices, or "ASUS" if you have an Asus router.

Fixing this "bug" means trying to autoconnect to random APs that you find while walking around the streets.

And when you couple that with bug #615239 you get the followign result: your phone will stop trying to autoconnect to your real home AP when you get back home because it is stuck on the password prompt that it triggered while trying to autoconnect to a random AP you found on your way home, just because it had the same SSID.

Also see https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/615239/comments/18

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@faenil, by the WiFi standards, APs with the same SSID and same authentication method *are the same network*.

Is is unfortunate that some devices models use the same SSID instead of customizing the name per device. Interestingly, NM uses a hard-coded list to identify these networks and avoid automatic roaming between APs with same SSID, see

https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/src/devices/wifi/nm-device-wifi.c#n723

(it would be worth to propose a patch with new entries to this list for the cases you mention, adding "iPhone" to the list is probably a good idea).

Having "Ubuntu" as default name in all phone devices is actually a bug and I will fill one for indicator-network.

IMHO this sort of bugs shows some gaps in the WiFi standards that make it difficult to solve them without side effects.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Bug LP: #1637100 reported for indicator-network, to create unique default SSIDs per device.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :
Revision history for this message
Andrea Bernabei (faenil) wrote :

@Alfonso:
thanks for the explanation. Yeah that really seems like a big gap in the WiFi standard...

I guess we'll have to improve that list, indeed. Thanks for the hint!

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I cannot reproduce the bug on stock krillin running rc-proposed and without the silo 2098 installed. syslog attached.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@jibel, thanks for the log. It looks like wpa_supplicant removes the previous connection due to a timeout before you connect to another Freewifi hotspot, which probably helps to rule out issues. Also, a new DHCP lease is requested after reconnecting in all cases, and it gives you back always the same address, so it seems like network configuration is fine. So all looks good this time.

Revision history for this message
Tony Espy (awe) wrote :

@Alfonso

Let's put this on the agenda for this weeks' net/telephony meeting.

I'm not sure I'm comfortable with releasing your workaround just yet as it introduces latency when the APs are properly configured for roaming.

Revision history for this message
Jason Yen (jasonyen) wrote :

we need to find a way to reliably reproduce this issue for the follow up.

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

pending feedback from the system enablement team whether we fix or not

Changed in canonical-devices-system-image:
status: Confirmed → Incomplete
tags: added: bq
Revision history for this message
André Fettouhi (a-fettouhi) wrote :

I can confirm this behaviour. I have at home a wifi extender from tp link (RE450) and I have given SSID on the extender the same names as on my wifi router. Both in the case of 2,4 GHz and 5 GHz. Since OTA13 I have constant disconnects with my Meizu MX4 running Ubuntu Touch.

Revision history for this message
James Lewis (james-fsck) wrote :

I have a corporate wifi network in my office with multiple AP's and i often see it disconnect and ask for the password again.... usually entering the password doesnt fix it. i assume this is the same issue.

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

Sometimes I experience this issue even at home with only one access point.
I use a hidden SSID.
The issue occurs sometimes when signal is weak.
As result the network is unusable (Ping fails), but seems to be connected according to the network manager display.
Sometimes I also get a Password prompt like in Bug #615239.

Restarting the phone solves the issue.

Changed in canonical-devices-system-image:
milestone: 14 → x1
Revision history for this message
Jason Yen (jasonyen) wrote :

After confirm with BQ QA team. This issue can't be reproduced.

Aron Xu (happyaron)
tags: added: nm-touch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.