[Gllug] EEE issues

damion.yates at gmail.com damion.yates at gmail.com
Tue Nov 17 10:16:11 UTC 2009


On Mon, 16 Nov 2009, Frazer Irving wrote:

> Secondly, I am seriously looking at buying a USB modem from one of the
> telecom providers here. There will probably be no linux support,

Most of these (can be made to) work.  Once you see them as a serial
device, typically /dev/ttyUSB0, you can attach a terminal emulator to
them (minicom for example), you can issue AT commands and get OK
responses confirming you've basically got the hard part working.

Getting dial-up networking working from that point is a case of working
out the correct pppd+chat/wvdial configuration and most distributions
should be able to sort this.  This problem is decades old in linux and
should be solved by now!  I tend to manually edit /etc/ppp/peers/* and a
chat script.  The chat script needs to contain the AT command to
configure the device to dial up, before pppd gets the ppp stream
which'll do IP allocation and the rest, default DNS servers and route
etc.

This'll be something like AT+CGDCONT=1,"IP","internet"
Followed by ATDT*99#

"internet" is "mobile.o2.co.uk" for my O2 network in the UK.  This
part will change, the =1 possibly, but probably not.  The quotes are
needed.  

Here is a random page I binged for
http://affix.sourceforge.net/gprs-zaurushowto.shtml

The actual APN details will be somewhere on the driver disks that come
with the device, maybe a text file Windows/MacOS uses for their drivers.
I've also seen quite a few devices which have Linux drivers on the
install CD or embedded virtual CD.

This is where the hard part comes.  Most of the common cheaper USB
Modems appear initially as a usb-storage device.  This is a virtual
cdrom and within it are the drivers for Windows.  You need to unload the
usb-storage side of things and force the device to behave as a serial
device instead.  The way to do this is sometimes compiled in to the
latest kernels, so if you have a sufficiently new kernel, it'll
recognise the usb IDs and the developer will realise the data on the
cdrom drive is useless and send the right sequence of data to the usb
device at init time and make the device become a usb-serial device.
If you're really lucky the device has multiple USB IDs and is a serial
device as well as cdrom and just works that way too.

If you're not lucky then you need to install usbmodeswitch
http://www.draisberghof.de/usb_modeswitch/
This tool reads from a database (text file in /etc/) which users of
previously found to be able to made to work, usb modes have submitted
sequences of data which this tool throws at the device via the bus.
These are often recorded by tools under windows.  usbmodeswitch in
combination with the usb hotplug scripts of your distribution, can be
made to automatically detect insertion of the device, not load the
usb-storage module, run usbmodeswitch against the device and then when
the usb IDs change (which seems common, but isn't guarenteed), attach
serial to it.

You can skim through the text file database of existing devices, but you
might find, like me, that you're the first Linux user to have come
across a new device, and you're only hope is to uncomment and edit
existing similar chipset/manufacturer sections in the config to see if
existing blobs of data thrown down the bus work.

Good luck with this, it's fun!

Damion
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list