I want to make sure I'm not missing something before I file an RFE. I'd like to be able to enable/disable wireless (or wired, for that matter) networking from scripts. The nm-tool program seems like the logical place for this functionality, but it doesn't appear to actually have it at this point.
Specifically, my laptop generates a custom Sony ACPI button event when the wireless antenna is switched on or off -- I'd like to automatically enable or disable wireless networking correspondingly. Is there an easy way to do this that I'm just not seeing? Thanks.
(Also, is there a way to supress the pop-up messages about changes in connections status? I find them more obtrusive and distracting than helpful.)
On Mon, 2007-12-03 at 10:43 -0500, Matthew Miller wrote:
I want to make sure I'm not missing something before I file an RFE. I'd like to be able to enable/disable wireless (or wired, for that matter) networking from scripts. The nm-tool program seems like the logical place for this functionality, but it doesn't appear to actually have it at this point.
While I can see a use for this functionality in general...
Specifically, my laptop generates a custom Sony ACPI button event when the wireless antenna is switched on or off -- I'd like to automatically enable or disable wireless networking correspondingly. Is there an easy way to do this that I'm just not seeing? Thanks.
The right fix for this is for the kernel to hook the ACPI event properly into generating a kill switch event rather than piling on hacks ;)
Jeremy
On Mon, Dec 03, 2007 at 11:24:31AM -0500, Jeremy Katz wrote:
Specifically, my laptop generates a custom Sony ACPI button event when the wireless antenna is switched on or off -- I'd like to automatically enable or disable wireless networking correspondingly. Is there an easy way to do this that I'm just not seeing? Thanks.
The right fix for this is for the kernel to hook the ACPI event properly into generating a kill switch event rather than piling on hacks ;)
Yup, but that's unlikely to actually happen anytime soon, particularly for this model of laptop.
Having a general interface lets one work around all sorts of similar cases, some of which may not be associated with ACPI events.
On Mon, 2007-12-03 at 14:17 -0500, Matthew Miller wrote:
On Mon, Dec 03, 2007 at 11:24:31AM -0500, Jeremy Katz wrote:
Specifically, my laptop generates a custom Sony ACPI button event when the wireless antenna is switched on or off -- I'd like to automatically enable or disable wireless networking correspondingly. Is there an easy way to do this that I'm just not seeing? Thanks.
The right fix for this is for the kernel to hook the ACPI event properly into generating a kill switch event rather than piling on hacks ;)
Yup, but that's unlikely to actually happen anytime soon, particularly for this model of laptop.
Well, if somebody doesn't do it, it's going to get harder and harder to use that functionality then with newer releases of the kernel or other parts.
Having a general interface lets one work around all sorts of similar cases, some of which may not be associated with ACPI events.
The general interface for rfkill switches _is_ the rfkill layer in the kernel. It doesn't just hook into the ACPI layer. It hooks into ACPI, the drivers themselves, and the normal input layer. Macs don't have ACPI, and their drivers can hook in just fine. The point is that if you hook into the rfkill layer, you no longer have to "work around all sorts of similar cases", because there arent any cases anymore, they all conform to the standard interface and Just Work.
Dan
On Mon, Dec 03, 2007 at 04:14:25PM -0500, Dan Williams wrote:
Yup, but that's unlikely to actually happen anytime soon, particularly for this model of laptop.
Well, if somebody doesn't do it, it's going to get harder and harder to use that functionality then with newer releases of the kernel or other parts.
The sonypi controller in this particular laptop (a Vaio U101) is somehow odd. Perhaps something's not getting initialized right, or something else is wrong... worked fine in Windows, but under Linux, many of the buttons send identical events. I worked with the driver maintainer a whole ago but we couldn't get it figured out. The wireless switch seems to be one of the things that at least sends a unique event, but I can't promise that it's something that's generally useful. Hence my hesitation.
Having a general interface lets one work around all sorts of similar cases, some of which may not be associated with ACPI events.
The general interface for rfkill switches _is_ the rfkill layer in the
I meant a general interface to control NetworkManager -- not just disabling wireless, but an easily scriptable way to do anything one can do by clicking.
On Mon, 2007-12-03 at 10:43 -0500, Matthew Miller wrote:
I want to make sure I'm not missing something before I file an RFE. I'd like to be able to enable/disable wireless (or wired, for that matter) networking from scripts. The nm-tool program seems like the logical place for this functionality, but it doesn't appear to actually have it at this point.
All the functionality is currently available with dbus-send. However, since that's the case, it would be nice to have a CLI tool that interfaces in a nicer manner than dbus-send. I'd like to have something like that too, but haven't had time to look into it. It would be a great opportunity for somebody to jump in.
Specifically, my laptop generates a custom Sony ACPI button event when the wireless antenna is switched on or off -- I'd like to automatically enable or disable wireless networking correspondingly. Is there an easy way to do this that I'm just not seeing? Thanks.
Jeremy has an excellent answer to this question :) There's already an rfkill framework in the kernel, your upstream Sony ACPI kernel module needs to hook into that. In the short term, if you _really_ don't want to make the world a better place by pressuring upstream Sony ACPI module authors to do the right thing, look at dbus-send, use the D-Bus property interface on the base NetworkManager object, and set the WirelessEnabled property to true/false depending on what the custom events say. By doing this and not making upstream better, you agree to sacrifice 3 small, adorable, mewing kittens each time you flip the rfkill switch.
(Also, is there a way to supress the pop-up messages about changes in connections status? I find them more obtrusive and distracting than helpful.)
We could add an option to the applet to disable them, yes.
Dan
On Mon, Dec 03, 2007 at 11:37:50AM -0500, Dan Williams wrote:
All the functionality is currently available with dbus-send. However, since that's the case, it would be nice to have a CLI tool that interfaces in a nicer manner than dbus-send. I'd like to have something like that too, but haven't had time to look into it. It would be a great opportunity for somebody to jump in.
Is there somewhere where all of the messages that can be sent are documented? It's a bit daunting....
Jeremy has an excellent answer to this question :) There's already an rfkill framework in the kernel, your upstream Sony ACPI kernel module needs to hook into that. In the short term, if you _really_ don't want to make the world a better place by pressuring upstream Sony ACPI module authors to do the right thing, look at dbus-send, use the D-Bus property
Guilt trip, eh? :)
interface on the base NetworkManager object, and set the WirelessEnabled property to true/false depending on what the custom events say. By doing this and not making upstream better, you agree to sacrifice 3 small, adorable, mewing kittens each time you flip the rfkill switch.
Ooooh, now *there's* the guilt trip. maybe I can do *both*. I'll go read up on rfkill now.
(Also, is there a way to supress the pop-up messages about changes in connections status? I find them more obtrusive and distracting than helpful.)
We could add an option to the applet to disable them, yes.
That would make me oh-so-happy. I'll sacrifice *any number* of kittens for you if you'll do this. :)
On Mon, 2007-12-03 at 11:37 -0500, Dan Williams wrote:
On Mon, 2007-12-03 at 10:43 -0500, Matthew Miller wrote:
I want to make sure I'm not missing something before I file an RFE. I'd like to be able to enable/disable wireless (or wired, for that matter) networking from scripts. The nm-tool program seems like the logical place for this functionality, but it doesn't appear to actually have it at this point.
All the functionality is currently available with dbus-send. However, since that's the case, it would be nice to have a CLI tool that interfaces in a nicer manner than dbus-send. I'd like to have something like that too, but haven't had time to look into it. It would be a great opportunity for somebody to jump in.
Is there a list of (important) dbus methods exported by NM? I'm trying to work out a way of bringing up a wireless network early in the boot process in F8 and have been unable to even get a list of devices.
Trying to run (which looks like it's supposed to work in 0.6):
import dbus bus = dbus.SystemBus() iface = bus.get_object('org.freedesktop.NetworkManager', '/org/freedesktop/NetworkManager') devs = iface.getDevices(dbus_interface='org.freedesktop.NetworkManager')
or
devs = iface.getDevices(dbus_interface='org.freedesktop.NetworkManager.Devices')
gives me:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "getDevices" with signature "" on interface "org.freedesktop.NetworkManager" doesn't exist
What am I missing?
Jonathan
On Mon, 2008-01-21 at 11:19 +0200, Jonathan Dieter wrote:
On Mon, 2007-12-03 at 11:37 -0500, Dan Williams wrote:
On Mon, 2007-12-03 at 10:43 -0500, Matthew Miller wrote:
I want to make sure I'm not missing something before I file an RFE. I'd like to be able to enable/disable wireless (or wired, for that matter) networking from scripts. The nm-tool program seems like the logical place for this functionality, but it doesn't appear to actually have it at this point.
All the functionality is currently available with dbus-send. However, since that's the case, it would be nice to have a CLI tool that interfaces in a nicer manner than dbus-send. I'd like to have something like that too, but haven't had time to look into it. It would be a great opportunity for somebody to jump in.
Is there a list of (important) dbus methods exported by NM? I'm trying to work out a way of bringing up a wireless network early in the boot process in F8 and have been unable to even get a list of devices.
Hmm, I'm about to land that functionality in F8 and rawhide in the next few weeks anyway...
Dan
Trying to run (which looks like it's supposed to work in 0.6):
import dbus bus = dbus.SystemBus() iface = bus.get_object('org.freedesktop.NetworkManager', '/org/freedesktop/NetworkManager') devs = iface.getDevices(dbus_interface='org.freedesktop.NetworkManager')
or
devs = iface.getDevices(dbus_interface='org.freedesktop.NetworkManager.Devices')
gives me:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "getDevices" with signature "" on interface "org.freedesktop.NetworkManager" doesn't exist
What am I missing?
Jonathan
-- fedora-devel-list mailing list fedora-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-devel-list
On Mon, 2008-01-21 at 12:26 -0500, Dan Williams wrote:
On Mon, 2008-01-21 at 11:19 +0200, Jonathan Dieter wrote:
Is there a list of (important) dbus methods exported by NM? I'm trying to work out a way of bringing up a wireless network early in the boot process in F8 and have been unable to even get a list of devices.
Hmm, I'm about to land that functionality in F8 and rawhide in the next few weeks anyway...
Dan
Brilliant. I guess I'll just wait, then. Thanks,
Jonathan
devel@lists.stg.fedoraproject.org