Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Sunday, April 10, 2016

Huawei E3131 on Ubuntu 15.10

This post is about getting the Huawei E3131 usb modem to work smoothly on Ubuntu 15.10. If you are a user who is using this modem you must have experienced that the modem fails to connect on a cold start. You need to unplug it and plug it again after you logged in to get the modem working. Well while doing some digging in the internet i came across the following bug report which helped me to fix the problem.

https://bugs.launchpad.net/ubuntu/+source/usb-modeswitch-data/+bug/1192297

What i did was the following

  • Copy /lib/udev/rules.d/40-usb_modeswitch.rules to /etc/udev/rules.d/40-usb_modeswitch.rules 
  • Edit /etc/udev/rules.d/40-usb_modeswitch.rules and add the following rule at the end of the rule list. Make sure its above the LABEL
# Huawei E3131H
ATTR{idVendor}=="12d1", ATTR{idProduct}=="14fe", RUN+="/usr/sbin/usb_modeswitch -v12d1 -p14fe -J"
  • Comment the following rule as below
# Generic entry for all Huawei devices, excluding Android phones
# ATTRS{idVendor}=="12d1", ATTRS{manufacturer}!="Android", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '%b/%k'"
Thais it with the configuration. Now shutdown the pc and start it to see if it is working :)

Update:

The configuration file is no longer needed since the rule uses the huawei mode switch.

Tuesday, February 24, 2015

Getting the USB dongle to work after latest updated in Ubunutu 14.10

After updating the Ubuntu 14.10 my BandRich C120 dongle stops working. The network manager couldn't detect the modem. While looking into more i found out that actually the udev fails to switch the dongle into modem mode. It was not a problem with the udev or udev rules, but instead it was something to do with the usb_modeswitch which didn't react to what udev rules passed in when calling it.

But after some time spending playing around with udev and usb_modeswitch, i found a way to write a udev rule which will perform a eject operation against the dongle using usb_modeswitch which will make the dongle to switch into modem mode.

Following is the content of the rule which is copied into
/etc/udev/rules.d/40-bandrich-dongle.rules


SUBSYSTEM=="usb", ATTR{idVendor}=="1a8d", ATTR{idProduct}=="1000", RUN+="/usr/sbin/usb_modeswitch -v 1a8d -p 1000 -K"

If you facing the same issue and don't own the same type of dongle, just find the vendor and product id and change the rule criteria so that it will work for your dongle as well if its supports switching the mode by performing a eject operation.