Huawei e169g

From MyWiki

(Difference between revisions)
Jump to: navigation, search
(New page: I think I have finally cracked the issue of my 3G Huawei E169G USB stick not being detected when 'hotplugged'.<br> After few hours of Google'ing I found few interesting sources, but they ...)
m (Updated URL to "Three Ireland USB modem". It's no longer available at its original location, but web.archive.org has it :-))
 
(2 intermediate revisions not shown)
Line 9: Line 9:
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.<br>
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.<br>
-
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, something made me to try again and I booted the laptop with the modem still plugged in and ... IT WORKED!<br>
+
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!<br>
-
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 not when I want to plug it in while it's already booted? It must had something with udev/hotplug. And it did. <br>
+
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. <br>
The answer came from [[http://www.murga-linux.com/puppy/viewtopic.php?t=31364&sid=c8521c92a2342363363c91731b84b852 here]]. <br>
The answer came from [[http://www.murga-linux.com/puppy/viewtopic.php?t=31364&sid=c8521c92a2342363363c91731b84b852 here]]. <br>
Line 18: Line 18:
* <tt>sudo apt-get install libusb-dev</tt>
* <tt>sudo apt-get install libusb-dev</tt>
-
*
+
* downloaded <tt>huaweiAktBbo.c</tt> from [[http://www.kanoistika.sk/bobovsky/archiv/umts/ here]] and replaced <tt>'''product = 0x1003;'''</tt> with <tt>'''product = 0x1001;'''</tt> since E169G's ProductId is 1001
 +
* <tt>cc huaweiAktBbo.c -lusb -o huaweiAktBbo</tt>
 +
* <tt>sudo cp huaweiAktBbo /usr/sbin/huaweiAktBbo</tt>
 +
* <tt>sudo cp /etc/udev/rules.d/99-huawei-e220.rules /etc/udev/rules.d/99-huawei-e169.rules</tt> and edited the new copy (see the details below)
 +
* <tt>sudo cp /etc/udev/rules.d/99-sc-huawei-e220.rules /etc/udev/rules.d/99-sc-huawei-e169.rules</tt> and edited the new copy (see the details below)<br>
 +
 
 +
What's in <tt>/etc/udev/rules.d/99-huawei-e169.rules</tt>:<br>
 +
<tt># From http://www.kanoistika.sk/bobovsky/archiv/umts/
 +
SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1001", RUN+="/usr/sbin/huaweiAktBbo"</tt>
 +
 
 +
What's in <tt>/etc/udev/rules.d/99-sc-huawei-e169.rules</tt>:<br>
 +
<tt>SUBSYSTEM=="block", \<br>
 +
ACTION=="add", \<br>
 +
SYSFS{idVendor}=="12d1", \<br>
 +
SYSFS{idProduct}=="1001", \<br>
 +
IMPORT{program}="/sbin/modprobe usbserial vendor=0x12d1 product=0x1001", \<br>
 +
OPTIONS="ignore_device"</tt><br>
 +
 
 +
And this link helped me to get pon/poff sorted [[https://web.archive.org/web/20110101113908/http://www.linux.ie/articles/tutorials/threeirelandUSBmodem.php Three Ireland USB Modem HOWTO]]<br>
 +
 
 +
And here you have it. I'm writing this while logged in with my 3G modem :-).

Current revision as of 12:53, 19 March 2017

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