Sprint Mobile Broadband

From NST Wiki
Revision as of 11:03, 19 August 2008 by Paul Blankenbaker (talk | contribs) (added notes on the sprintpcs service)
Jump to navigationJump to search

Overview

This page provides notes on configuring and using the Sprint Mobile Broadband service under Linux.


Sprint Mobile Broadband USB Modem U680

This USB modem provide provides a EVDO (Rev A) connection to the Internet. It is apparently a re-branded Franklin Wireless U680 1xEV-DO modem.

Stats:

Down 3.1 Mbps (peak) .8 Mbps - 1.2 Mbps (typical)
Up 1.8 Mbps (peak) .25 Mbps - .45 Mbps (typical)
OS Support Windows/Mac/Ubuntu Linux requires some persistence.

While the modem contains a GPS, it appears that the interface to the GPS device may only be available to Windows.

For some additional information about the modem, I found the Sprint U680 EVDO USB Modem Review to be very useful.

Goals

The original goal was to get the U680 working under the NST v1.8.1 development release. However, the first attempts did not yield the desired results. So, it was decided to:

  • Install Ubuntu (which was stated as being compatible with the U680).
  • Get it working under Ubuntu 8.04 (as the directions provided with the modem claimed it would work on a Ubuntu system).
  • Get it working under Fedora 8 (using information from the Ubuntu system).
  • Get it working under NST v1.8.1 (using information from the Fedora system).

sprintpcs script

After much experimentation, the: "/etc/rc.d/init.d/sprintpcs" script was created to simplify the process of bringing up a "Sprint Mobile Broadband" connection. The script was designed with the following features:

  • The script reads the configuration file: "/etc/sysconfig/sprintpcs" - mainly to determine what type of modem is being used (currently the U680 is the only supported modem type).
  • The same script and configuration file can be used both on NST v1.8.1, Fedora 8, and Ubuntu 8.04. The script is likely usable on other Linux distributions as well.
  • For a U680 modem, the first time the script is run, it will create the directory: /var/lib/sprintpcs/U680. It will then install and tweak the files which come on the U680 flash drive to this directory. NOTE: This means that the U680 flash drive must be mounted the first time the script is used.
  • All subsequent invocations only require that the U680 modem be inserted in the system.
  • A log file: /var/log/sprintpcs/U680.log is created and one can view this to look for errors.
  • The script waits up to 10 seconds for the connection to be established.
  • After the connection is established (when the primary DNS server appears in the log file), the script will attempt to ping a host on the Internet. If it fails, it will configure the system to use the file: /etc/ppp/resolv.conf for name resolution.

Installation

NST v1.8.1

Starting with NST v1.8.1, the script should already be installed. The script is not usable on earlier versions of the NST distribution (unless you manually install the wvdial package).

Fedora 8

Ubuntu 8.04


Normal Usage

NOTE: Many Fedora and Ubuntu systems use the NetworkManager service to manage network connections. You may want to disable your network connections (or stop the NetworkManager service) prior to using the sprintpcs script.

Starting The Service

[root@sprint ~]# service sprintpcs start
Starting sprintpcs: U680 ......                            [  OK  ]
[root@sprint ~]# 

Stopping The Service

[root@sprint ~]# service sprintpcs stop
Stopping sprintpcs: U680                                   [  OK  ]
[root@sprint ~]# 

First Time Usage

The first time the sprintpcs script is run on the system, it will attempt to copy files off of the U680 flash drive. By default it expects the flash drive to be mounted at: /media/U680_UMSD. On a standard Fedora or Ubuntu installation, this will probably occur automatically. If it doesn't (or your are using a NST system), you will see a message like the following:

[root@sprint ~]# service sprintpcs start
***ERROR*** Failed to locate: /media/U680_UMSD/Linux_Ubuntu - try mounting U680 disk
[root@sprint ~]# 

If you see this message, you will need to:

  • Determine what device is associated with the flash drive. The following shows how sdb was determined on a NST v1.8.1 system:
[root@sprint ~]# cd /dev/disk/by-id/
[root@sprint by-id]# ls usb*
usb-CMOTECH_Mass_Storage-0:0
[root@sprint by-id]# ls -l usb* lrwxrwxrwx 1 root root 9 2008-08-19 09:51 usb-CMOTECH_Mass_Storage-0:0 -> ../../sdb
[root@sprint by-id]# 
  • Mount the flash drive to: /media/U680_UMSD.
[root@sprint by-id]# cd
[root@sprint ~]# mkdir /media/U680_UMSD
[root@sprint ~]# mount /dev/sdb /media/U680_UMSD
[root@sprint ~]# 
  • Start the sprintpcs service:
[root@sprint ~]# service sprintpcs start
Starting sprintpcs: U680 ......                            [  OK  ]
[root@sprint ~]# 

These extra steps are only required the first time you run the service on the system. The necessary files will be transferred from the flash drive to the: /var/lib/sprintpcs directory.


Ubuntu 8.04 - the Hardy Heron

When inserted, the U680 was automatically mounted (like a standard thumb drive). It showed up under the /media/U680_UMSD directory.

One will find the PDF manual for the U680 as well as drivers/scripts/etc under the /media/U680_UMSD directory.

Following the directions provided caused a core dump under Ubuntu. Using strace, I was able to determine that the ./connect program was unable to open the file: /proc/bus/usb/devices (it was not present on my system). After doing some searching on the Internet, I discovered that this file isn't present until the usbfs is mounted. After mounting the usbfs, the U680 worked as expected.

Quick Summary (what I did to get it working - logged in as root):

  • Mount: usbfs - not required if already mounted (only required if you don't see the: /proc/bus/usb/devices entry).
root@fajita:~# mount -t usbfs usbfs /proc/bus/usb
root@fajita:~#
  • Insert the U680.
  • Copy the /media/U680_UMSD/Linux_Ubuntu directory to your hard disk:
root@fajita:~# cp -r /media/U680_UMSD/Linux_Ubuntu /root/
root@fajita:~#
  • Run the connect command provided:
root@fajita:~# cd /root/Linux_Ubuntu
root@fajita:~/Linux_Ubuntu# ./connect

... Lots of output as connection is established ...


Fedora 8

After getting the U680 working under Ubuntu 8.04, it was then possible to figure out the steps to use the U680 under Fedora 8.

Quick Summary (what I did to get it working - logged in as root):

  • Make sure the wvdial package is installed.
[root@localhost ~]# rpm -q wvdial || yum install wvdial
wvdial-1.60-3.fc8
[root@localhost ~]#
  • Mount: usbfs - not required if already mounted (only required if you don't see the: /proc/bus/usb/devices entry).
[root@localhost ~]# mount -t usbfs usbfs /proc/bus/usb
[root@localhost ~]#
  • Insert the U680. It should auto-mount to the /media/U680_UMSD directory (if not you may need to mount it by hand).
  • Copy the /media/U680_UMSD/Linux_Ubuntu directory to your hard disk:
[root@localhost ~]# cp -r /media/U680_UMSD/Linux_Ubuntu /root/
[root@localhost ~]#
  • Fix the execute.sh script provided (the echo statements all need to have the -e option added so that the contained escape characters are properly printed):
[root@localhost ~]# sed -i -e 's,^echo ,echo -e ,' Linux_Ubuntu/execute.sh
[root@localhost ~]#
  • Stop the NetworkManager service if it is running (not sure if this is necessary):
[root@localhost ~]# service NetworkManager stop
Stopping NetworkManager daemon:                                     [FAILED]
[root@localhost ~]#
  • Run the connect command provided:
[root@localhost ~]# cd /root/Linux_Ubuntu
[root@localhost ~]# ./connect

... Lots of output as connection is established ...


  • At this point the connection should be established, HOWEVER, the file: /etc/resolv.conf might not be set properly. The DNS servers should appear near the end of the output of the window running the ./connect command. I was discovered that the: resolv.conf file was created under: /etc/ppp/resolv.conf. Copying this file to: /etc/resolv.conf fixed the DNS issues (made it possible to resolve names to IP addresses).
[root@localhost ~]# cp /etc/ppp/resolv.conf /etc/resolv.conf
[root@localhost ~]#

NST v1.8.1

Getting the U680 to work on a source build of the NST v1.8.1 development tree involved the following:


  • Insert the U680.
  • Determine the device for the U680 drive. Mine was: /dev/sdb as reported by kudzu (I looked for "CMOTECH" in the kudzu output below).
[root@localhost ~]# kudzu -p -c HD -b SCSI
-
class: HD
bus: SCSI
detached: 0
device: sda
desc: "ATA HTS541080G9AT00"
host: 0
id: 0
channel: 0
lun: 0
-
class: HD
bus: SCSI
detached: 0
device: sdb
desc: "CMOTECH Mass Storage"
host: 2
id: 0
channel: 0
lun: 0
[root@localhost ~]#
  • Mount the U680 drive:
[root@localhost ~]# mkdir /media/U680_UMSD
[root@localhost ~]# mount /dev/sdb /media/U680_UMSD
[root@localhost ~]#
  • Copy the /media/U680_UMSD/Linux_Ubuntu directory to your hard disk:
[root@localhost ~]# cp -r /media/U680_UMSD/Linux_Ubuntu /root/
[root@localhost ~]#
  • Fix the execute.sh script provided (the echo statements all need to have the -e option added so that the contained escape characters are properly printed):
[root@localhost ~]# sed -i -e 's,^echo ,echo -e ,' Linux_Ubuntu/execute.sh
[root@localhost ~]#
  • Run the connect command provided:
[root@localhost ~]# cd Linux_Ubuntu
[root@localhost ~]# ./connect

... Lots of output as connection is established ...

The connection should now be usable (apparently it uses the /etc/ppp/resolv.conf in this situation - not sure why it didn't under Fedora).