Posts Tagged ‘commands’

Internet Connection via the command-line

I have been tethering via USB a lot lately.

I don’t connect to the internet using my laptop directly but instead, I access the N900’s data connection via SSH tunnelling (port-forwarding). I had to resort to this because I didn’t want to interfere with the network that my laptop was already connected to. So the process is, connect in PC Suite Mode (USB Networking), create the tunnel, connect to the Internet.

Anyway, to make life easier I was looking for a way to initiate the internet-connection via the command-line on my laptop. Thankfully, the t.m.o forum was a great resource.

The following command triggers the N900 to initiate the T-Mobile data-connection:

dbus-send --type=method_call --system /com/nokia/icd string:0000-0000-0000-0000 uint32:0

where 0000-0000-0000-0000 is the ID of the connection. The list of connections can be found using

gconftool-2 -R /system/osso/connectivity/IAP

Look for the value after ‘/IAP/’. Here is a snippet of the output:
ipv4_autodns = true
ipv4_address =
ipv4_type = AUTO
ipv4_gateway =
name = T-Mobile Internet
type = GPRS
proxytype = NONE
gprs_password =
ask_password = false
ipv4_dns2 =
sim_imsi = 3102612312319
ipv4_dns1 =
ipv4_netmask =
gprs_username =
gprs_accesspointname =

I now run the dbus command from a script and voila! the internet is ready and all I now need to do is access it via port-forwarding on my laptop.
ssh -D 9999 user@n900

and SOCKS proxy settings in Firefox of course (Go FoxyProxy!).


Categories: likes, Maemo, N900, T-Mobile Tags: , , ,