MTN + Nokia N95 + Data cable + Linux (Calling all Linux gurus)

neonpill

Member
Joined
Jan 30, 2006
Messages
15
(Please excuse the long post, I have tried many options already, and this is the fruit of my frustration.)

I have recently, courtesy of iTalk Cellular, come into the possession of THE AMAZING, THE INCREDIBLE, DEFENDING CHAMPION OF THE WORLD TITLE Nokiaaaaaaaaaaaa... N95! One of the great features on the phone is its 3G (HSDPA) capabilities, which I would like to extend to make use of on my computer by using the "phone" as a modem.

Note: I am using Arch Linux as my operating system, so I can't get Nokia to do everything for me w.r.t. software - I must configure it myself.

The phone appears as /dev/ttyACM0 (udev). I haven't gotten it to register with the correct user credentials (it auto-assigns as root:tty for some reason, with restricted priviledges too), but for now I can wangle it my chowning and chmoding as needed.

I connect using wvdial. It seems to work, as I can ping the MTN DNS servers, but DNS itself doesn't seem to work! I.E. when I try to ping a DNS address, (such as mybroadband.co.za) it works. It could be my routing, as I have not managed to ping the one IP address that I have memorized (my company's webserver) either.

Here follows a log of my activities:

------

[neon@skadu ~]$ sudo wvdial
WvDial<*1>: WvDial: Internet dialer version 1.56 (root@laptop)
WvModem<*1>: Cannot get information for serial port.
WvDial<*1>: Initializing modem.
WvDial<*1>: Sending: ATZ
WvDial Modem<*1>: ATZ
WvDial Modem<*1>: OK
WvDial<*1>: Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
WvDial Modem<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
WvDial Modem<*1>: OK
WvDial<*1>: Sending: AT+COPS=0,0,"",2
WvDial Modem<*1>: AT+COPS=0,0,"",2
WvDial Modem<*1>: OK
WvDial<*1>: Sending: AT+CGDCONT=1,"IP","mymtn","",0,0;
WvDial Modem<*1>: AT+CGDCONT=1,"IP","mymtn","",0,0;
WvDial Modem<*1>: OK
WvDial<*1>: Modem initialized.
WvDial<*1>: Sending: ATDT*99#
WvDial<*1>: Waiting for carrier.
WvDial Modem<*1>: ATDT*99#
WvDial Modem<*1>: CONNECT
WvDial Modem<*1>: ~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
WvDial<*1>: Carrier detected. Starting PPP immediately.
WvDial<Notice>: Starting pppd at Tue Jul 17 00:26:26 2007
WvDial<Notice>: Pid of pppd: 10012
WvDial<*1>: Using interface ppp0
WvDial<*1>: pppd: [08]�[06][08](�[06][08]
WvDial<*1>: pppd: [08]�[06][08](�[06][08]
WvDial<*1>: pppd: [08]�[06][08](�[06][08]
WvDial<*1>: pppd: [08]�[06][08](�[06][08]
WvDial<*1>: pppd: [08]�[06][08](�[06][08]
WvDial<*1>: pppd: [08]�[06][08](�[06][08]
WvDial<*1>: local IP address 172.25.11.215
WvDial<*1>: pppd: [08]�[06][08](�[06][08]
WvDial<*1>: remote IP address 10.6.6.6
WvDial<*1>: pppd: [08]�[06][08](�[06][08]
WvDial<*1>: primary DNS address 209.212.97.1
WvDial<*1>: pppd: [08]�[06][08](�[06][08]
WvDial<*1>: secondary DNS address 10.204.32.245
WvDial<*1>: pppd: [08]�[06][08](�[06][08]

[neon@skadu ~]$ ifconfig
br0 Link encap:Ethernet HWaddr 00:10:DC:DD:88:03
inet addr:192.168.0.121 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::210:dcff:fedd:8803/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:1466 (1.4 Kb)

eth0 Link encap:Ethernet HWaddr 00:10:DC:DD:88:03
UP BROADCAST PROMISC MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:17 Base address:0xc000

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:666 errors:0 dropped:0 overruns:0 frame:0
TX packets:666 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:51988 (50.7 Kb) TX bytes:51988 (50.7 Kb)

ppp0 Link encap:point-to-Point Protocol
inet addr:172.25.15.161 P-t-P:10.6.6.6 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:55 errors:0 dropped:0 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:11788 (11.5 Kb) TX bytes:2927 (2.8 Kb)

tap0 Link encap:Ethernet HWaddr 7E:D7:D6:05:14:D8
inet6 addr: fe80::7cd7:d6ff:fe05:14d8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:89 errors:0 dropped:0 overruns:0 frame:0
TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:9438 (9.2 Kb) TX bytes:8002 (7.8 Kb)


[neon@skadu ~]$ cat /etc/wvdial.conf

[Dialer Defaults]
Phone = *99#
Password = 0836805557
Username = 12345
Stupid Mode = 1
Dial Command = ATDT
Modem = /dev/ttyACM0
Baud = 460800
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
Init3 = AT+COPS=0,0,"",2
Init4 = AT+CGDCONT=1,"IP","mymtn","",0,0;
;Init5 = AT+CGEQMIN=1,4,64,384,64,384
;Init6 = AT+CGEQREQ=1,4,64,384,64,384

[neon@skadu ~]$ sudo route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.6.6.6 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0

[neon@skadu ~]$ cat /etc/ppp/resolv.conf
nameserver 209.212.97.1
nameserver 10.204.32.245

[neon@skadu ~]$ cat /etc/resolv.conf
cat: /etc/resolv.conf: No such file or directory

[neon@skadu ~]$ ping 10.204.32.245
PING 10.204.32.245 (10.204.32.245) 56(84) bytes of data.
64 bytes from 10.204.32.245: icmp_seq=1 ttl=252 time=63.9 ms
64 bytes from 10.204.32.245: icmp_seq=2 ttl=252 time=63.5 ms
64 bytes from 10.204.32.245: icmp_seq=3 ttl=252 time=63.6 ms
64 bytes from 10.204.32.245: icmp_seq=4 ttl=252 time=63.8 ms
64 bytes from 10.204.32.245: icmp_seq=5 ttl=252 time=64.0 ms

[neon@skadu ~]$ ping 209.212.97.1
PING 209.212.97.1 (209.212.97.1) 56(84) bytes of data.
64 bytes from 209.212.97.1: icmp_seq=1 ttl=56 time=81.4 ms
64 bytes from 209.212.97.1: icmp_seq=2 ttl=56 time=79.4 ms
64 bytes from 209.212.97.1: icmp_seq=3 ttl=56 time=70.6 ms
64 bytes from 209.212.97.1: icmp_seq=4 ttl=56 time=70.7 ms

[neon@skadu ~]$ ping www.myadsl.co.za
ping: unknown host www.myadsl.co.za

------

What must I do to get DNS working?!!

Thanks
Albie
 
Last edited:

andres101

Expert Member
Joined
May 14, 2004
Messages
2,124
wvdial is writing the DNS servers to /etc/ppp/resolv.conf instead of /etc/resolv.conf (http://wiki.linuxquestions.org/wiki/Wvdial).

to fix this, you could probably create a symlink:
Code:
mv /etc/ppp/resolv.conf /etc/ppp/resolv.conf.backup
ln -s /etc/resolv.conf /etc/ppp/resolv.conf
 

neonpill

Member
Joined
Jan 30, 2006
Messages
15
Thanks, andres101. I have created a symlink in /etc to /etc/ppp/resolv.conf before (since it can potentially be re-configured every time I connect) and that didn't seem to work. I will try putting the addresses in /etc/resolv.conf directly. Which DNS servers should I use?
 
Last edited:

andres101

Expert Member
Joined
May 14, 2004
Messages
2,124
i think it is the MTN NS name servers:
nameserver 209.212.96.1
nameserver 209.212.97.2
 

andres101

Expert Member
Joined
May 14, 2004
Messages
2,124
sorry about the 2nd post and deleted post... I tried to keep the thread 'clean'.

I just checked my system and I have /etc/ppp/resolv.conf and /etc/resolv.conf. Their timestamps are the same, which leads me to believe that pppd is updating /etc/resolv.conf for me.

this is confirmed in the man page (man pppd). the DNS servers are passed to the /etc/ppp/ip-up script, which updates /etc/resolv.conf.
 

neonpill

Member
Joined
Jan 30, 2006
Messages
15
Woo! I am posting this response from my freshly connected via N95 linux box. I think I had everything in order already, but I copied /etc/ppp/resolv.conf over /etc/resolv.conf anyway.

I have no idea why I could not get connected up to yesterday, but it works great now. Thank you very much for your assistance, I will go read up on the references given.
 

Voldemort

Death eater
Joined
Apr 8, 2006
Messages
6,583
Woo! I am posting this response from my freshly connected via N95 linux box. I think I had everything in order already, but I copied /etc/ppp/resolv.conf over /etc/resolv.conf anyway.

I have no idea why I could not get connected up to yesterday, but it works great now. Thank you very much for your assistance, I will go read up on the references given.

They were upgrading the e-mail server, helluva nightmare for interent usage:p
 

andres101

Expert Member
Joined
May 14, 2004
Messages
2,124
glad i could help. luckily for you I only got my S60 phone going a few days ago :)
 
Top