Huawei e169g

From MyWiki

Jump to: navigation, search

I think I have finally cracked the issue of my 3G Huawei E169G USB stick not being detected when 'hotplugged'.

After few hours of Google'ing I found few interesting sources, but they all about E220 modem, not E169G. Anyway, it was clear that:

  • the modem must be detected as 4 ttyUSB* ports
  • usb_storage has to be hold off from loading to allow usbserial to finish its job

Also, it looked that E169G works nicely with Ubuntu 8.04, but why would I want to re-install something that served me well for few years by now?

I run Debian Stable (etch) and it was a bit of pain to see that the USB card is detected as a storage, but not as a ttyUSB*. In fact it was detected, but not 100% so to speak. I could see only /dev/ttyUSB0 created when the modem is plugged in, but it must be 4 ports not 1.

After multiple tries in different combinations I still couldn't get it work and when I thought 'To hell with this!' and wanted to go to bed, but something made me to try again and I booted the laptop with the modem still plugged in and ... IT WORKED!

All ports detected, pon/poff works and gets me connected. Now, why does it work when the modem is plugged in when I power up the laptop and does not when I want to plug it in while it's already booted? It must had something with udev/hotplug. And it did.

The answer came from [here].

So, my solution was this one:

  • sudo apt-get install libusb-dev
  • downloaded huaweiAktBbo.c from [here] and replaced product = 0x1003; with product = 0x1001; since E169G's ProductId is 1001
  • cc huaweiAktBbo.c -lusb -o huaweiAktBbo
  • sudo cp huaweiAktBbo /usr/sbin/huaweiAktBbo
  • sudo cp /etc/udev/rules.d/99-huawei-e220.rules /etc/udev/rules.d/99-huawei-e169.rules and edited the new copy (see the details below)
  • sudo cp /etc/udev/rules.d/99-sc-huawei-e220.rules /etc/udev/rules.d/99-sc-huawei-e169.rules and edited the new copy (see the details below)

What's in /etc/udev/rules.d/99-huawei-e169.rules:
# From http://www.kanoistika.sk/bobovsky/archiv/umts/ SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1001", RUN+="/usr/sbin/huaweiAktBbo"

What's in /etc/udev/rules.d/99-sc-huawei-e169.rules:
SUBSYSTEM=="block", \
ACTION=="add", \
SYSFS{idVendor}=="12d1", \
SYSFS{idProduct}=="1001", \
IMPORT{program}="/sbin/modprobe usbserial vendor=0x12d1 product=0x1001", \
OPTIONS="ignore_device"

And this link helped me to get pon/poff sorted [Three Ireland USB Modem HOWTO]

And here you have it. I'm writing this while logged in with my 3G modem :-).

Personal tools