Doodle3D / doodle3d-client

The Doodle3D web interface that people can access on computers or tablets to draw doodles and control the Doodle3D WiFi box.
www.doodle3d.com
GNU General Public License v2.0
3 stars 8 forks source link

Connecting to wireless based on ssid instead of bssid #208

Closed peteruithoven closed 10 years ago

peteruithoven commented 10 years ago

When you associate to a network (with recreate enabled (which we enable though the Doodle3D setting window)) old configurations with the same bssid are removed and a new configuration is added. Then the right configuration is selected based on the given ssid.

The problem is that when the bssid changed (you change the router for example) it will won't remove this configuration because it's a different bssid, but it will try to connect to it, because it's has the same ssid. So when you have a wrong password under an old bssid, but the same ssid, you won't be able to connect to the network.

We should probably delete old configurations based on the ssid?

More info: SSID is the name of a network (it's the name you see in the list of available wifi networks), multiple routers / access points can have the same ssid. BSSID is the access point mac address and is thus specific per router / access point. https://www.juniper.net/techpubs/en_US/junos-space-apps12.3/network-director/topics/concept/wireless-ssid-bssid-essid.html

peteruithoven commented 10 years ago

After successfully connecting to a network I changed the bssid (in etc/config/wireless) and rebooted. It couldn't connect to the network anymore. So this is a bigger problem, people in networks with multiple access points with the same ssid probably have issues connecting. I actually know of one issue with a user we couldn't explain yet.

peteruithoven commented 10 years ago

When the box can only connect to something that has the same bssid users would have to reconnect when they are under a different access point. So that would still be an issue.

peteruithoven commented 10 years ago

This also means even the safeupdate won't work, unless you can connect to the same router you connected the first time with. A solution for these users is connecting to completly other network (other ssid) and then using the safeupdate page or using the following api call http://192.168.5.1/cgi-bin/d3dapi/network/remove (in POST mode), but you might have to do it a couple of times because it only removes the first found.

peteruithoven commented 10 years ago

It looks like we can simply not save the bssid in the wireless configuration. This is probably normally not advised because someone else can act like your router and catch all your traffic. Then the only other thing we need to do is remove old configurations with the same ssid and make sure the remove api call removed all configurations with the same ssid.

peteruithoven commented 10 years ago

I'm now not specifying the bssid in the configurations (etc/config/wireless) and remove previous configurations according to ssid. It now connects to all routers that have the same ssid, password and encryption method after connecting to one successfully.

For people who can't update because they are in a "complex" network, we've added a step in the doodle3d.com/safeupdate page to clear previous network configurations so they can connect again and update.

https://github.com/Doodle3D/doodle3d-firmware/commit/00340cb25378f4ebd30f87298056369c64aee14a https://github.com/Doodle3D/doodle3d-firmware/commit/8f6fc9dc990a5f639410a4fab321a14f941ff49e