Re: Creating adhoc wireless Network
- From: Dan Williams <dcbw redhat com>
- To: nexus aflb com
- Cc: networkmanager-list gnome org
- Subject: Re: Creating adhoc wireless Network
- Date: Wed, 01 Jul 2009 08:29:31 -0400
On Wed, 2009-07-01 at 05:27 -0400, nexus aflb com wrote:
> Hi there,
>
> I try to create a new adhoc wireless connection using DBUS.
>
> It's pretty hard coz I don't find any documentantion. I've only the d-feet
> utility to see the method and object path to use.
>
> I would like to create a third party apps (python / bash but not c) to :
>
> *-create a new adhoc connection with provided essid, wep encryption and
> key (no matter if the key is stored in plain text in gconf for example)
> *-activate this connection
> *-deactivate this connection
> *-delete this connection (the only part I've successfully tested !!)
>
> Is there someone who can help me with this ?
http://projects.gnome.org/NetworkManager/developers/spec.html
Any network device setup needs a Connection associated with it, which
contains all the settings for the device, including wifi, IP, DNS.
Those connections are provided by settings services, of which there are
two: user and system. These settings services store all the Connections
somewhere (gconf, kconfig, flat files, etc) and provide them to
NetworkManager and other programs that want network information.
So, to do an adhoc network, you'd first make sure that its Connection is
provided by a settings service (ie, that the connection has already been
set up), and then you tell NM to activate that connection (see the
ActiveConnection call on the org.freedesktop.NetworkManager dbus
interface).
To get the Connection provided by a settings service, you either set it
up through the connection editor, or programmatically ask the system
settings service to create it. It's also possible to create it in the
user settings service, but that's a bit more obscure due to security
concerns with exposing user passwords and secrets.
> (the main goal is to create an adhoc wireless network to provide a one
> shot tiny http server (woof) with my calendar.ics in order to subscribe
> and sync my iphone with it. I don't want to use Gcal or anything else, I
> need point to point network)
Yeah, that should work. You either need to figure out the IP address of
the connection that got created (which NM can provide to you, each
connection you active creates an ActiveConnection object on the dbus
interface which implements the
org.freedesktop.NetworkManager.Connection.Active interface, then you get
the device from that object that you care about, then you ask the device
for its current IPv4 settings) or bind your server to 0.0.0.0.
> (second goal is to be able to create a third apps to use hotspot with
> spécific secrets I don't want to provide to some users).
Be aware that we don't necessarily expect WPA adhoc mode to work that
well with current kernel drivers, it's fairly untested but reported by
some to work, and not to work by others. You'll need a fairly recent
wpa_supplicant installed (0.6.9 or later I think) to get adhoc to work
reliably as well.
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]