How to connect to the Internet using a Reliance CDMA Samsung phone
and
Gentoo Linux
This doc talks about how I connected to the net using a Reliance
cellphone and Linux version 2.6.7 (with devfs). This document is a
"patch" on the excellent document by Anoop M S
and Ramakrishnan M. This document is meant to be
read along with theirs and forms an addendum. Their document is more
specific to Linux 2.4, an LG phone and is written with Debian as the
base. I'm using Linux 2.6.x, a Samsung phone and Gentoo as my
distribution.
I just spent half a day trying to get a Reliance CDMA phone to connect
to the Internet. The phone, a Samsung
SCH-N191 isn't mine but a
friends'. A word of advice : When you go to buy the phone<-->USB
cable, which cost 250/-, make sure you take the phone with you and
INSIST that the guys
at the Reliance
Webworld demonstrate that the actual cable and software
that they are selling you works. A bogus cable and a crappy software cd
wasted almost 3 days for us before they were replaced with working
versions. If you've got access to a Windows laptop (with a USB port),
take it with you to the store and ask that they install it in front of
you and make it work.
To connect to the net, you need to have a series of things working or
available. (Aside: This is why I like Gentoo Linux so much... I learnt
through trial and error about the different parts of the system and how
and why the basic kernel components needed to be where they should
be... in most mainstream distributions, most of the hard work (and, by
implication, most of the hard knocks) is done for you by uber-geeks)
You need to have all the requisite components in kernelspace.
You need the userspace software (ppp) and will probably need something
to ease the configuration process. (good dinner, ambient
music and
pppconfig)
Here's my kernel's config.gz. I have a
non-Intel / non-VIA motherboard
so if you have one of these 'boards, you will need to enable the option
in the kernel (Device Drivers / USB Support / UHCI_HCD) as my config.gz
has OHCI_HCD built as a module.
In Device Drivers/Character Devices/Serial Drivers, build the following
components into the kernel (I prefer doing this to using modules): 8250/16550 and compatible serial support
Extended 8250/16550 serial driver options
Support for sharing interrupts
Support RSA serial ports (I have no idea if this is
necessary but *shrug* I put it in anyway - the component help merely
states "to be written"!)
In Device Drivers / USB Support, build the following stuff as modules: Support for Host-side USB
(enable USB verbose debug messages)
(enable USB device filesystem)
OHCI_HCD
UHCI_HCD (choose either if you know the component you need
or build em both if you're not sure)
EHCI_HCD
USB Modem (CDC ACM support)
In Device Drivers / USB Support/USB Serial Converter support/, build
the following as modules: USB Serial Converter support
USB FTDI Single Port Serial Driver
build the kernel and boot up. Follow Step 0 in Anoop &
Ramakrishnan's tutorial
Open up a terminal and keep an eye on the system log by doing tail -f
/var/log/messages
I then modprobed the following modules: ohci-hcd
usbserial
ftdi_sio
cdc_acms
Observe the info in the log as it updates - after the HCD is modprobed,
you should get a flurry of text and a few spare lines for the second
and fourth. the FTDI_SIO module should give you a few lines as well.
Switch phone off. (i'm being paranoid here... but what the hell). Plug
phone into USB port. start up phone. You should get a flurry of lines
in the system log. On mine they look something like this :
Sep 25 03:35:30 genone ohci_hcd 0000:00:02.0: GetStatus
roothub.portstatus [1] = 0x00130103 PRSC PESC CSC PPS PES CCS
Sep 25 03:35:31 genone usb 1-1: new full speed USB device using address
2
Sep 25 03:35:31 genone usb 1-1: skipped 4 descriptors after interface
Sep 25 03:35:31 genone usb 1-1: new device strings: Mfr=1, Product=2,
SerialNumber=3
Sep 25 03:35:31 genone usb 1-1: default language 0x0409
Sep 25 03:35:31 genone usb 1-1: Product: SAMSUNG CDMA Technologies
Sep 25 03:35:31 genone usb 1-1: Manufacturer: SAMSUNG Electronics
Co.,Ltd.
Sep 25 03:35:31 genone usb 1-1:
SerialNumber:
Sep 25 03:35:31 genone usb 1-1: hotplug
Sep 25 03:35:31 genone usb 1-1: adding 1-1:1.0 (config #1, interface 0)
Sep 25 03:35:31 genone usb 1-1:1.0: hotplug
Sep 25 03:35:31 genone cdc_acm 1-1:1.0: usb_probe_interface
Sep 25 03:35:31 genone cdc_acm 1-1:1.0: usb_probe_interface - got id
Sep 25 03:35:31 genone cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Sep 25 03:35:31 genone usb 1-1: adding 1-1:1.1 (config #1, interface 1)
Sep 25 03:35:31 genone usb 1-1:1.1: hotplug
Sep 25 03:35:31 genone hub 1-0:1.0: reset change on port 1
I then made a link from /dev/usb/acm/0 to /dev/modem ln -s /dev/usb/acm/0 /dev/modem
My brain was aching at the sight of the pppd commands so I installed
pppconfig - interesting how sometimes I take the easy way out :)
emerge pppconfig
and a few seconds later, it's installed and ready. I then ran pppconfig
and followed it's excellent step-by-step procedure... Debian mein to
maal hai I must admit. (I still prefer Gentoo ;) )
To connect to the net, I ran "pon"
and stuff like this is was logged:
Sep 25 03:36:31 genone pppd[8413]: pppd 2.4.1 started by root,
uid 0
Sep 25 03:36:32 genone chat[8414]: abort on (BUSY)
Sep 25 03:36:32 genone chat[8414]: abort on (NO CARRIER)
Sep 25 03:36:32 genone chat[8414]: abort on (VOICE)
Sep 25 03:36:32 genone chat[8414]: abort on (NO DIALTONE)
Sep 25 03:36:32 genone chat[8414]: abort on (NO DIAL TONE)
Sep 25 03:36:32 genone chat[8414]: abort on (NO ANSWER)
Sep 25 03:36:32 genone chat[8414]: abort on (DELAYED)
Sep 25 03:36:32 genone chat[8414]: send (ATZ^M)
Sep 25 03:36:32 genone chat[8414]: expect (OK)
Sep 25 03:36:32 genone chat[8414]: ATZ^M^M
Sep 25 03:36:32 genone chat[8414]: OK
Sep 25 03:36:32 genone chat[8414]: -- got it
Sep 25 03:36:32 genone chat[8414]: send (ATDT#777^M)
Sep 25 03:36:32 genone chat[8414]: expect (CONNECT)
Sep 25 03:36:32 genone chat[8414]: ^M
Sep 25 03:36:32 genone chat[8414]: ATDT#777^M^M
Sep 25 03:36:32 genone chat[8414]: CONNECT
Sep 25 03:36:32 genone chat[8414]: -- got it
Sep 25 03:36:32 genone chat[8414]: send (\d)
Sep 25 03:36:33 genone pppd[8413]: Serial connection established.
Sep 25 03:36:33 genone pppd[8413]: using channel 1
Sep 25 03:36:33 genone pppd[8413]: Using interface ppp0
Sep 25 03:36:33 genone pppd[8413]: Connect: ppp0 <--> /dev/modem
and
Sep 25 03:36:39 genone pppd[8413]: not replacing existing default
route to eth0 [61.16.1xx.xx]
Sep 25 03:36:39 genone pppd[8413]: local IP address 220.224.21.207
Sep 25 03:36:39 genone pppd[8413]: remote IP address 97.233.2.9
Sep 25 03:36:39 genone pppd[8413]: primary DNS address
202.138.97.193
Sep 25 03:36:39 genone pppd[8413]: secondary DNS address 202.138.96.2
Sep 25 03:36:39 genone pppd[8413]: Script /etc/ppp/ip-up started (pid
8422)
Sep 25 03:36:39 genone pppd[8413]: Script /etc/ppp/ip-up finished (pid
8422), status = 0x0
To disconnect, I ran "poff"
and this is what was logged: Sep 25 03:36:45 genone pppd[8413]: Terminating on signal 15.
Sep 25 03:36:45 genone pppd[8413]: Script /etc/ppp/ip-down started (pid
8429)
Sep 25 03:36:45 genone pppd[8413]: sent [LCP TermReq id=0x2 "User
request"]
Sep 25 03:36:45 genone pppd[8413]: Script /etc/ppp/ip-down finished
(pid 8429), status = 0x0
Sep 25 03:36:45 genone pppd[8413]: rcvd [LCP TermAck id=0x2]
Sep 25 03:36:45 genone pppd[8413]: Connection terminated.
Sep 25 03:36:45 genone pppd[8413]: Connect time 0.2 minutes.
Sep 25 03:36:45 genone pppd[8413]: Sent 115 bytes, received 147 bytes.
Sep 25 03:36:45 genone pppd[8413]: Hangup (SIGHUP)
Sep 25 03:36:45 genone pppd[8413]: Exit.
Troubleshooting:
This is what the lspci -v output showed about the phone I was using:
The phone worked great ... excellent for when you're on the move or in
a location without a fixed land line or as a backup Internet
connection. Take a look at the tarriffs here.
Have fun and mail me your
suggestions for this document.