maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.2 in extras] (https://talk.maemo.org/showthread.php?t=73682)

laasonen 2011-06-18 17:53

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.0]
 
Quote:

Originally Posted by Estel (Post 1031506)
Upgraded, tested in all possible variants, voted for package promotion into extras... Working like a charm :)

the only thing that would be nice to correct at this point is package description - indication that it can be used also for disabling/enabling WLAN on both drivers - not only switching between them - may help other people discover it (i know that informations are in changelog, but still package description is most of the time "first contact" with package, and if outcome isn't good enough, it may be "last contact").

I know that uploading another version just for such small irrelevant thing may be irritating, but package isn't long in extras and still (except You as maintainer) I was only one voting, so i think it may be worth effort. Of course decision is always up to You.

/Estel

Uploaded 0.2.1-2 with correct description.

frostbyte 2011-06-18 18:26

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers [0.2.0]
 
Quote:

Originally Posted by Estel (Post 1030571)
...
Stock drivers loaded, wifi connected to AP, no activity (just connected doing nothing) - 75-100 mAh drain

Bleeding edge loaded, wifi connected to AP, no activity (just connected, doing nothing) - 140-160 mAh drain

Stock drivers loaded, wifi connected to AP, doing high traffic + high internal I/O task (measuring internet speed connection, using 25 Mb/1,5 Mb link) - 300-400 mAh drain

Bleeding edge drivers loaded, wifi connected to AP, doing high traffic + high internal I/O task (measuring internet speed connection, using 25 Mb/1,5 Mb link) - 300-400 mAh drain

When drivers loaded, but wifi NOT connected, both drivers also sucked same amount of power.

...

Thanks for doing this, confirms the seat-of-the-pants feeling I had earlier while using wlan driver selector. And thanks again laasonen, excellent work mate!

Dragoss91 2011-06-18 20:49

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
What actually is this mod ? What is doing ?

laasonen 2011-06-18 21:09

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Quote:

Originally Posted by Dragoss91 (Post 1031623)
What actually is this mod ? What is doing ?

This is just simple applet for enabling bleeding edge wlan drivers. They have larger range and packet injection for example, but they drain the battery faster. You can find more information on their website.

pierrem 2011-06-18 21:24

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Testing the new wifi on/off feature, using the stock or the bleeding edge drivers, I'm unable to connect to my wifi network: the wifi drivers are loaded, the connection dialog pop up, I select the SSID and then after 5 seconds, I'm notified of a connection error.

This was tested after having uninstalled wifi-switcher and rebooted the device. This is completely reproducible

Enabling and disabling wifi connection works perfectly with wifi switcher.

If that can help, the SSID is a hidden WPA2 protected network

laasonen 2011-06-18 21:28

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Quote:

Originally Posted by pierrem (Post 1031646)
Testing the new wifi on/off feature, using the stock drivers, I'm unable to connect to my wifi network: the wifi drivers are loaded, the connection dialog pop up, I select the SSID and then after 5 seconds, I'm notified of a connection error.

This was tested after having uninstalled wifi-switcher and rebooted the device. This is completely reproducible

Enabling and disabling wifi connection works perfectly with wifi switcher.

If that can help, the SSID is a hidden WPA2 protected network

Does it work, if you close the dialog and open it again after couple seconds? I gave the connection manager one second to recover from the driver change. Maybe it is not enough for you :/ Do you have the customized osso-wlan package?

Estel 2011-06-18 21:32

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
I'm also using hidden WPA2 protected network, without any issuses with new (or any old) version of selector applet.

Anyway, when connection dialog pops up, selector applet consider job done, and rest is for maemo connectivity parts, i.e. its most likely that it's not selector fault. Personally, i think that Your drivers may not be loaded properly (something stop the from loading like they should) - can You provide more debug info on this? Maybe it could be used to upgrade selector applet "detection" mechanism (i.e. when it should output "drivers loaded", and when kick off errors).

----

Version 0.2.1-2 installed and tested, of course no errors (having in mind that only thing changed was package description, no surprise here, huh? ;) ) When it will make it's way into -testing, I'll happily vote.

// Edit

If by modified osso-wlan package You mean that one by lxp (bleeding edge drivers creator) I'm NOT using it ATM - may be worth to mention. As i said, for me everything is working fine.

pierrem 2011-06-18 21:33

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Quote:

Originally Posted by laasonen (Post 1031648)
Does it work, if you close the dialog and open it again after couple seconds? I gave the connection manager one second to recover from the driver change. Maybe it is not enough for you :/ Do you have the customized osso-wlan package?

no it does not work either
dpkg -l osso-wlan gives me version 3.0.20+0m5, so I guess it is the non customized package.
Do I have to install the customized one ? what does it change ?

laasonen 2011-06-18 22:05

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Quote:

Originally Posted by pierrem (Post 1031652)
no it does not work either
dpkg -l osso-wlan give me version 3.0.20+0m5, so I guess it is the non customized package.
Do I have to install the customized one ? what does it change ?

Osso-wlan in the repositories seem to have the same version number as the lxp's modified one. If you get the same output as I do from this, you have the modified one:
Code:

user ~ md5sum /usr/sbin/wlancond
4b9057572d282f76072cff160d88cb1a  /usr/sbin/wlancond
user ~

Quote:

This fixes a bug where WLAN gets stuck, when you are connected to an
access point and go out-of-range.

WARNING: Installing this will break seamless upgrades to new PR versions.
Most likely you will have to reinstall normal osso-wlan version
before you can do OTA upgrades.

You can also skip this step, but keep in mind that the above mentioned bug
can occur. If this bug is triggered you have 3 options:
manually unset ssid, unload and reload driver or reboot your phone.
I added the installation instructions to the first post.

pierrem 2011-06-18 22:09

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
then I have the stock osso-wlan, but from what Estel wrote, it does not seem to be the problem
What kind of "debug info" would you need ?

mr_pingu 2011-06-18 22:18

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
The funny part is I never installed the modified osso-wlan and also never encountered that bug. I often drive away from home without killing my connection first and wlan never got stuck.

Well I made today a simple script and put in bin which does nothing more than linking load.sh to a command wlanload and wlanunload. Maybe an idea to include for this applet too, so that we can load and unload the drivers with a simple command. Note: Not worth sharing, my n900 is my first linux device so my scripting skillz are way below yours. Just wanted to tell that it could be a nice addition since when we gonna use these drivers we probably need xterm anyway. The only GUI I know for aircrack-ng (faircrack) has already a button for loading the drivers...

laasonen 2011-06-18 22:19

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Quote:

Originally Posted by pierrem (Post 1031664)
then I have the stock osso-wlan, but from what Estel wrote, it does not seem to be the problem
What kind of "debug info" would you need ?

You could try, if this fixes the problem:
Code:

stop wlancond
start wlancond
ifconfig wlan0 up

Check, if the modules are loaded:
Code:

cat /proc/modules | grep wl
And does the problem occur with both drivers? If possible could you try another wireless access point.

Quote:

Originally Posted by mr_pingu (Post 1031670)
Well I made today a simple script and put in bin which does nothing more than linking load.sh to a command wlanload and wlanunload. Maybe an idea to include for this applet too, so that we can load and unload the drivers with a simple command.

This works already :)
Code:

user ~ load-bleeding-edge-drivers.sh
user ~ load-stock-drivers.sh
user ~ unload-drivers.sh


mr_pingu 2011-06-18 22:45

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Awesome, but when loading bleeding edge through applet and load the stock through xterm the button stays glowed.

I don't know but the code to unglow it should be included in load-stock-drivers.sh.

Well, should sounds maybe a bit commanding, but I don't mean it that way. I mean this post as feedback and help to improve this easy applet ;)

laasonen 2011-06-18 22:50

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Quote:

Originally Posted by mr_pingu (Post 1031685)
Awesome, but when loading bleeding edge through applet and load the stock through xterm the button stays glowed.

I don't know but the code to unglow it should be included in load-stock-drivers.sh.

Well, should sounds maybe a bit commanding, but I don't mean it that way. I mean this post as feedback and help to improve this easy applet ;)

I didn't plan those scripts to be used without the applet, but they work as good as any other external enabler/disabler. Even thought I would make those scripts manually toggle the button, it would get unsynchronized when someone changes drivers with faircrack for example. So I would need to poll the loaded drivers, which would increase CPU usage, what I don't want to do. Orientation lock applet has the same problem.

pierrem 2011-06-18 22:54

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Quote:

Originally Posted by laasonen (Post 1031671)
You could try, if this fixes the problem:
Code:

stop wlancond
start wlancond
ifconfig wlan0 up


nope

Quote:

Check, if the modules are loaded:
Code:

cat /proc/modules | grep wl

they are

Quote:

And does the problem occur with both drivers?
yes

Quote:

If possible could you try another wireless access point.
not possible right now: I'll try later

Estel 2011-06-18 23:19

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Quote:

Originally Posted by pierrem (Post 1031664)
What kind of "debug info" would you need ?

Good point - I'm by no means expert on this, so i can't give You straight instructions, but I'm sure that somewhere must be command to watch (kernel?) messages, just like dmesg in HEN. I hope some "pros" will show up here and point You toward right direction... If You get "connection error", it's most unlikely that linux distribution doesn't store somewhere info what part failed, or at least allow checking output messages in real time.

I'm sorry that i can't be much more help here :(

// Edit

Did quick research, and:

dmesg

run as root indeed provide some info about connection stages. Just be sure to execute it AFTER failed attempt - it's not updating in real time, so when run, it show you messages to the moment that it was executed. to update, need to run it again.

My output look like this:
unloading stock drivers:

[86817.312927] wl1251: down
[86817.844177] wl1251: 151 tx blocks at 0x3b788, 35 rx blocks at 0x3a780
[86817.859802] wl1251: firmware booted (Rev 4.0.4.3.7)
[86818.000915] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[86818.117736] wl1251: down
[86818.281677] wl1251: unloaded

loading stock drivers:

[87210.910308] cfg80211: Using static regulatory domain info
[87210.910339] cfg80211: Regulatory domain: US
[87210.910339] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[87210.910369] (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
[87210.910369] (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[87210.910369] (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[87210.910400] (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[87210.910400] (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[87210.910400] (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
[87210.910430] cfg80211: Regulatory domain changed to country: US
[87210.910430] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[87210.910461] (2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2000 mBm)
[87210.910461] (5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[87210.910461] (5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[87210.910491] (5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[87210.910491] (5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
[87210.910491] (5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
[87210.991912] phy0: Selected rate control algorithm 'minstrel'
[87210.996551] wl1251: loaded
[87210.996948] wl1251: initialized
[87212.227020] wl12xx spi4.0: firmware: requesting wl1251-fw.bin
[87212.474731] wl12xx spi4.0: firmware: requesting wl1251-nvs.bin
[87213.086425] wl1251: 151 tx blocks at 0x3b788, 35 rx blocks at 0x3a780
[87213.102020] wl1251: firmware booted (Rev 4.0.4.3.7)
[87213.203887] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[87214.766113] wl1251: down
[87216.930847] wl1251: 151 tx blocks at 0x3b788, 35 rx blocks at 0x3a780
[87216.931488] wl1251: firmware booted (Rev 4.0.4.3.7)
[87217.032012] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[87218.016052] wlan0: authenticate with AP 00:18:39:ce:dc:5a
[87218.018829] wlan0: authenticated
[87218.018859] wlan0: associate with AP 00:18:39:ce:dc:5a
[87218.022552] wlan0: RX AssocResp from 00:18:39:ce:dc:5a (capab=0x431 status=0 aid=2)
[87218.022583] wlan0: associated
[87218.113250] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

---

That's output from loading drivers and associating with my WPA2 hidden network, so same setup as Yours. Check please. if Your output isn't kicking out any errors, or missing any part. Or even better, paste it here?

Sorry in advance if dmsg output is irrelevant for fixing this problem - as i said, I'm no way an expert here.

Estel 2011-06-19 00:29

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
I think i was able to reproduce (or semi-reproduce) the problem. After messing up for some time with loading and reloading drivers via selector applet, sudden of nothing I'm not able anymore to connect into my network. Steps are exactly like pierrem reported, with exception that after some time of wifi-status icon flashing, I got message:

"Error connection to Internet: could not receive IP address from server. Try again?" (I get communicate in my language, so translation may be not accurate to the letter - of course trying again don't help)

From that point, nor bleeding edge or stock drivers are able to connect me.

dmesg print output as usual, stating that i was authenticated with AP - so it's likely really part with negotiating IP from DHCP that fail.

Strange thing is that other computers in my network doesn't have this issue, and if i reboot N900, initial connection to Wifi work. Ho ever, if i use applet to disable and enable wifi, I'm not able to connect anymore. What on earth? :confused:

I'll check if wifi-switcher work (uinstaled it already), and update my findings soon.

Anyway, could it be that way selector applet unload and load drivers screw something badly with configuration? I double checked settings and disabled/enabled again auto obtaining IP from dhcp. Will check if static IP work.

The most FRUSTRATING part is that i have absolutely no idea what i did to "trigger" this error, and now I'm unable to get rid of it ;) Prior to that point, i was using selector applet to enable and disable my wifi quite often, sometimes even load bleeding edge - without ANY troubles. for worst-case scenario i got backup, but I'm really curious to find source of problems...

// Edit 1
Reinstalling selector applet doesn't help. I checked from my router side, and its true that my N900 is "connected" - can see client and signal quality via tomato firmware, ho ever IP is not obtained. the strange thing is that MAC reported to router is different than my usual N900 MAC? :confused: I got static dhcp rule that always worked, now i see that connection attempt is made with totally different MAC. Still, I'm sure that it's me trying to connect. and keep in mind that we're talking about stock drivers attempts.

I wonder if that can be a clue to our problem - anyway, keep in mind that i DON'T have MAC filter set on my router, so it can't be direct source of problems. Will investigate further.

// Edit 2

Just small update - at every attempt to connect again via prompt asking me if i want to try again, MAC reported to router is the same. ho ever, if i shut down wifi via selector, and re-enable it again, mac changes to another fresh one. Also, first 3 portions of max adress (parts between ":" ) are the same, only last 3 parts are different.

IDK if this is normal behaviour for wifi connection in stage of negotiating IP address (or any post-wpa2 authentication), so this may be totally irrelevant info. If so, correct me.

With bleeding edge drivers situation is the same - constant N900 MAC reported to router when i re-apply attempts to connect, but switching drivers on and off result in MAC that have 3 last portions different. Still don't know if this info is valuable, i hope so...

Pyro1099 2011-06-19 00:29

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers [0.2.0]
 
Quote:

Originally Posted by laasonen (Post 1030367)
What theme are you using? All my three themes show clearly, if its toggled.

Just the Humanity theme.

laasonen 2011-06-19 01:00

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Quote:

Originally Posted by Estel (Post 1031735)
mac changes to another fresh one. Also, first 3 portions of max adress (parts between :) are the same, only last 3 parts are different.

0.1.x versions first saved the mac-address and then recovered it after loading the drivers, but now that you can disable them completely, its not possible easily. If thats the problem, I could save the mac-address to some file and recover it from there.

Quote:

Originally Posted by Pyro1099 (Post 1031736)
Just the Humanity theme.

Installed the Humanity Theme 0.6. Looks pretty clear to me.
http://hosted.laasonen.net/attachment-0MHYWV.png

Estel 2011-06-19 01:04

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
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 - just the moment i check "obtain IP automatically" and maemo re-enable connection (after settings were saved) I'm not able to connect anymore. I'm most confused...

Now, I'm almost sure that this bug isn't related directly to selector applet, but something with maemo connectivity or routers behaviour - still, somehow this bug is triggered by usage of selector applet.

// Edit

May it be (copyright enya ;) ) that so many changes of MAC and connection attempts make routers deny leasing IP addresses to DHCP anymore? Full DHCP pool or something? I doubt, cause if so, why i connect without problems after reboot... (I mean the first, initial connection done by maemo. Still, further connection attempt done by maemo after enabling DHCP IP fail - really, what the hell is going on?:confused:)

laasonen 2011-06-19 01:10

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Quote:

Originally Posted by Estel (Post 1031750)
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.

AgogData 2011-06-19 01:16

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
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 ?

Estel 2011-06-19 01:24

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
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.

Estel 2011-06-19 01:34

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
[Solved]!!!

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 :)

laasonen 2011-06-19 02:31

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Quote:

Originally Posted by Estel (Post 1031762)
[Solved]!!!

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 :D I'm going get some sleep also :)

casketizer 2011-06-19 12:10

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Laasonen, Thanks again for implementing my ideas. This is one reason why I love N900 and its community here!

Regarding the dhcp issue: frequent mac changes might also trigger intrusion detection on some routers. I use static IPs on my own networks anyway.

pierrem 2011-06-20 07:30

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Quote:

Originally Posted by laasonen (Post 1031781)
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 :D 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

laasonen 2011-06-20 09:49

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
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.

New version is now on the autobuilder queue :)

gabby131 2011-06-20 10:55

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
is a custom wifi driver can be selected? im using aircrack to illegaly hack my home wifi :D

apologies if this was alredy mentioned and for my slothness for reading and searching >_<

gabby131 2011-06-20 11:10

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.1]
 
Quote:

Originally Posted by gabby131 (Post 1032591)
is a custom wifi driver can be selected? im using aircrack to illegaly hack my home wifi :D

apologies if this was alredy mentioned and for my slothness for reading and searching >_<

i am such a noob.......thanks, i found my answer! :D

Dragoss91 2011-06-20 14:20

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.2]
 
Offtopic : How do you added that status menu incon for FM transmitter ?

laasonen 2011-06-20 14:48

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.2]
 
Its the FMTX applet. Its usually only open when the FM transmitter is on, but if you have CSSU you can set it to be always visible via gconf:
Code:

gconftool-2 -s /apps/osso/maemo-statusmenu-fmtx/always_visible -t bool true

Dragoss91 2011-06-20 18:15

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.2]
 
1 Attachment(s)
Thank you , one more problem , after I made ur mod I cant connect to a wireless network where I could've connected before .

Attachment 20940

AgogData 2011-06-20 18:49

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.2]
 
@ laasonen : After the last update the code you gave me to disable the auto opening of available connection (i think it was removing about 4 lines) is lost, can you post it again ?

laasonen 2011-06-20 19:01

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.2]
 
Quote:

Originally Posted by Dragoss91 (Post 1033050)
Thank you , one more problem , after I made ur mod I cant connect to a wireless network where I could've connected before .

Attachment 20940

Sounds like a DHCP problem. Its probably caused by my applications last version, which filled router's DHCP lease table by changing mac address frequently. It should be fixed by rebooting your router and making sure you are using the latest version of this application.

Quote:

Originally Posted by AgogData (Post 1033093)
@ laasonen : After the last update the code you gave me to disable the auto opening of available connection (i think it was removing about 4 lines) is lost, can you post it again ?

Remove lines 144-146:
Code:

                        if driver > 0:
                                proxy = self.Parent.bus.get_object('com.nokia.icd_ui', '/com/nokia/icd_ui', 'com.nokia.icd_ui')
                                proxy.show_conn_dlg(False)


Dragoss91 2011-06-20 21:25

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.2]
 
I can not reboot that router because it's from a pub , and the version of this app it's 0.2.1-2 , is this the last one ?

laasonen 2011-06-20 21:31

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.2]
 
Quote:

Originally Posted by Dragoss91 (Post 1033348)
I can not reboot that router because it's from a pub , and the version of this app it's 0.2.1-2 , is this the last one ?

0.2.2-2. You can easily check that from packages interface.

Estel 2011-06-20 22:01

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.2]
 
Quote:

Originally Posted by Dragoss91 (Post 1033348)
I can not reboot that router because it's from a pub , and the version of this app it's 0.2.1-2 , is this the last one ?

Gratz, You just performed pro Denial of Service attack at Your favorite pub wifi. It denied access not only for You, but for all Wifi users there. who was first to say that N900 is hacker phone? ;)

Disclaimer: Don't worry, it wasn't Your fault, and it won't bring You any legal consequences (although my statement about denial of service is somehow true - in fact totally true except "pro" part ;) ). It was just that i can't stop myself to write it :D )

laasonen, Thank You for new update and it's really my pleasure to contribute even in such small way.

Tested new package - works fine, in every possible combination my MAC remain the same (except event just after update via 3G and enabling wifi later - got message about "unable to restore mac" - for obvious reasons, wifi was disabled on old version, so new version wasn't able to locate non-existing MAC file :) ).

I also hit into too-fast-respawn bug You mentioned and i agree that it shouldn't be problem in real-life situations. Ho ever, if it happens, it's quite irritating, cause You must wait long time before using wifi again (or reboot phone). May is ask about rationale for restarting osso-wlan? I'm sure there is one, again I'm asking out-of-curiosity. It's related to MAC problem?

---

Anyway, for lazy ones here is link to vote for package - we want to finally made it into testing, don't we? Voting is also important form of contribution, so pierrem and other, if You like it, please vote for this package (after testing).

Dragoss91 2011-06-20 22:13

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.2]
 
@laasonen - Thanks , I just updated it with FAM . I hope it will fix that problem .

@Estel - ahahahahahah that was funny :D:D:D . That router didn't deny all devices because a friend with an iphone 3 could connect and use their internet .

laasonen 2011-06-20 22:53

Re: [ANNOUNCE] Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers and shut down WLAN complitely [0.2.2]
 
Quote:

Originally Posted by Estel (Post 1033386)
I also hit into too-fast-respawn bug You mentioned and i agree that it shouldn't be problem in real-life situations. Ho ever, if it happens, it's quite irritating, cause You must wait long time before using wifi again (or reboot phone). May is ask about rationale for restarting osso-wlan? I'm sure there is one, again I'm asking out-of-curiosity. It's related to MAC problem?

I was just reading the source of the wifi-switcher when pierrem said that its working on him and saw that its restarting the wlancond. Couple other scripts seemed to do the same thing also, so I decided to just make my script restart it too :D

I'll take it off, because even the test script without it was working for him. If someone is having trouble with the new 0.2.2-3 try to uncomment these lines:
Code:

STOP="`stop wlancond`" 2> /dev/null
START="`start wlancond`" 2> /dev/null
if [ "$?" -gt "0" ]; then
        echo "Error while restarting wlancond, propably respawning too fast"
fi

From these files:
/sbin/load-bleeding-edge-drivers.sh
/sbin/load-stock-drivers.sh


All times are GMT. The time now is 07:23.

vBulletin® Version 3.8.8