Skip to contentSkip to conversation

Notebook Hardware Key for Wireless LAN

DISCUSSION Marcus Woletz 6 participants 11 messages Oct 5, 2005 – Oct 10, 2005

lore
Share & tools
lore
#0 lore raw

Hello all,

since a few weeks I try to use hotplug so that the WLAN interface is brought up when it is activated via the hardware key.

The notebook is a Samsung X20 with
Intel ipw2200 wireless chip set.

The hotplug system seems to recognize the activation of the interface via the hardware key because an event is generated which calls the firmware agent, which then loads the firmware. But even when switching all debug mechanisms on it seems to be only that one and only firmware event thatb is generated. When switching the interface off via the notebook key, it seems that no event is generated at all (no additional info in /var/log/messages or /events).

Because it is a bit difficult to get a general knowledge of the hotplug system your help is appreciated:

how can I achieve that an event is generated (beyond the one that is generated to load the firmware) when switching on and off the WLAN interface?

In conclusion which agent must I supply
(filename and directory) to achieve that it
is called when switching the WLAN on/off?

Where can I get more Information to really understand the interaction between hardware, hotplug, HAL, dbus and udev? I've some basic knowledge about the different systems, but none about their interaction and the files that participate (agents etc.)

The documentation I've found unfortunately has not answered my questions.

Many thank in advance!

bye
Marcus

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 5 lines · Marcus Woletz

Hello all,

since a few weeks I try to use hotplug so that
the WLAN interface is brought up when it is
activated via the hardware key.

What is the "hardware key"? And how is it detected by Linux?

thanks,

greg k-h

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to Marcus Woletz

Hi Greg,

Thank you very much for your answer

(and sorry for the inconvenience with the PM.
I was too stupid to send the answer to the list.
I hope it goes now to the right place and right
thread ;-)

Greg KH wrote:
[...]

Quoted 1 line

What is the "hardware key"? And how is it detected by Linux?

The Button in the notebook case that turns on and off the WLAN interface. In the Samsung X20 it seems that the button turns the interface on and off without interaction with the OS.
I really don't know how the button is detected by Linux (if I knew that I wouldn't waste your time here ;-)

It must be any mechanism in Linux so that hotplug can generate an event to load the firmware when the WLAN interface is switched on the first time.
Now I want use this mechanism to generate "on" and "off" events to do an ifup/ifdown.
Because I don't know how the kernel generates events and sends it to the hotplug dispatcher and because it seems that really no events are generated beside the "firmware load" event when switching on/off the interface I need your help.

Quoted 5 lines

thanks,

greg k-h

bye
Marcus

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to Marcus Woletz
Quoted 9 lines · Marcus Woletz

Hi Greg,

Thank you very much for your answer

(and sorry for the inconvenience with the PM.
I was too stupid to send the answer to the list. I hope it goes now to the right place and right thread ;-)

Quoted 8 lines

Greg KH wrote:
[...]

Quoted 1 line

What is the "hardware key"? And how is it detected by Linux?

The Button in the notebook case that turns on and off the WLAN interface. In the Samsung X20 it seems that the button turns the interface on and off without interaction with the OS.

Then there's no way that Linux can generate an event based on it. Most likely it's just a hardware switch to the network device, my laptop has the same thing.

So, sorry, I don't think this is going to work for you, unless you figure out some way for Linux to see the button.

greg k-h

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#4 lore raw
In reply to Marcus Woletz
Quoted 19 lines · Greg KH
Quoted 9 lines · Marcus Woletz

Hi Greg,

Thank you very much for your answer

(and sorry for the inconvenience with the PM.
I was too stupid to send the answer to the list. I hope it goes now to the right place and right thread ;-)

Quoted 8 lines

Greg KH wrote:
[...]

Quoted 1 line

What is the "hardware key"? And how is it detected by Linux?

The Button in the notebook case that turns on and off the WLAN interface. In the Samsung X20 it seems that the button turns the interface on and off without interaction with the OS.

Quoted 7 lines

Then there's no way that Linux can generate an event based on it. Most likely it's just a hardware switch to the network device, my laptop has the same thing.

So, sorry, I don't think this is going to work for you, unless you figure out some way for Linux to see the button.

It might be accessible through ACPI with a vendor-specific module. Have you asked on acpi list? Although I don't recall seeing any samsung-specific modules...

--
Dmitry

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#5 lore raw
In reply to Marcus Woletz
Quoted 19 lines · Greg KH
Quoted 9 lines · Marcus Woletz

Hi Greg,

Thank you very much for your answer

(and sorry for the inconvenience with the PM.
I was too stupid to send the answer to the list. I hope it goes now to the right place and right thread ;-)

Quoted 8 lines

Greg KH wrote:
[...]

Quoted 1 line

What is the "hardware key"? And how is it detected by Linux?

The Button in the notebook case that turns on and off the WLAN interface. In the Samsung X20 it seems that the button turns the interface on and off without interaction with the OS.

Quoted 6 lines

Then there's no way that Linux can generate an event based on it. Most likely it's just a hardware switch to the network device, my laptop has the same thing.

So, sorry, I don't think this is going to work for you, unless you figure out some way for Linux to see the button.

Marcus, you may find something here:
http://rfswitch.sourceforge.net/

Kay

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#6 lore raw
In reply to Marcus Woletz

Hi Greg,

Greg KH schrieb:
[...]

Quoted 9 lines
Quoted 4 lines

The Button in the notebook case that turns on and off the WLAN interface. In the Samsung X20 it seems that the button turns the interface on and off without interaction with the OS.

Then there's no way that Linux can generate an event based on it. Most likely it's just a hardware switch to the network device, my laptop has the same thing.

But the hotplug system is definitly calling the hotplug firmware agent when the WLAN interface is turned on the first time. And there are some firmware events generated. So I think that the hotplug system sees that the interface is switched on. The only problem is that these events are generated only one time and there's no event when switching off WLAN.

Quoted 6 lines

So, sorry, I don't think this is going to work for you, unless you figure out some way for Linux to see the button.

greg k-h

I don't give up so fast :-)

bye
Marcus

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#7 lore raw
In reply to Marcus Woletz

Hi Dmitry,

Dmitry Torokhov schrieb:
[...]

Quoted 3 lines

It might be accessible through ACPI with a vendor-specific module. Have you asked on acpi list? Although I don't recall seeing any samsung-specific modules...

OK, if this is really the only way to the job: I think it shouldn't be a very complicated task to get the state of the button. So I'll try to write a small app to do the task. I will look at Samsung if there's some documentation.

Quoted 4 lines

--
Dmitry

Thanks for your help.

bye
Marcus

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#8 lore raw
In reply to Marcus Woletz

Dear Kay,

Kay Sievers wrote:

[...]

Quoted 5 lines

Marcus, you may find something here:
http://rfswitch.sourceforge.net/

Kay

thank you for this hint. I had a short look on the site. It seems that rfswitch only privides a mechanism to switch the WLAN hardware on and off with the software implemented switch. I need the opposite way :-/ But eventually I just can find the information to do the task on the mentioned site.

bye

Marcus

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#9 lore raw
In reply to Marcus Woletz
Quoted 3 lines · Greg KH

Then there's no way that Linux can generate an event based on it. Most likely it's just a hardware switch to the network device, my laptop has the same thing.

The Compaq laptops with Broadcom 430x wireless chipset have a switch as well, the state of this switch can be checked when the chipset is enabled (yeah, we're reverse engineering it).

Most likely, something similar happens with this chipset -- but then you already need a driver that can do that loaded, so ...

johannes

#10 lore raw
In reply to Marcus Woletz
Quoted 11 lines · On Fri, 07 Oct 2005 19:31:47 +0200 Marcus Woletz wrote:

Greg KH schrieb:
[...]

Quoted 8 lines
Quoted 4 lines

The Button in the notebook case that turns on and off the WLAN interface. In the Samsung X20 it seems that the button turns the interface on and off without interaction with the OS.

Then there's no way that Linux can generate an event based on it. Most likely it's just a hardware switch to the network device, my laptop has the same thing.

Quoted 5 lines

But the hotplug system is definitly calling the hotplug firmware agent when the WLAN interface is turned on the first time. And there are some firmware events generated. So I think that the hotplug system sees that the interface is switched on. The only problem is that these events are generated only one time and there's no event when switching off WLAN.

For ipw2200 you can try to poll the "rf_kill" attribute in sysfs:

/* 0 - RF kill not enabled
1 - SW based RF kill active (sysfs) 2 - HW based RF kill active
3 - Both HW and SW baed RF kill active */