Prabhat_Ranjan

Connecting Huawei Ec121 Usb Modem On Linux

9 posts in this topic

Connecting Huawei EC121 USB modem sold by Reliance is difficult to connect with the current Linux Kernel Versions (2.6.27). This is due to the fact that device has usb storage to store windows driver etc. as well as modem. Due to this Linux kernel drivers get confused. While Huawei seems to be working to get the appropriate modification in kernel drivers done, as of now it is not there. However, you can use 'usb_modeswitch' program to switch the device to modem mode. I have tested it on Fedora 9 and it seems to have worked reliably. I would update more info on this as and when i get them.

Edited by Prabhat_Ranjan

Share this post


Link to post
Share on other sites

When rconnect for linux was released, MTU value was set to 284 for some reason. This is not very efficient and may give problem with some applications. Change this to 1500 - it is passed as option to 'pppd' command. You can check this by ifconfig command and see what MTU value it shows for ppp0 interface.

Share this post


Link to post
Share on other sites
Connecting Huawei EC121 USB modem sold by Reliance is difficult to connect with the current Linux Kernel Versions (2.6.27). This is due to he fact that device has usb storage to store windows driver etc. as well as modem. Due to this Linux kernel drivers get confused. While Huawei seems to be working to get the appropriate modification in kernel drivers done, as of now it is not there. However, you can use 'usb_modeswitch' program to switch the device to modem mode. I have tested it on Fedora 9 and it seems to have worked reliably. I would update more info on this as and when i get them.

Once you install usb_modeswitch, you can use udev rules to automate the process of running it when you insert the device by having file like "70-huawei-ec121.rules" placed in /etc/udev/rules.d (for Fedora 9) containing:

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1411" RUN+="/bin/usb_modeswitch"

here "/bin/usb_modeswtich" is the full pathename of usb_modeswtich. Change it if you install it somewhere else.

Share this post


Link to post
Share on other sites

Thanks for sharing your findings! Maybe mods can pin this topic!

Share this post


Link to post
Share on other sites

Merged and Pinned topic... Thanks Prabhat!

Share this post


Link to post
Share on other sites

I tried usb_modeswitch after connecting the device but this is what I got...

* usb_modeswitch: tool for controlling "flip flop" mode USB devices

* Version 0.9.5 © Josua Dietze 2008

* Works with libusb 0.1.12 and probably other versions

Looking for target devices

No target device found

Looking for default devices

No default device found. Is it connected? Bye

Share this post


Link to post
Share on other sites
I tried usb_modeswitch after connecting the device but this is what I got...

* usb_modeswitch: tool for controlling "flip flop" mode USB devices

* Version 0.9.5 © Josua Dietze 2008

* Works with libusb 0.1.12 and probably other versions

Looking for target devices

No target device found

Looking for default devices

No default device found. Is it connected? Bye

You have to edit /etc/usb_modeswitch.conf and add your device as target device. You may have to comment other devices and add the following:

##################

DefaultVendor= 0x12d1;

DefaultProduct= 0x1411

# choose one of these:

;DetachStorageOnly=1

HuaweiMode=1

###################

If it still does not find, use lsusb command to identify your device specification. Read the comments in the beginning of /etc/usb_modeswitch.conf file.

Share this post


Link to post
Share on other sites
I tried usb_modeswitch after connecting the device but this is what I got...

* usb_modeswitch: tool for controlling "flip flop" mode USB devices

* Version 0.9.5 © Josua Dietze 2008

* Works with libusb 0.1.12 and probably other versions

Looking for target devices

No target device found

Looking for default devices

No default device found. Is it connected? Bye

You have to edit /etc/usb_modeswitch.conf and add your device as target device. You may have to comment other devices and add the following:

##################

DefaultVendor= 0x12d1;

DefaultProduct= 0x1411

# choose one of these:

;DetachStorageOnly=1

HuaweiMode=1

###################

If it still does not find, use lsusb command to identify your device specification. Read the comments in the beginning of /etc/usb_modeswitch.conf file.

I am using Fedora 10. I used the above modification to the usb_modeswitch.conf, but I still get the message - no device found. lsusb shows the device ok. dmesg also shows the device and gives the following messaage:

usb 7-1: new full speed USB device using uhci_hcd and address 36

usb 7-1: configuration #1 chosen from 1 choice

scsi58 : SCSI emulation for USB Mass Storage devices

usb 7-1: New USB device found, idVendor=12d1, idProduct=1411

usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0

usb 7-1: Product: Huawei Technologies

usb 7-1: Manufacturer: Huawei, Incorporated

usb-storage: device found at 36

usb-storage: waiting for device to settle before scanning

usb 7-1: usbfs: USBDEVFS_CONTROL failed cmd usb_modeswitch rqt 0 rq 3 len 0 ret -71

usb 7-1: usbfs: USBDEVFS_CONTROL failed cmd usb_modeswitch rqt 0 rq 3 len 0 ret -71

usb 7-1: USB disconnect, address 36

usb 7-1: new full speed USB device using uhci_hcd and address 37

this goes on. any solutions to this?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now