USB_Modeswitch [OK]

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
Andyun
Posts: 456
Joined: 17. Jun 2010, 09:51
Location: Russia: Severodvinsk / Россия: Северодвинск

USB_Modeswitch [OK]

Post 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.
Last edited by Andyun on 14. Aug 2012, 10:51, edited 1 time in total.
User avatar
gapan
Salix Wizard
Posts: 6368
Joined: 6. Jun 2009, 17:40

Re: USB_Modeswitch

Post 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.
Image
Image
User avatar
Andyun
Posts: 456
Joined: 17. Jun 2010, 09:51
Location: Russia: Severodvinsk / Россия: Северодвинск

Re: USB_Modeswitch

Post 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!
jerryap
Posts: 1
Joined: 15. May 2011, 19:51

Re: USB_Modeswitch

Post 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
User avatar
Andyun
Posts: 456
Joined: 17. Jun 2010, 09:51
Location: Russia: Severodvinsk / Россия: Северодвинск

Re: USB_Modeswitch

Post by Andyun »

Udev rule is situated in "/lib/udev/rules.d/40-usb_modeswitch.rules", but it doesn't work. It can fix?
User avatar
gapan
Salix Wizard
Posts: 6368
Joined: 6. Jun 2009, 17:40

Re: USB_Modeswitch

Post by gapan »

Copy it to /etc/udev/rules.d/
Image
Image
User avatar
Andyun
Posts: 456
Joined: 17. Jun 2010, 09:51
Location: Russia: Severodvinsk / Россия: Северодвинск

Re: USB_Modeswitch

Post by Andyun »

It is unclear why, but it is not working, although the model of my modem is in "40-usb_modeswitch.rules".
User avatar
Andyun
Posts: 456
Joined: 17. Jun 2010, 09:51
Location: Russia: Severodvinsk / Россия: Северодвинск

Re: USB_Modeswitch

Post by Andyun »

Solution here.
Post Reply