[Eridani Star System]

Using a Motorola GSM cellular phone with Linux and USB

DISCLAIMER: This requires a kernel hack. Please exercise caution.

The V66, T280, T720i and V500 (and possibly others) can use a USB data lead, but this is unfortunately not recognised as a modem device by the Linux kernel (prior to 2.4.21) out of the box - but with one additional line to one kernel source file, it will work. Tested with kernel 2.4.19 and reported to work with 2.4.20. This patch is included in the standard 2.4.21 release.

New: This apparently also works for some non-GSM phones - one reported to work with this is the Nextel i95cl.

[ MailStripper: Server-side spam filter ]

Edit the file /usr/src/linux/drivers/usb/acm.c (make a backup first!):
Search for this section:

/*
 * USB driver structure.
 */

static struct usb_device_id acm_ids[] = {
        { USB_DEVICE_INFO(USB_CLASS_COMM, 0, 0) },
        { }
};

And change it to this:

/*
 * USB driver structure.
 */

static struct usb_device_id acm_ids[] = {
        { USB_DEVICE_INFO(USB_CLASS_COMM, 0, 0) },
        { USB_DEVICE_INFO(USB_CLASS_COMM, 2, 0) },
        { }
};

...or if you would rather just have a patch - it's here.

Under devfs your modem is now /dev/usb/acm/0 - or if you don't use devfs, create the device node with:
 
mknod /dev/ttyACM0 c 166 0
 
This port can be used like any other modem device to connect to your ISP.

Niggles: If you're using a modular USB setup, load the acm module before plugging your phone in - for some reason if you load the module after plugging the phone in it doesn't work. To make matters worse, if you unplug the phone, you may need to power cycle it if the syslog indicates that it doesn't like to be assigned a new device ID, though this seems to depend on chipset. This niggle occurs on my onboard USB1.1 port on my Vaio but doesn't occur on my Belkin USB2 PCMCIA card. Go figure...


My OrangeInternet GPRS connection script:

#!/bin/bash

/usr/sbin/pppd connect '/usr/sbin/chat -v ABORT "NO CARRIER" "" "AT&F" OK "AT+CGDCONT=1,\"IP\",\"orangeinternet\"" OK "ATDT*99#" CONNECT' \
/dev/ttyACM0 115200 defaultroute crtscts noauth deflate 0 asyncmap 0 mtu 1500 mru 1500 noipdefault idle 600

If you use Orange in the UK, you can use this script "as is".


Eridani Star System. Tel: 07010 711675.  Fax: 08701 600807  Email: linux@eridani.co.uk
Site last updated on 9th August 2004