Huawei E173s
Posted: 17 Aug 2011, 23:37
I'm using Ubuntu 11.04 with a 3G Huawei E173s usb stick.
This stick is listed in both UDEV rules (file: /lib/udev/rules.d/40-usb_modeswitch.rules) and in usb-modeswitch-data package (file: /usr/share/usb_modeswitch/configPack.tar.gz).
Whei I plug the E173s in my laptop, usb_modeswitch is unable to switch correctly the card to 3G modem. lsusb still shows the "storage mode" vendor and device IDs, and not the correct 3G modem ones.
So I changed /lib/udev/rules.d/40-usb_modeswitch.rules to insert a homemade script:
and this is the /home/gio/a.sh script:
just adding a two second delay before calling usb_modeswitch did the trick: the E173s switches to modem mode and an ubuntu popup asks me the PIN of the SIM.
(please also note that /lib/udev/usb_modeswitch is not the standard usb_modeswitch but it's the one provided with udev which, in turn, calls /usr/sbin/usb_modeswitch_dispatcher which calls the standard /usr/sbin/usb_modeswitch)
Now my question are:
What is the better way to achieve the same result without this "dirty" script ? Is possible to tell usb_modeswitch to do an extra delay ? Or sould be udev instructed to wait for some other event before calling usb-modeswitch ? Has it already been fixed ?
Thank you
Giovanni
This stick is listed in both UDEV rules (file: /lib/udev/rules.d/40-usb_modeswitch.rules) and in usb-modeswitch-data package (file: /usr/share/usb_modeswitch/configPack.tar.gz).
Whei I plug the E173s in my laptop, usb_modeswitch is unable to switch correctly the card to 3G modem. lsusb still shows the "storage mode" vendor and device IDs, and not the correct 3G modem ones.
So I changed /lib/udev/rules.d/40-usb_modeswitch.rules to insert a homemade script:
Code: Select all
# Huawei E173s
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1c0b", RUN+="/home/gio/a.sh '%b/%k'"
Code: Select all
#!/bin/bash
sleep 2
/lib/udev/usb_modeswitch $* > /tmp/gio_out 2>&1
(please also note that /lib/udev/usb_modeswitch is not the standard usb_modeswitch but it's the one provided with udev which, in turn, calls /usr/sbin/usb_modeswitch_dispatcher which calls the standard /usr/sbin/usb_modeswitch)
Now my question are:
What is the better way to achieve the same result without this "dirty" script ? Is possible to tell usb_modeswitch to do an extra delay ? Or sould be udev instructed to wait for some other event before calling usb-modeswitch ? Has it already been fixed ?
Thank you
Giovanni