FreeBSD + Reliance Mobile Connection Setup ========================================== Shanker Balan http://shankerbalan.com/ O/S: FreeBSD 5.2-CURRENT Hardware: LG 2030 CDMA Mobile Phone Cable: SP Road LG Serial Data Cable (Rs 300) Overview ======== Blah Blah The Cable ========= Add yourself to the following groups: - operator - dialer - network [faith] ~> id uid=13788(shanu) gid=1001(shanu) groups=1001(shanu), 0(wheel), 5(operator), 68(dialer), 69(network) Build your ppp.conf based on the one below: ### ### /etc/ppp/ppp.conf ### ################################################################# # PPP Sample Configuration File # Originally written by Toshiharu OHNO # Simplified 5/14/1999 by wself@cdrom.com # # See /usr/share/examples/ppp/ for some examples # # $FreeBSD: src/etc/ppp/ppp.conf,v 1.8 2001/06/21 15:42:26 brian Exp $ ################################################################# default: set log Phase Chat IPCP tun command ident user-ppp VERSION (built COMPILATIONDATE) # Ensure that "device" references the correct serial port # for your modem. (cuaa0 = COM1, cuaa1 = COM2) # set device /dev/cuaa1 set speed 115200 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \ \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT" set timeout 180 # 3 minute idle timer (the default) enable dns # request DNS info (for resolv.conf) rim: # # edit the next three lines and replace the items in caps with # the values which have been assigned by your ISP. # set phone \#777 set authname 8034000xxx set authkey 8034000xxx set dial "\"\" at+cta=30 OK \\dATDT\\T CONNECT" #set mtu 296 disable ipv6cp disable MSCHAPv2 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 add! default HISADDR # Add a (sticky) default route tata: # # edit the next three lines and replace the items in caps with # the values which have been assigned by your ISP. # set phone \#777 set authname 8057630056 set authkey 8057630056 set dial "\"\" at+cta=30 OK \\dATDT\\T CONNECT" set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 add! default HISADDR # Add a (sticky) default route Dialing Out =========== [faith] ~> ppp -auto rim [faith] ~> tail -f /var/log/ppp.log [faith] ~> ping yahoo.co.in Keep the ping running, else the CDMA phone keeps going into standby mode due to inactivity and increases latency. /vsr/log/ppp.log Apr 24 10:38:14 faith ppp[663]: Phase: Using interface: tun0 Apr 24 10:38:14 faith ppp[663]: Phase: deflink: Created in closed state Apr 24 10:38:14 faith ppp[663]: tun0: Command: default: ident user-ppp VERSION (built COMPILATIONDATE) Apr 24 10:38:14 faith ppp[663]: tun0: Command: default: set device /dev/cuaa1 Apr 24 10:38:14 faith ppp[663]: tun0: Command: default: set speed 115200 Apr 24 10:38:14 faith ppp[663]: tun0: Command: default: set dial ABORT BUSY ABORT NO\sCARRIER TIMEOUT 5 "" AT OK-AT-OK ATE1Q0 OK \dATDT\T TIMEOUT 40 CONNECT Apr 24 10:38:14 faith ppp[663]: tun0: Command: default: set timeout 180 Apr 24 10:38:14 faith ppp[663]: tun0: Command: default: enable dns Apr 24 10:38:14 faith ppp[663]: tun0: Command: rim: set phone #777 Apr 24 10:38:14 faith ppp[663]: tun0: Command: rim: set authname 8034000xxx Apr 24 10:38:14 faith ppp[663]: tun0: Command: rim: set authkey ******** Apr 24 10:38:14 faith ppp[663]: tun0: Command: rim: set dial "" at+cta=30 OK \dATDT\T CONNECT Apr 24 10:38:14 faith ppp[663]: tun0: Command: rim: disable IPV6CP Apr 24 10:38:14 faith ppp[663]: tun0: Command: rim: disable MSCHAPv2 Apr 24 10:38:14 faith ppp[663]: tun0: Command: rim: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 Apr 24 10:38:14 faith ppp[663]: tun0: Command: rim: add! default HISADDR Apr 24 10:38:14 faith ppp[664]: tun0: Phase: PPP Started (auto mode). Apr 24 10:38:14 faith ppp[664]: tun0: Phase: bundle: Establish Apr 24 10:38:14 faith ppp[664]: tun0: Phase: deflink: closed -> opening Apr 24 10:38:14 faith ppp[664]: tun0: Phase: deflink: Connected! Apr 24 10:38:14 faith ppp[664]: tun0: Phase: deflink: opening -> dial Apr 24 10:38:14 faith ppp[664]: tun0: Chat: Phone: #777 Apr 24 10:38:14 faith ppp[664]: tun0: Chat: deflink: Dial attempt 1 of 1 Apr 24 10:38:14 faith ppp[664]: tun0: Chat: Send: at+cta=30^M Apr 24 10:38:14 faith ppp[664]: tun0: Chat: Expect(30): OK Apr 24 10:38:14 faith ppp[664]: tun0: Chat: Received: ^M Apr 24 10:38:14 faith ppp[664]: tun0: Chat: Received: OK^M Apr 24 10:38:14 faith ppp[664]: tun0: Chat: Send: ATDT#777^M Apr 24 10:38:16 faith ppp[664]: tun0: Chat: Expect(30): CONNECT Apr 24 10:38:16 faith ppp[664]: tun0: Chat: Received: ^M Apr 24 10:38:16 faith ppp[664]: tun0: Chat: Received: CONNECT^M Apr 24 10:38:16 faith ppp[664]: tun0: Phase: deflink: dial -> carrier Apr 24 10:38:17 faith ppp[664]: tun0: Phase: deflink: /dev/cuaa1: CD detected Apr 24 10:38:17 faith ppp[664]: tun0: Phase: deflink: carrier -> login Apr 24 10:38:17 faith ppp[664]: tun0: Phase: deflink: login -> lcp Apr 24 10:38:23 faith ppp[664]: tun0: Phase: bundle: Authenticate Apr 24 10:38:23 faith ppp[664]: tun0: Phase: deflink: his = PAP, mine = none Apr 24 10:38:23 faith ppp[664]: tun0: Phase: Pap Output: 8034000xxx ******** Apr 24 10:38:23 faith ppp[664]: tun0: Phase: Pap Input: SUCCESS () Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: Using trigger address 0.0.0.0 Apr 24 10:38:23 faith ppp[664]: tun0: Phase: deflink: lcp -> open Apr 24 10:38:23 faith ppp[664]: tun0: Phase: bundle: Network Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: FSM: Using "deflink" as a transport Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: deflink: State change Initial --> Closed Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: deflink: LayerStart. Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: deflink: SendConfigReq(1) state = Closed Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: IPADDR[6] 0.0.0.0 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: COMPPROTO[6] 16 VJ slots with slot compression Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: PRIDNS[6] 202.138.96.2 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: SECDNS[6] 255.255.255.255 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: deflink: State change Closed --> Req-Sent Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: deflink: RecvConfigReq(2) state = Req-Sent Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: COMPPROTO[6] 16 VJ slots without slot compression Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: IPADDR[6] 97.238.2.8 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: deflink: SendConfigAck(2) state = Req-Sent Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: COMPPROTO[6] 16 VJ slots without slot compression Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: IPADDR[6] 97.238.2.8 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: deflink: State change Req-Sent --> Ack-Sent Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: deflink: RecvConfigNak(1) state = Ack-Sent Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: IPADDR[6] 220.226.34.217 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: IPADDR[6] changing address: 0.0.0.0 --> 220.226.34.217 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: COMPPROTO[6] 16 VJ slots without slot compression Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: COMPPROTO[6] changing compproto: 002d0f01 --> 002d0f00 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: PRIDNS[6] 202.138.103.100 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: SECDNS[6] 202.138.96.2 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: Primary nameserver set to 202.138.103.100 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: Secondary nameserver set to 202.138.96.2 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: deflink: SendConfigReq(2) state = Ack-Sent Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: IPADDR[6] 220.226.34.217 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: COMPPROTO[6] 16 VJ slots without slot compression Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: PRIDNS[6] 202.138.103.100 Apr 24 10:38:23 faith ppp[664]: tun0: IPCP: SECDNS[6] 202.138.96.2 Apr 24 10:38:24 faith ppp[664]: tun0: IPCP: deflink: RecvConfigAck(2) state = Ack-Sent Apr 24 10:38:24 faith ppp[664]: tun0: IPCP: IPADDR[6] 220.226.34.217 Apr 24 10:38:24 faith ppp[664]: tun0: IPCP: COMPPROTO[6] 16 VJ slots without slot compression Apr 24 10:38:24 faith ppp[664]: tun0: IPCP: PRIDNS[6] 202.138.103.100 Apr 24 10:38:24 faith ppp[664]: tun0: IPCP: SECDNS[6] 202.138.96.2 Apr 24 10:38:24 faith ppp[664]: tun0: IPCP: deflink: State change Ack-Sent --> Opened Apr 24 10:38:24 faith ppp[664]: tun0: IPCP: deflink: LayerUp. Apr 24 10:38:24 faith ppp[664]: tun0: IPCP: myaddr 220.226.34.217 hisaddr = 97.238.2.8 Apr 24 10:39:24 faith ppp[664]: tun0: Phase: deflink: HDLC errors -> FCS: 17, ADDR: 0, COMD: 0, PROTO: 0 Apr 24 10:40:25 faith ppp[664]: tun0: Phase: deflink: HDLC errors -> FCS: 123, ADDR: 0, COMD: 0, PROTO: 0 Apr 24 10:41:26 faith ppp[664]: tun0: Phase: deflink: HDLC errors -> FCS: 76, ADDR: 0, COMD: 0, PROTO: 0 Apr 24 10:42:28 faith ppp[664]: tun0: Phase: deflink: HDLC errors -> FCS: 2, ADDR: 0, COMD: 0, PROTO: 0 Apr 24 10:43:29 faith ppp[664]: tun0: Phase: deflink: HDLC errors -> FCS: 5, ADDR: 0, COMD: 0, PROTO: 0 Apr 24 11:25:19 faith ppp[664]: tun0: Phase: deflink: HDLC errors -> FCS: 19, ADDR: 0, COMD: 0, PROTO: 0 Apr 24 11:26:20 faith ppp[664]: tun0: Phase: deflink: HDLC errors -> FCS: 2, ADDR: 0, COMD: 0, PROTO: 0