| Using a Verizon USB720 modem in an Embedded Linux system |
|
|
|
The Verizon USB720 Cellular modem is a quick and easy way to add wireless internet connectivity to your embedded system. Why might you want to add cellular connectivity to your embedded device? Remote access and diagnostics is a big reason. One customer I have is planning to supply all their distributors with a USB720 so they can easily upload log files from devices in the field. The alternative is copying the log files to a flash drive, finding a PC connected to the internet, and then uploading the files -- too much hassle, therefore it does not get done. Also, think about the cost of sending a field support person on-site to troubleshoot problems versus shipping them a USB720 and accessing the device remotely. The USB720 is a fairly small device that plugs into the ubiquitous USB port. This articles covers some of the details on how to configure an embedded Linux system to work with this device.Why is the USB720 a good fit for wireless connectivity in Embedded Systems?Some reasons the USB720 (or other USB based cellular modems) is an attractive option:
Kernel ConfigurationThe USB720 looks like a USB-serial device to the host system. If you plug it into your Ubuntu desktop Linux system, all the needed kernel pieces are there and it will just work. With your embedded system, you need to make sure a number of kernel options are enabled including: CONFIG_PPP=m The CONFIG_USB_SERIAL_OPTION selection enables a driver that is specifically optimized to work with the USB chip found in many cellular modems. Once you enable the above modules, and if you are running udev, simply plugging in the device will cause the appropriate modules to load and a /dev/ttyUSB0 device will now appear. PPP ScriptsThe most difficult part of this exercise is figuring out how to configure the PPP scripts. Verizon of course does not tell you how to configure their device and only supplies software for Windows and MAC. There are a number of howtos available on the internet, but most of them are tailored to using kppp or wvdial. Neither are very practical for embedded systems. Fortunately, the standard pppd daemon is fairly easy to use, is easy to build for embedded systems (it is already included in OpenEmbedded), and seems to work very well. The following scripts are needed: /etc/ppp/peers/verizon noauth /etc/ppp/peers/verizon_chat '' 'ATZ' /etc/ppp/chap-secrets "<phone number>@vzw3g.com" * "vzw" At this point, you can run pppd call verizon and you should see something like: root@cm-x270:~$ pppd call verizon root@cm-x270:~$ ifconfig You are connected :-) Using the OE ppp packageAdd ppp support to your image using OE is fairly straightfoward:
One thing that may trip you up is the ppp scripts are expecting resolv.conf to be in the following location: /var/run/resolv.conf. The reason for this is we want resolv.conf in a RAM file system to prevent unneeded flash wear. Therefore, /etc/resolv.conf should be configured in your rootfs as a soft link to /var/run/resolv.conf. SummaryThe Linux kernel support for USB720 and the pppd package offer a quick, robust way to add cellular network connectivity to about any embedded Linux system that has a USB host port. As systems become more complex, it will be increasingly important to be able to remotely access systems in the field to troubleshoot problems, help users with configuration, etc. The USB720 offers a quick way to provide this type of connection without going through the expense of designing cellular connectivity into your product. One thing I usually encourage all my customers to do when designing new products is expose a USB host port, even though they may not see any immediate use for it. This is one of those reasons. Below is a picture of a USB720 connected to a Compulab cm-x270 development system.
| |||||||
|
|||||||
| Last Updated ( Monday, 02 June 2008 ) | |||||||
| < Prev | Next > |
|---|





