GPRS Modem

From LQWiki
Jump to navigation Jump to search

Linux supports all GPRS modems that use Hayes compatible modem commands, since they act just like regular modems. Cell phones and other external devices are typically easier to set up than internal modems.

Shortly, this is what you need to do:

  1. Set up a TTY interface for the phone
  2. Find the special number and AT commands you need to dial
  3. Set up a dialer

Setting up a TTY interface

Userspace programs generally talk to modems through a tty device, as if they were attached to a serial port. For usb and irda, it can be a bit more tricky.

If you actually have a serial port connection to the modem, /dev/ttyS0 ("COM1") or /dev/ttyS1 ("COM2") will be your device.


For modems with infrared connections, you need to load the module for your particular irda device. Google for your irda device/laptop model if you're not sure which it is, or try all the modules in kernel/drivers/net/irda (some might require port/irq information from you).

Once this driver is loaded and working (checking whether ifconfig -a reports an irda0 device is a good indicator), you can load ircomm-tty and run 'irattach /dev/ircomm0'. Activating the IR device will now work (see irdadump for debug information), and you can use it on /dev/ircomm0.

Finding the phone number to use

Most providers have this on their web sites, if you look carefully enough. More often than not they're illustrated in screenshots of the windows modem setup procedure, but they're easy enough to separate. Make sure you're actually looking at GPRS setup, and not analog dialup modems (GPRS numbers will always include * or # (star or hash) signs, such as "*99***1#"). Sometimes additional AT commands are required, such as ' AT+cgdcont=1,"IP","internet" '.

Setting up a dialer

Now that you know the device, number and additional AT commands, you can configure it as any other modem. See the modem setup page.

See also