Wednesday February 22, 2012 19:54:57 UTC
How to setup a Verizon Pantech cell modem on a Soekris with Slackware

Introduction

This document will go over how to setup a Verizon Pantech cell modem via a Soekris on a Slackware 12.2 Linux distribution.

Kernel USB serial modules

By default, the kernel should detect the device provided USB support is enabled. However, the usbserial kernel module will not load automatically. This will result in udev not creating a /dev/ttyUSBx device automatically. There are two ways to load the necessary USB serial support. One is to use the usbserial generic module and to specify the vendor and product id at the command line. In order to do this, generic support has to be enabled in the kernel. The second way is to use the kernel USB serial "option" module. This module will have to be patched to include the vendor and product id of the device. If you choose to build a custom kernel as described in my Slackware Soekris installation guide, then you can enable these options in the kernel at this location:
cd /usr/src/linux-2.6.29.2 (specify the correct location of your kernel source tree here)
make menuconfig
Kernel menu:

Device Drivers ->
USB Support ->
USB Serial Converter Support ->
Enable USB Generic Serial Driver
Enable USB driver for GSM and CDMA modems as a module

Exit and save
Build and install the kernel as described in my Slackware Soekris installation guide
With the modules installed, you can now load the necessary module. The first method is to use the usbserial module:
modprobe usbserial vendor=0x106c product=0x3711
The above vendor and product id might be different if you are running a different Pantech module. If you execute dmesg after inserting your Pantech in the USB port, you will see a log in the kernel that tells you the vendor and product id. It will look something like:
usb 1-1: New USB device found, idVendor=106c, idProduct=3711
Use the correct vendor and product id while doing a modprobe.

The second method is to patch the option kernel module and add the vendor and product id in. A patch for that is provided below.

Pantech option patch

Before applying the patch, edit the patch file and confirm that the PANTECH_VENDOR_ID and PANTECH_PRODUCT_ID match the vendor and product id of your device. To patch the kernel source, put the patch above in the main kernel directory and execute the following:
cd /usr/src/linux-2.6.29.2 (specify the correct location of your kernel source tree here)
patch -p0 < pantech-option.patch
Now you can rebuild the kernel modules for the changes to be included.

PPP Configuration

The next step is setting up the PPP configuration. You will want to make sure that you have PPP support built into the kernel. If you used my kernel configuration in my Soekris Slackware installation guide, then you have everything you need. You will also need to make sure that you have the ppp package installed that is included in the Slackware n series. To make life easy, I have included a tar file that has everything you need to get going with the Verizon service.

Verizon PPP tar file

Now you will want to copy this file to your Soekris and untar it. Follow these commands as root:
cd /
tar xzf ~/verizon.tgz (Specify the correction location where you copied this file)
The next thing to do is to edit the verizon ppp file and update the phone number for the user. This phone number should match the phone number of your Verizon data account.
vi /etc/ppp/peers/verizon
Edit the first line starting with user and update with the correct number
The /dev/ttyUSB1 device listed in the above file was the correct device for my configuration when I tried either the usbserial or option module. For some reason, when you load the usbserial generic module, two devices are configured (ttyUSB0-1) and three for the option module (ttyUSB0-2). ttyUSB1 was the only one that works correctly while testing the Verizon service.

I have included a script for starting or stopping the Verizon service in my tar file above. Here is how to do that:
Start connection: 
/etc/rc.d/rc.verizon start
Stop connection:
/etc/rc.d/rc.verizon stop
Before starting the service, you will want to make sure that there is not a default gateway configured whether by DHCP or statically. You can check this in the /etc/rc.d/rc.inet1.conf file. Check the USE_DHCP[] option of each Ethernet port and the GATEWAY option further down in this file. GATEWAY should be empty and DHCP disabled if the DHCP service is handing out a default gateway. If a default gateway is already configured, then a default gateway will not be set after starting the Verizon service.

Conclusion

That should be all that you have to do to start using your Verizon data service through the Soekris. The same kernel and PPP configuration should work for other systems as well. In the future, I plan to add another document that will describe how to setup the Soekris with NAT using IPTables so that you can use the Soekris as a router via its Ethernet ports. This will provide Internet service to a network of systems via the Verizon cell service by using the Soekris as your gateway.