It would be great, cause this way static DHCP service (i.e. port forwarding, etc) can work as it should. Other way, You must re-define open ports (for torrent client on N900, as example from top of my head) every time You disable/enable Your wifi on N900.
Anyway, if i set IP address manually, I'm connected without any problems using selector applet. With DHCP, it doesn't work. I'm most confused...
I'll try with dynamic IP. I usually use just static addresses, except of course on public networks.
I just updated, and i think whats need to be added is to cancel the opening of the available networks, is there any need to open a wireless connection when the driver is loaded ?
First, initial connection after reboot i done automatically using my regular N900 mac, so static DHCP give correct IP to known MAC. I'm starting to wonder if even maemo, after disabling and enabling auto through DHCP, uses other mac? May it be that saving MAc and keeping it constant will fix this hilarious problems?
// Edit
Checked - maemo keep MAC after switching IP obtaining method, but IF selector applet changed MAC before, only static IP will work, and router deny to give new IP through DHCP. Now I'm restarting router (to clear DHCP lease table) - if after that everything works again, we've solved problem.
@ AgogData
Because people asked for that feature - most of us want to connect to network when enable WiFi. for that rare cases, where you don't You can just cancel - much easier that opening connection window every other time. This is also way wifi-switcher worked.
After router reboot, DHCP leases we're cleared and everything work like charm again. I bet my left shoe, that this is exact same case as with pierrem - because MAC change every time we load/unload WiFi drivers via selector applet, router DHCP lease table get filled with useless leased IPs. When lease table reach set max, no other IP is leased until oldest entry lease time expire - that's why negotiating IP via DHCP fail.
Normally You can set DHCP pool in router settings - for regular users it is 100-200 numbers and lease time no longer than 24 hours, so not everyone is affected by this problem (ho ever, spamming with reloading drivers 100-200 times isn't so hard, and if IP lease time is like said 24 hours, You can accidentaly perform DHCP DoS attack on your own AP )
Some people, for security or other reasons (like me) set DHCP pool quite low - i use mostly static DHCP (for my N900, notebooks, etc - working port forwarding on my home, still having possibility to connect to open networks without changing settings) or static IP (for desktops), so i keep DHCP pool to be only 20 entries long, for guest and friends when they come to my place and connect. In such a case, switching MAC spam DHCP entry table quite fast.
I wonder if wifi-switcher saved MAC - that would explain why connecting via wifi-switcher worked for pierrem.
Anyway, keeping MAC constant will fix that issue, once for all... I think it's time to get some sleep, its 3:30 here
After router reboot, DHCP leases we're cleared and everything work like charm again. I bet my left shoe, that this is exact same case as with pierrem - because MAC change every time we load/unload WiFi drivers via selector applet, router DHCP lease table get filled with useless leased IPs. When lease table reach set max, no other IP is leased until oldest entry lease time expire - that's why negotiating IP via DHCP fail.
Normally You can set DHCP pool in router settings - for regular users it is 100-200 numbers and lease time no longer than 24 hours, so not everyone is affected by this problem (ho ever, spamming with reloading drivers 100-200 times isn't so hard, and if IP lease time is like said 24 hours, You can accidentaly perform DHCP DoS attack on your own AP )
Some people, for security or other reasons (like me) set DHCP pool quite low - i use mostly static DHCP (for my N900, notebooks, etc - working port forwarding on my home, still having possibility to connect to open networks without changing settings) or static IP (for desktops), so i keep DHCP pool to be only 20 entries long, for guest and friends when they come to my place and connect. In such a case, switching MAC spam DHCP entry table quite fast.
I wonder if wifi-switcher saved MAC - that would explain why connecting via wifi-switcher worked for pierrem.
Anyway, keeping MAC constant will fix that issue, once for all... I think it's time to get some sleep, its 3:30 here
Thanks for this
New scripts I made are in here. I'm probably going to upload them to extras tomorrow (today) after some extra testing, 05:29 here I'm going get some sleep also
New scripts I made are in here. I'm probably going to upload them to extras tomorrow (today) after some extra testing, 05:29 here I'm going get some sleep also
@Estel: nice catch ! my dhcp server is also configured for very few slots
@laasonen: the test scripts work fine here.
Thank you both for your fast reaction to solve this issue
I was too busy yesterday to do anything for this, but I did today more testing and made couple more changes to the loading process. It now restarts the osso-wlan also. This causes that you can only switch drivers like 8 times in short time, because after that the start-stop-daemon tool starts whining about the daemon spawning too fast. I'm not absolute sure, if this is needed, I'll maybe remove this in next version, but it shouldn't cause trouble, if you are not testing.