tethering a sprint pcs sanyo 4900 via usb with linux

by nc on September 21, 2005 · 0 comments

[This page originally lived at http://www.natecarlson.com/linux/sanyo-4900.php. I am working on migrating all content over to WordPress, which is why this post exists. The original post is ancient, but most of the comments still apply to modern phones and 3G plans.]

This document describes how to connect a Linux box to Sprint’s “Vision” (3G) network using a Sanyo SCP-4900 and the PCS Connection Kit USB cable.

$Id: sanyo-4900.php,v 1.17 2005/09/21 15:54:10 natecars Exp $

Background:
**NOTE**: I have not had my Sprint phone in over a year; I am now using T-Mobile’s wireless data service when I need it. It’s slower, but I like T-Mobile’s phones better. Sprint does also now state that you are not supposed to use your Vision service with a laptop unless you pay laptop prices, or they will cut you off. YMMV. People who have Sprint phones do tell me that the below still seems to work.

In my ever-lasting search for high speed wireless internet access, I decided to try out Sprint PCS’s new Vision service. They recently dropped their prices. For $40/mo, I’m getting 300 anytime minutes, free long distance, and unlimited ‘high speed’ (56-144k) data (this is the Vision service). The best part is that the data service is simple to get working with Linux – all you need is the proper USB drivers, and the knowledge to set up a PPP connection. The phone’s cost varies from free to $150 (depending on what deal you get). Sprint used to sell the data cable (with Windows software) for $69.99, but it’s no longer available from them. You can get it from Sanyo directly for $29.99, from https://store.sanyousa.com/osb/itemdetails.cfm/ID/74. Radio Shack and various other stores also carry the cable. I’ve also used the setup instructions below with a Samsumg A500 phone and the proper USB cable, which worked fine.

NOTE: There are conflicting reports to what exactly Sprint means by ‘unlimited vision’. Apparently, they have told some people that the unlimited vision is for phone use only, and does not apply when you’re using the phone with the USB cable. The USB cable solution was actually recommended to me by an employee at a Sprint store to start with, and I checked with two other Sprint reps that it was acceptable use before purchasing. I can also confirm that I have not been charged for any Vision usage, beyond the standard $10/mo, even though I have been using it via the USB cable. But to protect yourself, be sure to check with your Sprint rep, and make sure that this use is acceptable before doing it. If you end up getting billed for the usage, don’t say I didn’t warn you!

Some other sites that have information on Sprint PCS equipment with Linux:
http://www.tummy.com/articles/laptops/merlin-c201/

First Step: Make sure your kernel has the right options
To use the PCS phone, you’ll need to have USB support for the USB card in your computer, and support for USB ACM devices (CONFIG_USB_ACM). The kernel included with recent versions of both Debian and RedHat includes everything you need. Also make sure you have hotplugging enabled, so that the modules will be loaded automatically.

Second Step: Plug in the phone, and watch the drivers load
All you need to do is plug in your phone, and all the drivers should be loaded automatically. Note that I have had a few cases where I needed to reset the phone to get the USB interface to show up. When I plug my phone in, I see the following:

Nov 5 19:35:29 knight kernel: hub.c: new USB device 00:07.2-1, assigned address 2
Nov 5 19:35:29 knight kernel: usb.c: USB device 2 (vend/prod 0x474/0x701) is not claimed by any active driver.
Nov 5 19:35:33 knight /etc/hotplug/usb.agent: Setup acm for USB product 474/701/0
Nov 5 19:35:33 knight kernel: usb.c: registered new driver acm
Nov 5 19:35:33 knight kernel: ttyACM0: USB ACM device
Nov 5 19:35:33 knight kernel: acm.c: v0.21:USB Abstract Control Model driver for USB modems and ISDN adapters

Third Step: Create a dialup connection
Now that you’ve got an ACM device, you just need to create a dialup connection. Note that the ACM device name may vary – just search through /dev for the proper device. On my (default) Debian install, it’s /dev/ttyACM0. On RedHat 7.3, it’s /dev/input/ttyACM0. Once you’ve found that, the number to dial to get a connection to the Vision network is ‘#777’ (which is #PPP on the keypad). So, use whatever method you prefer to create a dialer that will dial #777. On my Debian box, I’m using the standard ‘pon’ scripts. Here are the config files I use:

/etc/ppp/peers/sprint:

# You usually need this if there is no PAP authentication
noauth
# The chat script (be sure to edit that file, too!)
connect "/usr/sbin/chat -v -f /etc/chatscripts/sprint"
# Set up routing to go through this PPP link
defaultroute
# Use remote DNS
usepeerdns
# Default modem
/dev/ttyACM0
# Connect at high speed
230400
local
novj

/etc/chatscripts/sprint:

TIMEOUT         5
ABORT           '\nBUSY\r'
ABORT           '\nERROR\r'
ABORT           '\nNO ANSWER\r'
ABORT           '\nNO CARRIER\r'
ABORT           '\nNO DIALTONE\r'
ABORT           '\nRINGING\r\n\r\nRINGING\r'
''              \rAT
TIMEOUT         12
OK              ATD#777
TIMEOUT         22
CONNECT         ""

So, I run the command ‘pon sprint’ (if you’re on RedHat, try running ‘pppd call sprint’), wait a few seconds, and then start surfing. If you have problems with the above script not working, please try the script below (Thanks to Matthew Brichacek for the info):


TIMEOUT         5
ABORT           '\nBUSY\r'
ABORT           '\nERROR\r'
ABORT           '\nNO ANSWER\r'
ABORT           '\nNO CARRIER\r'
ABORT           '\nNO DIALTONE\r'
ABORT           '\nRINGING\r\n\r\nRINGING\r'
''              \rAT
TIMEOUT         12
OK		"ATZ"
OK		"ATE0V1"
OK		"AT+IFC=2,2"
OK              ATD#777
TIMEOUT         22
CONNECT         ""

Here in Minneapolis, I generally get ping times of 300-500ms, and download speeds of 7-12kbytes/sec. Not bad at all, considering it’s a connection I can take with me everywhere I go! Note that Sprint also gives you a (dynamic) public IP address, where the rest of the wireless phone connections I’ve tried have been NAT translated. This service works beautifully with FreeS/WAN as a VPN Client. Well, hope this has been helpful.. good luck getting your connection up!

If you have any comments on this document, please feel free to drop me an e-mail at: natecars@natecarlson.com. The contents of this page are freely distributable, as long as a link is provided to this page.

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: