Friday, May 11, 2012

Getting a USB GSM modem working on Ubuntu


I have USB GSM modem working on a MAC, and have been using it to send SMS. Now I need to get the same modem working on a Ubuntu 10.04. Here are the steps I took to get it working on Ubuntu

When I first plug the modem into the USB port, the modem is detected as a CD-ROM device. A CD-ROM icon appears on the desktop. Ubuntu also detects the modem as a storage device, as I can tell, from issuing a few commands.
  • the device appears as /dev/sr# (# is number which varies), a byte stream device
  • the command "lsusb" output shows the device as "Bus 002 Device 005: ID 1c9e:f000." From what I read on the Internet, "f000" indicates it is a memory device.
  • the command "ls /dev/disk" shows there is disk "by-label" of "Modem", and "by-id" of usb-USBModem_Disk_1234567890ABCDEF-0:0.
So all evidences show the modem isn't detected as a modem. Via Google search, I found out it is the effect of the ZeroCD feature that the modem manufacturers have been putting in the modem. Here is a wiki description on it. Essentially, the USB modem has a bit flash storage which stores the driver of the modem. When the modem is plugged into a Windows or MAC machine, it first runs as a storage device which auto-installs the driver, the driver then switches the modem out of the storage mode into the modem mode. On a Ubuntu, the driver doesn't run and install, therefore the modem remains as a storage device.

To switch the USB modem out of the storage mode and into the modem mode, I found the Sakis3G script. It is simple and works very well.

$ gunzip sakis3g.zip

$ sudo cp sakis3g /usr/bin

$ cd /usr/bin

$ ls -l sakis3g



Here are the model of the modem and the version of Ubuntu that I'm using:
GSM modem: Zoom 4595 3G tri-band USB modem
Ubuntu: 10.04.3 LTS

1 comment:

  1. There is a simpler way - built into Ubuntu.
    System > Disk utility
    Add it to panel for easy access.
    Insert USB Modem > as soon as possibleClick on Disk utility.
    Locate in left panel CD Drive > click on it
    in right panel > Eject (the cd)
    after a second or two a new device will appear above the cd (mine is Zotec MMC Storage)
    your GSM modem can now be seen in Network manager

    to use it make sure Enable Mobile Broadband is ticked in (right click) Network manager

    Hope this is helpful to some of you.

    ReplyDelete