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:

Bus 001 Device 002: ID 04e8:6601 Samsung Electronics Co., Ltd
cannot get string descriptor 1, error = Broken pipe(32)
cannot get string descriptor 2, error = Broken pipe(32)
cannot get string descriptor 3, error = Broken pipe(32)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.01
  bDeviceClass            2 Communications
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        16
  idVendor           0x04e8 Samsung Electronics Co., Ltd
  idProduct          0x6601
  bcdDevice            0.00
  iManufacturer           1
  iProduct                2
  iSerial                 3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           67
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              0
  unknown descriptor type: 05 24 00 09 01
  unknown descriptor type: 05 24 01 03 01
  unknown descriptor type: 04 24 02 0f
  unknown descriptor type: 05 24 06 00 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               none
        wMaxPacketSize         16
        bInterval              32
cannot get string descriptor 4, error = Broken pipe(32)
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8a  EP 10 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               none
        wMaxPacketSize         64
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0b  EP 11 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               none
        wMaxPacketSize         64
        bInterval               0
  Language IDs: (length=4)
     0409 English(US)




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.

Cheers,

Aniruddha "Karim" Shankar
The Sarai Programme, New Delhi

Document made with NvuCreative Commons License
This work is licensed under a Creative Commons License.

1