Yesterday I made an interesting discovery which explains why my signal hopping code wasn’t working.
Each wifi access point has two important identifiers: SSID which is the name of the network you see in the wifi list, and BSSID, which is usually the physical MAC address of the access point.

In the list of known networks (WifiConfiguration list), which Android will connect to automatically (and which Wifi Fixer uses for determining which scan result to connect to) the BSSID is null.

The problem comes when you have more than one access point with the same SSID.

This is quite common in corporate networks.

A problem I ran into with signal hopping is if one or more of the APs in range is “bad”. I tried to pick another AP with a lower signal, but the problem is I was using the network id of the known network, which would just tell Android to connect to any AP with that SSID, because it can’t use the BSSID to tell them apart.

Now, you can via WifiManager add BSSID to a WifiConfiguration entry. What I’m going to have to do is create new entries for every known SSID for each different AP with that SSID, filling in the BSSID from the scan.

Then I’ll have to do some rather complicated logic to keep track.

But that’s ok, I can code it. It’s just going to take a while, and need some thorough testing.

Bottom line: 0.7.0.3 is delayed until I can get this worked out.

Advertisements