The C Source, Patches and (shudder!) Bugs
Post Reply
hayt
Posts: 3
Joined: Fri Dec 12, 2014 8:56 pm

Huaweii E392/E398 Ndis interface

Post by hayt » Fri Dec 12, 2014 9:11 pm

Hello,

I am having Problems with the e392/e398 NDIS interface.

It seems sometimes after some reconnects of the mobile the NDIS interface does not get recognized. The qmi_wwan module will not get the usb descriptor, but the option module instead.
Afterwards this will occur every reconnect until I unload the options module. It works again after this.

There is no regularity after how many reconnects this happens.

My question here now is: is it possible, that maybe usb_modeswitch is adding the ndis interface dynamcly to the options module, so the qmi_wwan will be prevented to initialize this?

what I see in the logs, in case the all went well:
(interface 1.2 is just a regular tty as an example. 1.3 should be the ndis device)

Code: Select all

...
get_iface_id:641: option 1-4:1.2: static descriptor matches
get_iface_id:641: option 1-4:1.2: static descriptor matches
usb_serial_probe:766: option 1-4:1.2: found bulk in on endpoint 0
usb_serial_probe:775: option 1-4:1.2: found bulk out on endpoint 1
option 1-4:1.2: GSM modem (1-port) converter detected
usb_serial_probe:888: option 1-4:1.2: setting up 1 port structures for this device
allocate_minors:94: option 1-4:1.2: allocate_minors 1
usb_serial_probe:1054: option 1-4:1.2: registering ttyUSB2
usb 1-4: GSM modem (1-port) converter now attached to ttyUSB2
qmi_wwan 1-4:1.3: cdc-wdm1: USB WDM device
qmi_wwan 1-4:1.3 wwan1: register 'qmi_wwan' at usb-0000:00:12.2-4, WWAN/QMI device, 00:a0:c6:00:00:00
...
and the log in case it went wrong:

Code: Select all

...
get_iface_id:641: option 1-4:1.2: static descriptor matches
get_iface_id:641: option 1-4:1.2: static descriptor matches
usb_serial_probe:766: option 1-4:1.2: found bulk in on endpoint 0
usb_serial_probe:775: option 1-4:1.2: found bulk out on endpoint 1
option 1-4:1.2: GSM modem (1-port) converter detected
usb_serial_probe:888: option 1-4:1.2: setting up 1 port structures for this device
allocate_minors:94: option 1-4:1.2: allocate_minors 1
usb_serial_probe:1054: option 1-4:1.2: registering ttyUSB2
usb 1-4: GSM modem (1-port) converter now attached to ttyUSB2
get_iface_id:646: option 1-4:1.3: dynamic descriptor matches
usb_serial_probe:784: option 1-4:1.3: found interrupt in on endpoint 0
option 1-4:1.3: GSM modem (1-port) converter detected
usb_serial_probe:888: option 1-4:1.3: setting up 1 port structures for this device
allocate_minors:94: option 1-4:1.3: allocate_minors 1
usb_serial_probe:1054: option 1-4:1.3: registering ttyUSB3
...
So somehow now the option module has a dynamic descriptor matching.
Can this be related to usb modeswitch? If yes, do you need any more information to help there or give me a pointer to where to look to fix this?

Kind Regards
Ricardo

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: Huaweii E392/E398 Ndis interface

Post by Josh » Sun Dec 14, 2014 7:47 pm

Enable the usb_modeswitch logging in /etc/usb_modeswitch.conf; this should tell you if it's the culprit.

It does add interfaces with vendor-specific class to the option driver dynamically, but should do so only after no other driver has bound to it.

hayt
Posts: 3
Joined: Fri Dec 12, 2014 8:56 pm

Re: Huaweii E392/E398 Ndis interface

Post by hayt » Tue Jan 06, 2015 11:14 am

I don't really know why, but what fixed it for me was to disable the default usb-modeswitch udev rules file and have a custom one with this specified.

Code: Select all

ATTR{idVendor}=="12d1", ATTR{idProduct}=="1505", RUN+="/usr/sbin/usb_modeswitch -v 0x12d1 -p 0x1505 -V 0x12d1 -P 1506 -M '55534243123456780000000000000011062000000101000100000000000000' -n 0 -b  $attr{busnum} -g $attr{devnum} "

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: Huaweii E392/E398 Ndis interface

Post by Josh » Wed Jan 14, 2015 12:12 am

Hard to say what goes wrong without the log I have asked for.

hayt
Posts: 3
Joined: Fri Dec 12, 2014 8:56 pm

Re: Huaweii E392/E398 Ndis interface

Post by hayt » Wed Jan 14, 2015 12:10 pm

I am currently busy with other tasks, but i will provide them when I have the opportunity.

Though I have checked the log when i worked fine and checked the log when it did not work and they looked identical.

When I have some time to test with the sticks again I will provide you with the logs.

Post Reply