LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Switching WLAN ON/OFF from the switch? (http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/switching-wlan-on-off-from-the-switch-449505/)

Zmyrgel 05-29-2006 02:37 AM

Switching WLAN ON/OFF from the switch?
 
So, could anyone aid me fixing my laptop so that it seeks wireless LANs and connects to them when I turn on the "Wireless switch" on my Acer TM4202WLMi laptop?

I got it to connect to my wireless router with WPA encryption already. Now I want to automate this process.

If I understood correctly I can add etries to wpa_supplicant.conf so it will search networks presented in there starting from the one with highest priority? So I just add few specific networks and one general in there and it would be ready for that part.

So all I need is daemon which catches the signal from the button and issues the following scripts when switch is ON:

Code:

modprobe ipw3945
ifconfig eth1 up
wpa_supplicant -ieth1 -c/etc/wpa_supplicant -Dwext -B
dhcpcd eth1


and then when it's OFF.

Code:

ifconfig eth1 down
rmmod ipw3945

Main concern is how can I find out what signal the switch gives? And is the above codes correct or should there be any more?

meetscott 05-29-2006 03:47 AM

I maybe shouldn't even respond to this because I'm not an expert but I've been using wireless on Linux since 2001. On mine, a fujitsu, I can switch it off and the signal quality goes down to zero. There is no effect communicated to any of the hardware when the switch is thrown. As soon as I throw the switch again, the signal quality comes back up again. What you're descibing would be really cool but I don't think it's possible. At least at this stage of hardware evolution. I think you're stuck running the scripts manually. That's what I've always had to do. Maybe I'm wrong and Acer is doing something a little more sophisticated. I don't know any system that handles what you're describing better than the Macs. I'm watching this thread. I want desperately to be wrong.

FYI. You can list your interupts like this:
cat /proc/interrupts

Zmyrgel 05-30-2006 02:45 AM

Ok, I found out I can get the signal with acer_hk but I'm stuck with it... also if I switch the switch too often whole system freezes :(

Shall see if I get this thing done before moving...

Currently doing a reinstall on whole system... removed my windows from my laptop :)
Feeling like a child taking his first steps in the big world


All times are GMT -5. The time now is 05:58 AM.