On most laptops, there is a way to disable Wi-Fi either through function keys or kill switch. I am wondering if there is a way programmatically speaking to figure out whether or not Wi-Fi is currently disabled because the user has pressed the Wi-Fi function key or turned Wi-Fi off with the kill switch.
Martin
On Tue, 2009-10-27 at 12:24 -0400, Martin Dubuc wrote:
On most laptops, there is a way to disable Wi-Fi either through function keys or kill switch. I am wondering if there is a way programmatically speaking to figure out whether or not Wi-Fi is currently disabled because the user has pressed the Wi-Fi function key or turned Wi-Fi off with the kill switch.
At least on my laptop I have:
/sys/class/rfkill/rfkill1/state when my kill switch is thrown. This seems to cover the wifi. When I unkill, which enables bluetooth, I get rfkill2 as well with a state of 1. In my bios I have the switch set to cover cellular and bluetooth, so no switch can kill the wifi.
On Tue, Oct 27, 2009 at 12:24:10PM -0400, Martin Dubuc wrote:
On most laptops, there is a way to disable Wi-Fi either through function keys or kill switch. I am wondering if there is a way programmatically speaking to figure out whether or not Wi-Fi is currently disabled because the user has pressed the Wi-Fi function key or turned Wi-Fi off with the kill switch.
You can install "rfkill" package and use same-named command: % rfkill list 0: tpacpi_bluetooth_sw: Bluetooth Soft blocked: yes Hard blocked: no 2: phy0: Wireless LAN Soft blocked: no Hard blocked: no
On 27. okt. 2009 19:18, Tomasz Torcz wrote:
You can install "rfkill" package and use same-named command:
Nice app. Thanks for the tip. But does anyone have any idea about how to disable the hardware kill switch, when linux insists it is enabled no matter what position the switch is really set to:
- WLAN enabled (hardware switch set to "On"):
# rfkill list 0: hci0: Bluetooth Soft blocked: no Hard blocked: no 1: phy0: Wireless LAN Soft blocked: no Hard blocked: yes
- Switching to "off" shows this in the log: atkbd.c: Unknown key pressed (translated set 2, code 0xf1 on isa0060/serio0). atkbd.c: Use 'setkeycodes e071 <keycode>' to make it known. atkbd.c: Unknown key released (translated set 2, code 0xf1 on isa0060/serio0). atkbd.c: Use 'setkeycodes e071 <keycode>' to make it known.
# rfkill list 0: hci0: Bluetooth Soft blocked: no Hard blocked: no 1: phy0: Wireless LAN Soft blocked: no Hard blocked: yes
Still no luck...
On 10/27/2009 03:03 PM, Ola Thoresen wrote:
On 27. okt. 2009 19:18, Tomasz Torcz wrote:
You can install "rfkill" package and use same-named command:
Nice app. Thanks for the tip. But does anyone have any idea about how to disable the hardware kill switch, when linux insists it is enabled no matter what position the switch is really set to:
AIUI, this means there's a physical switch somewhere on the device.
On Tue, Oct 27, 2009 at 08:03:54PM +0100, Ola Thoresen wrote:
Nice app. Thanks for the tip. But does anyone have any idea about how to disable the hardware kill switch, when linux insists it is enabled no matter what position the switch is really set to:
What hardware is this?
On 27. okt. 2009 21:10, Matthew Garrett wrote:
On Tue, Oct 27, 2009 at 08:03:54PM +0100, Ola Thoresen wrote:
Nice app. Thanks for the tip. But does anyone have any idea about how to disable the hardware kill switch, when linux insists it is enabled no matter what position the switch is really set to:
What hardware is this?
02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
(And it is the physical switch I am turning on and off)
Has had this issue for years (really). Here is a message from 2007 to this list about it: http://www.opensubscriber.com/message/fedora-devel-list@redhat.com/7502379.h... - With a link to an ubuntuforum-thread about the same issue.
Not really expecting a fix now, but if anyone is interessted, I can submit a bug or try different kernels or whatever you need.
Rgds.
Ola (T)
On Tue, Oct 27, 2009 at 10:40:30PM +0100, Ola Thoresen wrote:
On 27. okt. 2009 21:10, Matthew Garrett wrote:
What hardware is this?
02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
(And it is the physical switch I am turning on and off)
What's it plugged into?
On 27. okt. 2009 22:48, Matthew Garrett wrote:
On Tue, Oct 27, 2009 at 10:40:30PM +0100, Ola Thoresen wrote:
On 27. okt. 2009 21:10, Matthew Garrett wrote:
What hardware is this?
02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
(And it is the physical switch I am turning on and off)
What's it plugged into?
What do you mean?
It is a built in PCI-card. And the switch is located in the front of the laptop. Similar to this: http://farm3.static.flickr.com/2415/2110359746_6502d6e204_o.jpg It has two positions, "On" and "Off" The card is clearly detected (the output above is from lspci), and flipping the switch is causing the messages about unknown keycodes in dmesg and /var/log/messages.
Rgds.
Ola (T)
On Wed, Oct 28, 2009 at 09:43:17AM +0100, Ola Thoresen wrote:
On 27. okt. 2009 22:48, Matthew Garrett wrote:
On Tue, Oct 27, 2009 at 10:40:30PM +0100, Ola Thoresen wrote:
On 27. okt. 2009 21:10, Matthew Garrett wrote:
What hardware is this?
02:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
(And it is the physical switch I am turning on and off)
What's it plugged into?
What do you mean?
It is a built in PCI-card. And the switch is located in the front of the laptop.
What make and model is the laptop?
Ewan
This is a very nice tool. Unfortunately, on my system running Fedora 11, I get the following erro: Can't open RFKILL control device: No such file or directory
Using strace, I discovered that rfkill is trying to open path /dev/rfkill, but this path does not exist on my system. Instead, it should try to open path /sys/class/rfkill.
Martin
On Tue, Oct 27, 2009 at 2:18 PM, Tomasz Torcz tomek@pipebreaker.pl wrote:
On Tue, Oct 27, 2009 at 12:24:10PM -0400, Martin Dubuc wrote:
On most laptops, there is a way to disable Wi-Fi either through function keys or kill switch. I am wondering if there is a way programmatically speaking to figure out whether or not Wi-Fi is currently disabled because the user has pressed the Wi-Fi function key or turned Wi-Fi off with the kill switch.
You can install "rfkill" package and use same-named command: % rfkill list 0: tpacpi_bluetooth_sw: Bluetooth Soft blocked: yes Hard blocked: no 2: phy0: Wireless LAN Soft blocked: no Hard blocked: no
-- Tomasz Torcz There exists no separation between gods and men: xmpp: zdzichubg@chrome.pl one blends softly casual into the other.
-- fedora-devel-list mailing list fedora-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-devel-list
On 10/27/2009 03:49 PM, Martin Dubuc wrote:
This is a very nice tool. Unfortunately, on my system running Fedora 11, I get the following erro: Can't open RFKILL control device: No such file or directory
Using strace, I discovered that rfkill is trying to open path /dev/rfkill, but this path does not exist on my system. Instead, it should try to open path /sys/class/rfkill.
Yep, that feature isn't in kernels that old.
Martin
On Tue, Oct 27, 2009 at 2:18 PM, Tomasz Torcz tomek@pipebreaker.pl wrote:
On Tue, Oct 27, 2009 at 12:24:10PM -0400, Martin Dubuc wrote:
On most laptops, there is a way to disable Wi-Fi either through function keys or kill switch. I am wondering if there is a way programmatically speaking to figure out whether or not Wi-Fi is currently disabled because the user has pressed the Wi-Fi function key or turned Wi-Fi off with the kill switch.
You can install "rfkill" package and use same-named command: % rfkill list 0: tpacpi_bluetooth_sw: Bluetooth Soft blocked: yes Hard blocked: no 2: phy0: Wireless LAN Soft blocked: no Hard blocked: no
-- Tomasz Torcz There exists no separation between gods and men: xmpp: zdzichubg@chrome.pl one blends softly casual into the other.
-- fedora-devel-list mailing list fedora-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-devel-list
On Tue, Oct 27, 2009 at 7:19 PM, Peter Jones pjones@redhat.com wrote:
On 10/27/2009 03:49 PM, Martin Dubuc wrote:
This is a very nice tool. Unfortunately, on my system running Fedora 11,
I
get the following erro: Can't open RFKILL control device: No such file or directory
Using strace, I discovered that rfkill is trying to open path
/dev/rfkill,
but this path does not exist on my system. Instead, it should try to open path /sys/class/rfkill.
Yep, that feature isn't in kernels that old.
I have the same problem with a Philco 1001 notebok (intel atom) and F11.
You mean a 2.6.30 kernel is too old?
On Wed, 2009-10-28 at 15:28 -0200, Paulo Cavalcanti wrote:
Yep, that feature isn't in kernels that old.
I have the same problem with a Philco 1001 notebok (intel atom) and F11.
You mean a 2.6.30 kernel is too old?
Exactly. Fedora tends to run with a pretty aggressive definition of 'old' :)
On Wed, Oct 28, 2009 at 11:04:25 -0700, Adam Williamson awilliam@redhat.com wrote:
On Wed, 2009-10-28 at 15:28 -0200, Paulo Cavalcanti wrote:
Yep, that feature isn't in kernels that old.
I have the same problem with a Philco 1001 notebok (intel atom) and F11.
You mean a 2.6.30 kernel is too old?
Exactly. Fedora tends to run with a pretty aggressive definition of 'old' :)
He must have missed my comment about kernel-2.6.31.5-96 being old when the kernel-2.6.31.5-97 build had been available in koji for less than a day.
On Tue, Oct 27, 2009 at 03:49:35PM -0400, Martin Dubuc wrote:
This is a very nice tool. Unfortunately, on my system running Fedora 11, I get the following erro: Can't open RFKILL control device: No such file or directory
Using strace, I discovered that rfkill is trying to open path /dev/rfkill, but this path does not exist on my system. Instead, it should try to open path /sys/class/rfkill.
No, it shouldn't -- not the same thing.
As Peter Jones pointed-out, you need a newer kernel for that tool to work.
Hth...
John