View Single Post
Posts: 107 | Thanked: 74 times | Joined on Jan 2010
#5
Ok it works fine
The only problem is that If I activate the dummy connection from the GUI then cannot disconnect from the GUI itself, but have to use a dbus call.

If the dummy connection is initated via dbus I can disconnect it both from dbus and from the GUI.

Now I'm using the following script to automate the process:
Code:
ifconfig usb0 192.168.2.15 up
route add default gw 192.168.2.14
echo nameserver 213.230.129.10 >/var/run/resolv.conf.ppp0
echo nameserver 217.200.200.42 >>/var/run/resolv.conf.ppp0
dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true
sleep 2
dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:DUMMY uint32:0
and to disconnect
Code:
dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true
rm /var/run/resolv.conf.ppp0
sudo route del default gw 192.168.2.14
sudo ifconfig usb0 0.0.0.0 down
echo nameserver 127.0.0.1 >/etc/resolv.conf
Is that correct?