Search found 9 matches

by linuxtardis
Mon Jul 06, 2020 2:20 pm
Forum: Everything Coding
Topic: Information USB Hub usb_modeswitch_dispatcher on 2.5.2
Replies: 2
Views: 2515

Re: Information USB Hub usb_modeswitch_dispatcher on 2.5.2

This looks similar to https://bugs.launchpad.net/ubuntu/+source/usb-modeswitch/+bug/1866926 - the reported interface 8 is in reality a class number that is incorrectly assigned to a variable representing interface number. This problem should only be present in Ubuntu 20.04. Manually downloading and ...
by linuxtardis
Mon Jul 06, 2020 2:01 pm
Forum: Everything Coding
Topic: USB_ModeSwitch breaks with USB devices without interface 0
Replies: 12
Views: 7553

Re: USB_ModeSwitch breaks with USB devices without interface 0

Thank you very much! I have tested the fix and now mode switching mostly works: switching using usb_modeswitch directly works out-of-the-box in both directions, MBIM->QMI and QMI->MBIM switching using usb_modeswitch_dispatcher.tcl works in both directions after a change in the IfDir function. The pr...
by linuxtardis
Sun Dec 29, 2019 3:44 pm
Forum: Everything Coding
Topic: USB_ModeSwitch breaks with USB devices without interface 0
Replies: 12
Views: 7553

Re: USB_ModeSwitch breaks with USB devices without interface 0

Another argument for this change is that usb_modeswitch.c gets the default interface in a similar way (it seems that it needs it for interface class query as well): if (Interface == -1) Interface = active_config->interface[0].altsetting[0].bInterfaceNumber; SHOW_PROGRESS(output,"Use interface number...
by linuxtardis
Sun Dec 29, 2019 3:14 pm
Forum: Everything Coding
Topic: USB_ModeSwitch breaks with USB devices without interface 0
Replies: 12
Views: 7553

Re: USB_ModeSwitch breaks with USB devices without interface 0

Hi LOM, Thanks for the reply! Mobile Broadband dongles with install mode usually have the virtual cd storage function on interface 0 and it is to that interface we are sending the switch message. If the dongle has its virtual cd storage function on another interface then we can specify which interfa...
by linuxtardis
Wed Dec 25, 2019 11:14 pm
Forum: Everything Coding
Topic: USB_ModeSwitch breaks with USB devices without interface 0
Replies: 12
Views: 7553

Re: USB_ModeSwitch breaks with USB devices without interface 0

Hmmm, I'm now doing some experiments and I have found an interesting USB mode enumeration: kuba@linuxtardis-e734:~$ sudo qmicli -p -d /dev/cdc-wdm0 --dms-swi-get-usb-composition [/dev/cdc-wdm0] Successfully retrieved USB compositions: USB composition 1: HIP, DM, NMEA, AT, MDM1, MS USB composition 6:...
by linuxtardis
Wed Dec 25, 2019 10:58 pm
Forum: Everything Coding
Topic: USB_ModeSwitch breaks with USB devices without interface 0
Replies: 12
Views: 7553

Re: USB_ModeSwitch breaks with USB devices without interface 0

Logs with the patches applied: QMI -> MBIM: USB_ModeSwitch log from Wed Dec 25 21:57:09 CET 2019 Raw parameters: {--switch-mode} {1-11} Use global config file: /etc/usb_modeswitch.conf Use global config file: /etc/usb_modeswitch.conf Use top device dir /sys/bus/usb/devices/1-11 Current configuration...
by linuxtardis
Wed Dec 25, 2019 10:55 pm
Forum: Everything Coding
Topic: USB_ModeSwitch breaks with USB devices without interface 0
Replies: 12
Views: 7553

Re: USB_ModeSwitch breaks with USB devices without interface 0

The fixes to the main binary were a little easier to make :D It turns out that libusb is aware of this and it provides correct interface numbers if the program accesses them through the descriptor. diff --git a/usb_modeswitch.c b/usb_modeswitch.c index d0ce0e6..b008506 100644 --- a/usb_modeswitch.c ...
by linuxtardis
Wed Dec 25, 2019 10:15 pm
Forum: Everything Coding
Topic: USB_ModeSwitch breaks with USB devices without interface 0
Replies: 12
Views: 7553

Re: Dispatcher does not work on strange USB devices

Yay! I have a local fix for the dispatcher Tcl script. Now the script successfully switches the modem if the kernel modules are unloaded manually (see below). However I have not tested it in other configurations, so tehre is a risk that I may have broken something. diff --git a/usb_modeswitch_dispat...
by linuxtardis
Wed Dec 25, 2019 6:33 pm
Forum: Everything Coding
Topic: USB_ModeSwitch breaks with USB devices without interface 0
Replies: 12
Views: 7553

USB_ModeSwitch breaks with USB devices without interface 0

Hi! I have recently got a refurbished notebook with a builtin LTE modem - Sierra Wireless EM7305. However the modem has strange USB interface numbers, as the interface 0 exists only for configuration 1 and not for configuration 2: [ 2.365878] usb 1-11: new high-speed USB device number 5 using xhci_h...