Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
shawnjgoff
Posts: 6
Joined: 16 Sep 2010, 23:17

Problems with Option Icon 322

Post by shawnjgoff » 05 Apr 2013, 18:32

I'm having problems trying to modeswitch the Option Icon 322 (0af0:d033). Running usb_modeswitch -v 0af0 -p d033 causes a hang; if I send a SIGTERM and try again, it finishes and says it successfully sent the message, but the modem is still not switched (no change in lsusb -v, specifically, the class still shows mass storage, and no ttyHSx devices (hso is loaded)).

This was on an embedded system, so I moved over to a desktop system - usb_modeswitch works there, so I made sure to have the same version and config files on the embedded device - still no luck there. So I started experimenting on the desktop. I removed the udev rule that runs "usb_modeswitch %b/%k" and saw that the modem did not switch, that let me try at the command line. Using usb_modeswitch -v 0af0 -p d033 showed the same bad behavior I had seen on the embedded device. Then I replaced the udev rule, but instead of running usb_modeswitch, I replaced it with a program that saves the args so I could see them. After triggering the rule, I looked at the args, and it was '/1-2.2', so I ran "usb_modeswitch /1-2.2", and it complained about a missing vid/pid. I went on to look at the source code, and I'm very confused because I don't see how it could ever work with that argument.

So, what's happening here? Why does this udev rule work?

Code: Select all

# Option HSO device
ATTR{idVendor}=="0af0", ATTR{idProduct}=="d033", RUN+="usb_modeswitch '%b/%k'"

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: Problems with Option Icon 322

Post by LOM » 05 Apr 2013, 19:21

Did you read the "How to install" and "How to use" sections on the USB_Modeswitch main page?

shawnjgoff
Posts: 6
Joined: 16 Sep 2010, 23:17

Re: Problems with Option Icon 322

Post by shawnjgoff » 08 Apr 2013, 16:09

Of course not, why would I do that ;-) That helped me figure it out. Thanks.

Post Reply