Using the Sprint PCS Merlin C201 PCMCIA Card With Linux

William A. Stein
Last updated April 11, 2003      

Introduction

I bought a Sprint PCS Merlin C201 PCMCIA card for my laptop, so I could get wireless internet access wherever there is Sprint PCS coverage. I don't use MS Windows or any other Microsoft software, but the Merlin is only supported under MS Windows, hence this document. It turns out the Merlin can be used with Linux...

Sean Reifschneider has figured out how to resolve the problems mentioned below. You should look at the following page before reading my page further:

  http://www.tummy.com/articles/laptops/merlin-c201/

     

Setup

I'm using the stock installation of RedHat 7.3 on a Sony VAIO Z505HE laptop.

First I called Sprint and activated the Merlin. After taking my information, the Sprint rep gave me a 6-digit activation code (an MSL), then transfered me to tech support.

I couldn't get my Merlin to do anything under Linux, and the tech support couldn't help. Eventually, I tried setting up my Merlin on a friend's Windows XP machine using the CD that comes with the Merlin. The first few steps of the install process on XP worked, and I was able to program the 6-digit MSL number into the Merlin. However, when I tried to connect to the internet using the Merlin under XP, I received an error message about my username and password not updating correctly. In the end I couldn't get my Merlin to work with Windows XP. I tried calling tech support, but hung up after being put on hold for nearly an hour.

I then put my Merlin back into Linux, and it appeared as /dev/ttyS3. (It will probably appear as something different for you; look in the log messages, and replace /dev/ttyS3 by your device everywhere below.) I configured my modem program (minicom) to use that serial port at 57600 bps. It worked fine, and I was able to dial my ISP. In particular, the built in modem is not a winmodem. However, as a modem it is very slow, only 14.4kbps. Incidentally, if you don't have an ISP you can still connect to the net this way using these instructions. However, one really wants packet-switched mode, which is much faster, and for that see below.

Packet-Switched Mode

First, I used the Merlin only as a cellular modem, which is very slow. Then I read on the Merlin web page that the device can operate in 2 modes. One is a slow 14.4kbps mode, and the other is 144kpbs packet switched. By dialing up I'm definitely getting the 14.4kbps mode.

I surfed the web some and played around and discovered the following. The modem automatically "goes online" when it is inserted in the machine. I tried to start pppd (version 2.4.0, incidentally) to connect to /dev/ttyS3 as follows:

/usr/sbin/pppd /dev/ttyS3 57600 defaultroute
In my kernel log messages I see
Aug 27 01:09:49 localhost pppd[12431]: pppd 2.4.1 started by root, uid 0
Aug 27 01:09:55 localhost pppd[12431]: Using interface ppp0
Aug 27 01:09:55 localhost pppd[12431]: Connect: ppp0 <--> /dev/ttyS3
Aug 27 01:09:55 localhost /etc/hotplug/net.agent: assuming ppp0 is already up
Aug 27 01:09:59 localhost pppd[12431]: local  IP address 68.25.152.231
Aug 27 01:09:59 localhost pppd[12431]: remote IP address 68.28.97.135

Something happened! When I try it additional times, I get a similar local IP address, but the last three digits vary.

Typing route, I see:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
68.28.97.135    *               255.255.255.255 UH    0      0        0 ppp0
...
I try pinging 68.28.97.135, but nothing happens! Argh.

I then give up and start searching online for some hints, and end up loging into my Sprintpcs Vision account. Part of the login procedure requires me to select a password, which I evidently haven't done yet. I do so, and explore that page, but find nothing too useful. I then retry my Merlin and pppd, and I'm able to ping 68.25.152.231! I have no idea whether or not setting my password had any affect. I doubt it now.

For some reason, 68.28.97.135 doesn't act as a gateway, so I do a port scan and get this:

[root@laptop merlin]# nmap -sT 68.28.97.135

Starting nmap V. 3.00 ( www.insecure.org/nmap/ )
Interesting ports on  (68.28.97.135):
(The 1599 ports scanned but not shown below are in state: closed)
Port       State       Service
23/tcp     open        telnet
1723/tcp   open        pptp
This scan suggests that I'll have to set up a complicated pptp client. I tried, and wasn't able to get that to work. Fortunately, the solution was much simpler.

One hour later I tried pppd again and pinging no longer worked. I couldn't get it to work. I didn't understand at all why pinging temporarily worked...

I think the pinging-or-not problem is a reception issue. If I execute the command

  /usr/sbin/pppd /dev/ttyS3 57600 defaultroute
with my hand held firmly on the antenna and the antenna pointed toward my window, then it usually works; if I don't, then it often doesn't work. I only have to hold the Merlin's antenna while I wait to connect, not later. Moreover, I do nothing further and I'm able to connect to computers all over, i.e., packets are forwarded just fine. This is a little strange because, e.g., I have not logged into the network using my "Sprint Vision Password".

I did figure out how to log in to the network using CHAP, by inserting the line

PDSN    wstein01        my_password
in my chap-secrets file and executing the command
  /usr/sbin/pppd /dev/ttyS3 57600 defaultroute user wstein01

You can watch the log messages for pppd by using the debug option to pppd, adding the lines

local2.*                                /var/log/ppp
daemon.*                                /var/log/ppp
to /etc/syslog.conf, and restarting syslogd. You see that Sprint's ppp server requests CHAP authentication, and if you give it the wrong password, it will reject you. It's not necessary to set this stuff up though; presumably the Merlin has built in hardware-level authentication.

You can also watch traffic over the Sprint Merlin using the command

tcpdump -i ppp0

Scripts

In the end, these are the only scripts I use to connect and disconnect the Merlin.
[root@laptop bin]# more go-merlin
su -c 'killall pppd; sleep 3; \
       /usr/sbin/pppd /dev/ttyS3 57600 debug defaultroute; \
       tail -f /var/log/ppp'

[root@laptop bin]# more stop-merlin
su -c 'killall pppd; m'

How Fast Is It?

I did a few tests, and in packet-switched the Merlin seems to average about 56kbps, as I was told to expect. This is much faster than my mobile phone used as a modem.

Remarks from Other People

Merlin C201 and MacOSX
From: Larry Barras 
To: [email protected]

I was rummaging around for info on the C201 and hit your page. I 
thought you might find it interesting that Apple included a modem ccl 
file for the C201 (Sprint Vision in the modem list).

Once the card was activated on a PC, just pop it into a PowerBook, open 
the PPP control panel, select pc-card-serial, enter the sprintpcs user 
name and password and that's it.

I wish there were utilities to monitor reception levels and so on as 
the PC software has, but it seems to work just fine as a modem.

------------------------------------------------------------------------