RE: Help with ActivateConnection
- From: "Andy Maginnis" <jam smru co uk>
- To: <networkmanager-list gnome org>
- Subject: RE: Help with ActivateConnection
- Date: Tue, 30 Nov 2010 17:10:49 -0000
I have this working now, I just needed to set the SERVICE NAME to
org.freedesktop.NetworkManagerUserSettings
instead of
org.freedesktop.NetworkManagerSystemSettings
dbus-send \
--system \
--print-reply \
--type=method_call \
--dest="org.freedesktop.NetworkManager" \
/org/freedesktop/NetworkManager \
"org.freedesktop.NetworkManager.ActivateConnection" \
string:"org.freedesktop.NetworkManagerUserSettings" \
objpath:"/org/freedesktop/NetworkManagerSettings/0" \
objpath:"/org/freedesktop/NetworkManager/Devices/5" \
objpath:"/"
-----Original Message-----
From: networkmanager-list-bounces gnome org
[mailto:networkmanager-list-bounces gnome org] On Behalf Of Andy
Maginnis
Sent: 30 November 2010 15:20
To: networkmanager-list gnome org
Subject: Help with ActivateConnection
I am trying to activate my 3 ZTE MF112 using ActivateConnection. I can
successfully connect using the
gui connection manager, however I am trying to script the process so I
can automatically start the
connection at a set time each day for a short period. I am using NM 0.7
and
Linux op-ubuntu 2.6.31-22-generic #67-Ubuntu SMP Sat Oct 16 19:10:07 UTC
2010 i686 GNU/Linux
I can disconnect the connection if its activated using the gui, I use
dbus-send \
--system \
--print-reply \
--type=method_call \
--dest="org.freedesktop.NetworkManager" \
/org/freedesktop/NetworkManager \
"org.freedesktop.NetworkManager.DeactivateConnection" \
objpath:"/org/freedesktop/NetworkManager/ActiveConnection/16"
However when I try to connect using ActivateConnection
dbus-send \
--system \
--print-reply \
--type=method_call \
--dest="org.freedesktop.NetworkManager" \
/org/freedesktop/NetworkManager \
"org.freedesktop.NetworkManager.ActivateConnection" \
string:"org.freedesktop.NetworkManagerSystemSettings" \
objpath:"/org/freedesktop/NetworkManagerSettings/0" \
objpath:"/org/freedesktop/NetworkManager/Devices/5" \
objpath:"/"
I get the error-
Error org.freedesktop.NetworkManager.ConnectionNotGsm: The connection
was not a GSM connection.
If I use gconftool-2 --dump /system/networking/connections/1 I can see
the settings for my 3g modem. Im not sure
how these are passed to the ActivateConnection command. I am guessing
that the Connection string is wrong
objpath:"/org/freedesktop/NetworkManagerSettings/0" \
but im not sure what to mod it to, i've tried quite a few options but am
getting nowhere.
Does anyone have any suggestions?
Below are the connection settings that I see if I use the GUI to connect
the modem.
/org/freedesktop/NetworkManager/ActiveConnection/17---Connection---/org/
freedesktop/NetworkManagerSettings/0
/org/freedesktop/NetworkManager/ActiveConnection/17---Default---
/org/freedesktop/NetworkManager/ActiveConnection/17---Devices---
/org/freedesktop/NetworkManager/Devices/5
/org/freedesktop/NetworkManager/ActiveConnection/17---ServiceName---org.
freedesktop.NetworkManagerUserSettings
/org/freedesktop/NetworkManager/ActiveConnection/17---SpecificObject---/
/org/freedesktop/NetworkManager/ActiveConnection/17---State---2
/org/freedesktop/NetworkManager/ActiveConnection/17---Vpn---
Here also are my modem device settings
/org/freedesktop/NetworkManager/Devices/5---Capabilities---1
/org/freedesktop/NetworkManager/Devices/5---DeviceType---3
/org/freedesktop/NetworkManager/Devices/5---Dhcp4Config---/
/org/freedesktop/NetworkManager/Devices/5---Driver---option1
/org/freedesktop/NetworkManager/Devices/5---Interface---ttyUSB1
/org/freedesktop/NetworkManager/Devices/5---Ip4Config---/org/freedesktop
/NetworkManager/IP4Config/8
/org/freedesktop/NetworkManager/Devices/5---Ip6Config---/
/org/freedesktop/NetworkManager/Devices/5---Managed---1
/org/freedesktop/NetworkManager/Devices/5---State---8
/org/freedesktop/NetworkManager/Devices/5---Udi---/org/freedesktop/Modem
Manager/Modems/3
_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
http://mail.gnome.org/mailman/listinfo/networkmanager-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]