Page 1 of 1

USB_Modeswitch [OK]

Posted: 12. Aug 2011, 11:24
by Andyun
Hello!
Tell me, please, how to make when connecting a UMTS modem, the program "usb_modeswitch" start automatically and switch it?

At the present time, to configure the program (usb_modeswitch 1.1.2), I manually created the file /etc/usb_modeswitch.setup with the content:

Code: Select all

#
# Huawei E1550
#
DefaultVendor=  0x12d1
DefaultProduct= 0x1446
MessageContent="55534243123456780000000000000011060000000000000000000000000000"
These parameters are in the file of "usb_modeswitch" /etc/usb_modeswitch.d/12d1:1446. Why the program doesn't use them yourself?
To automatically run the "usb_modeswitch" during the boot OS with the connected modem, I added a line "usb_modeswitch" to the file /etc/rc.d/rc.local.

Re: USB_Modeswitch

Posted: 13. Aug 2011, 10:35
by gapan
I don't know if the settings are correct, but adding it to rc.local, like you did, is the proper way to do it.

Re: USB_Modeswitch

Posted: 13. Aug 2011, 11:08
by Andyun
In version USB_Modeswitch 1.1.6 this option does not work, it does not use the file "/etc/usb_modeswitch.setup", so I changed the way. Content of the file "/etc/rc.d/rc.local":

Code: Select all

usb_modeswitch -Q -c /etc/usb_modeswitch.d/12d1:1446
In the file /etc/usb_modeswitch.d/12d1:1446 I commented out the line:

Code: Select all

CheckSuccess=20
that not to wait for 20 seconds on an unnecessary for me to poll the modem.

And all the same, the program should automatically switch the modem when connecting it to computer.

Thank you for your comment!

Re: USB_Modeswitch

Posted: 14. Aug 2011, 20:22
by jerryap
You need a udev rule to automatically invoke usb_modeswitch when the device is plugged in.
Searching google for: usb_modeswitch udev gets me about 33,000 hits.

Jerry

Re: USB_Modeswitch

Posted: 15. Sep 2011, 22:41
by Andyun
Udev rule is situated in "/lib/udev/rules.d/40-usb_modeswitch.rules", but it doesn't work. It can fix?

Re: USB_Modeswitch

Posted: 16. Sep 2011, 08:11
by gapan
Copy it to /etc/udev/rules.d/

Re: USB_Modeswitch

Posted: 16. Sep 2011, 16:05
by Andyun
It is unclear why, but it is not working, although the model of my modem is in "40-usb_modeswitch.rules".

Re: USB_Modeswitch

Posted: 14. Aug 2012, 10:50
by Andyun
Solution here.