I'm trying to configure the PC to connect to the Internet over Huawei modem when it's started. However, after start, the modem is recognized as Mass storage device. I can switch it to correct mode by running
sudo usb_modeswitch -v 12d1 -p 14fe -J
I need the modem to work from start, so I figured out that I need to add the following to /etc/usb_modeswitch.conf:
DefaultVendor=0x12d1
DefaultProduct=0x14fe
TargetVendor=0x12d1
TargetProduct=0x1506
HuaweiNewMode=1
This works when I load the configuration file by running sudo usb_modeswitch -c /etc/usb_modeswitch.conf
, but not when computer starts. Anybody knows how to apply the configuration on startup?
UPDATE: I tried also adding the following line to /lib/udev/rules.d/40-usb_modeswitch.rules:
ATTR{idVendor}=="12d1", ATTR{idProduct}=="14fe", RUN+="usb_modeswitch '%b/%k'"
or
ATTR{idVendor}=="12d1", ATTR{idProduct}=="14fe", RUN+="usb_modeswitch -v 12d1 -p 14fe -J"
I still can't get it to work.