I'm currently kitting out a Raspberry Pi (default Debian distro) with a ZTE MF190 (19d2:2000 needs to switch to 19d2:0017). This works fine if I plug it in after the Pi has booted. However, it does not work if it boots with the stick already in there. I'd like it to work on boot because the device will be in a hard to reach place so I don't want to replug it when the power is lost.
I've turned on debuglogging and found that udev runs this usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 5 -v 19d2 -p 2000 -f $configBuffer
I think I need to know what the configBuffer is. I suspected the message strings, but grabbing the message strings and doing this: usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 4 -v 19d2 -p 2000 -V 19d2 -P 0017 -f -M 5553424312345678000000000000061e000000000000000000000000000000 -2 5553424312345679000000000000061b000000020000000000000000000000 -3 55534243123456702000000080000c85010101180101010101000000000000
Does not work. Note how the MessageContent is an empty string. How did that happen? I think I did this correctly with -M
(I snipped a lot of the reading long config from command line spam)
Code: Select all
Reading long config from command line
Reading long config from command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.3 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x19d2
DefaultProduct= 0x2000
TargetVendor= 0x19d2
TargetProduct= 0x0017
TargetClass= not set
TargetProductList=""
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent=""
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
MessageContent3="55534243123456702000000080000c85010101180101010101000000000000"
NeedResponse=0
ResponseEndpoint= not set
InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode enabled
Use given bus/device number: 001/004 ...
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 001
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 006 on 001
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 003 on 001
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: couldn't get connect info
usb_os_find_devices: Found 001 on 001
error obtaining child information: Operation not permitted
error obtaining child information: Operation not permitted
error obtaining child information: Operation not permitted
error obtaining child information: Operation not permitted
Looking for default devices ...
No devices in default mode found. Nothing to do. Bye.
So, how can I switch a device that has been plugged in since boot? Can I poke udev to reevaluate? Do I need to invoke usb_modeswitch with more commands?
Any help is greatly appreciated.