Sometimes you end up somewhere with your laptop where you just can’t find any open WiFi. Luckily you have a Nokia N95 and a USB data cable. I’m going to show you how to tether your N95 to your laptop via USB the quick and dirty command line way, as well as the prettier GUI way. In these examples I am running Fedora 9 and Gnome.
Warning: You probably only want to do this if you have a decent data plan. Using 3G data can result in a very large bill!
[user@radon ~]$ dmesg
usb 4-2: new full speed USB device using uhci_hcd and address 16
usb 4-2: configuration #1 chosen from 1 choice
cdc_acm 4-2:1.10: ttyACM0: USB ACM device
usb 4-2: bad CDC descriptors
usb 4-2: bad CDC descriptors
usb 4-2: New USB device found, idVendor=0421, idProduct=0070
usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 4-2: Product: Nokia N95 8GB
usb 4-2: Manufacturer: Nokia
Note the line that says cdc_acm 4-2:1.10: ttyACM0: USB ACM device. This tells us that the phone’s modem is at /dev/ttyACM0.
Now we move on to the quick and dirty command line setup. Feel free to skip to the GUI setup below if you aren’t very comfortable with the command line.
Modem = /dev/ttyACM0
Baud = 460800
SetVolume = 0
Dial Command = ATDT
Init1 = ATZ
Init3 = ATM0
FlowControl = CRTSCTS[Dialer USB]
Username = user
Password = pass
Phone = *99***1#
Stupid Mode = 1
Init1 = ATZ
Inherits = Modem0
#!/bin/bash
#PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH
echo “# created by pppd” > /etc/resolv.conf
echo “nameserver ${DNS1}” >> /etc/resolv.conf
echo “nameserver ${DNS2}” >> /etc/resolv.conf
chmod go+r /etc/resolv.conf
Don’t forget to chmod 755 /etc/ppp/ip-up.local
[root@radon ~]# wvdial USB
–> WvDial: Internet dialer version 1.60
–> Cannot get information for serial port.
–> Initializing modem.
–> Sending: ATZ
ATZ
OK
–> Sending: ATM0
ATM0
OK
–> Modem initialized.
–> Sending: ATDT*99***1#
–> Waiting for carrier.
ATDT*99***1#
CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}”}&} }*} } g}%~
–> Carrier detected. Starting PPP immediately.
–> Starting pppd at Sun Oct 19 16:48:56 2008
–> Pid of pppd: 8028
–> Using interface ppp0
–> local IP address 172.28.53.106
–> remote IP address 10.6.6.6
–> primary DNS address 207.181.101.4
–> secondary DNS address 207.181.101.5
[root@radon ~]# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12767 errors:0 dropped:0 overruns:0 frame:0
TX packets:12767 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:714652 (697.9 KiB) TX bytes:714652 (697.9 KiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:172.28.53.106 P-t-P:10.6.6.6 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:64 (64.0 b) TX bytes:94 (94.0 b)
[root@radon ~]# ping simplehelp.net
PING simplehelp.net (74.52.95.42) 56(84) bytes of data.
64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=1 ttl=46 time=110 ms
64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=2 ttl=46 time=102 ms
64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=3 ttl=46 time=164 ms
64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=4 ttl=46 time=130 ms
64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=5 ttl=46 time=149 ms
^C
— simplehelp.net ping statistics —
5 packets transmitted, 5 received, 0% packet loss, time 4513ms
rtt min/avg/max/mdev = 102.061/131.349/164.376/23.190 ms
^CCaught signal 2: Attempting to exit gracefully…
–> Terminating on signal 15
–> Connect time 4.7 minutes.
–> Disconnecting at Sun Oct 19 18:24:32 2008
Now, if all that command line stuff scares you, here’s how to make it work using Gnome’s GUI:
Some of you may be wondering why I chose not to use Network Manager. It’s quite simply due to the fact that mobile broadband support in Network Manager is in it’s infancy and I found it to be virtually unusable. Once Network Manager’s mobile broadband support becomes better, I’ll rewrite this tutorial based on it.