23 September 2013

Making USB Modem work in GNU/Linux

the short way

Short tutorial for those who donot have all the time in the world to read a lengthy tutorial.
Open ' Terminal ' and run..
eject /dev/sr1
lsusb
Bus 001 Device 004: ID 24e3:3e76 3G Modem
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Note the ID corresponding to USB/3G Modem.
sudo modprobe usbserial vendor=0x24e3 product=0x3e76


the long way

This tutorial will work for most 2G, 3G, 4G or any USB Modem under GNU/Linux using debian/ubuntu.

# Before inserting your usb modem. Open 'Terminal' and run the following command:
ls /dev/sr*
It'll output something like:
/dev/sr0
sr0 is mostly CD/DVD-Drive or any Serial Drive connected.

# Now insert your USB Modem and run the command again..
ls /dev/sr*
/dev/sr0 /dev/sr1
Note the extra serial device (sr1). it is your usb modem internal storage, because when attached they are dectcted as storage devices. It's explained in 'man usb_modeswitch'.
...When plugged in for the first time, they act like a flash storage and start installing the Windows driver from there. If the driver is already installed, it makes the storage device disappear and a new device, mainly composite with modem ports, shows up.

On Linux, in most cases the drivers are available as kernel modules, such as "usbserial" or "option". However, the device shows up as "usb-storage" by default...


# In 'Terminal':
lsusb
Bus 001 Device 004: ID 24e3:2205 3G Modem
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
note the ID corresponding your USB 3G Modem.

# Eject the modem storage:
eject /dev/sr1
..and..
lsusb
Bus 001 Device 004: ID 24e3:3e76 3G Modem
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
It will show a new ID for the Modem.
24e3:3e76
24e3 is VendorID. 3e76 is ProductID of the modem.

# Make the modem visible to the system by running modprobe:
sudo modprobe usbserial vendor=0x24e3 product=0x3e76
Replace the ID with your Modem ID.

Wait a minute for the modem to appear in Network Manager.


No comments:

Post a Comment