Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
jiyu_shi
Posts: 1
Joined: 16 Mar 2016, 06:46

how to modeswitch on openwrt?

Post by jiyu_shi » 16 Mar 2016, 07:06

I installed usb-modeswitch(2014-08-26-993a9a5427..37a) in openwrt (raspberry pi2 B), but usb_modeswitch is not availabe by

Code: Select all

-ash: usb_modeswitch: not found
There is no usb_modeswitch in /usr/bin and /usr/sbin.
I try "usbmode" that seems like usb_modeswitch, when type usbmode -l, it return:

Code: Select all

Found device: 12d1:1505 (Manufacturer: "Qualcomm, Incorporated", Product: "USB MMC Storage", Serial: "????????????")
but a common conf file that runs well in usb_modeswitch won't run in usbmode:

Code: Select all

# Huawei EC156

DisableSwitching=0
EnableLogging=0

DefaultVendor=0x12d1
DefaultProduct=0x1505
TargetVendor=0x12d1
TargetProduct=0x140c
# MessageContent="55534243123456780000000000000011062000000100000000000000000000"
HuaweiNewMode=1
I edit a json file:

Code: Select all

{
"messages" : [
        "55534243123456780000000000000011062000000100000000000000000000",
        ],

"devices" : {
                "12d1:1505": {
                        "*": {
                                "t_vendor": 12d1,
                                "t_product": [ 140c ],
                                "mode": "HuaweiNew",
                                "msg": [  ]
                        }
                },
}
}
it return:

Code: Select all

Failed to load config file
how to use usbmode?

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

Re: how to modeswitch on openwrt?

Post by LOM » 16 Mar 2016, 10:38

jiyu_shi wrote:
how to use usbmode?
usbmode is OpenWRT's own version of a mode switching utility so that is a question you should ask in the OpenWRT forum.

Post Reply