Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1424 - usbmode sits in loop after install #6377

Open
openwrt-bot opened this issue Mar 9, 2018 · 5 comments
Open

FS#1424 - usbmode sits in loop after install #6377

openwrt-bot opened this issue Mar 9, 2018 · 5 comments
Labels

Comments

@openwrt-bot
Copy link

sydney:

  • Name the tree/revision/version

OpenWrt Snapshot r6397-7cc9914

  • Name the affected device

Huawei ME909s-120 LTE Card (12d1:15c1) on a PC Engines APU2 (amd64) in MBIM Mode.

  • What does it do that it should not do / what does it not do that it should do

usbmode sits in a loop right after installation, doesn't switch the Modem in MBMI mode and thus no /dev/cdc-wdm0 device is created and prints constantly:

[ 59.838090] usb 1-1.3: usbfs: process 6946 (usbmode) did not claim interface 1 before use
[ 60.048534] usb 1-1.3: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0
[ 60.131996] usb 1-1.3: usbfs: process 7032 (usbmode) did not claim interface 1 before use
[ 60.342459] usb 1-1.3: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0

  • Steps to reproduce

Install usb-modeswitch on OpenWrt Snapshot r6397-7cc9914

  • What you have already done to workaround/fix the problem

Tried LEDE 17.01.4 r3560-79f57e422d without success, but messages are only printed once after "usbmode -s" is called, also there isn't a cdc-wdm0 device created.

  • Any additional info you thinks is important

This HW config is working fine with cdc_mbim on Debian with a 4.9 Kernel and their usb-modeswitch implementation.

@openwrt-bot
Copy link
Author

sydney:

If i set "/sys/devices/pci0000:00/0000:00:13.0/usb1/1-1/1-1.3/bConfigura
tionValue" manually to 3 (mbim mode), the device gets recongized as /dev/cdc-wdmX by the cdc_mbim driver but e.g. "umbim -d /dev/cdc-wdm0 caps" times out.

@openwrt-bot
Copy link
Author

yurtesen:

I am having the same issue. Did you find a solution?

Tue Jun 11 13:42:09 2019 kern.info kernel: [ 928.372202] usb 1-1: new high-speed USB device number 10 using xhci-mtk Tue Jun 11 13:42:09 2019 daemon.notice netifd: Interface 'rndis' is enabled Tue Jun 11 13:42:09 2019 daemon.notice netifd: Network device 'usb0' link is up Tue Jun 11 13:42:09 2019 daemon.notice netifd: Interface 'rndis' has link connectivity Tue Jun 11 13:42:09 2019 daemon.notice netifd: Interface 'rndis' is setting up now Tue Jun 11 13:42:09 2019 kern.info kernel: [ 928.550371] cdc_ether 1-1:2.0 usb0: register 'cdc_ether' at usb-1e1c0000.xhci-1, CDC Ethernet Device, 02:1e:10:1f:00:00 Tue Jun 11 13:42:09 2019 kern.err kernel: [ 928.552726] cdc_ether 1-1:2.0 usb0: kevent 12 may have been dropped Tue Jun 11 13:42:09 2019 kern.err kernel: [ 928.561338] cdc_ether 1-1:2.0 usb0: kevent 11 may have been dropped Tue Jun 11 13:42:09 2019 kern.info kernel: [ 928.577887] option 1-1:2.2: GSM modem (1-port) converter detected Tue Jun 11 13:42:09 2019 kern.info kernel: [ 928.584959] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4 Tue Jun 11 13:42:09 2019 kern.info kernel: [ 928.594331] option 1-1:2.3: GSM modem (1-port) converter detected Tue Jun 11 13:42:09 2019 kern.info kernel: [ 928.601199] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB5 Tue Jun 11 13:42:09 2019 kern.info kernel: [ 928.610425] option 1-1:2.4: GSM modem (1-port) converter detected Tue Jun 11 13:42:09 2019 kern.info kernel: [ 928.617510] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB6 Tue Jun 11 13:42:09 2019 kern.info kernel: [ 928.625909] option 1-1:2.5: GSM modem (1-port) converter detected Tue Jun 11 13:42:09 2019 kern.info kernel: [ 928.633115] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB7 Tue Jun 11 13:42:09 2019 kern.info kernel: [ 928.642333] option 1-1:2.6: GSM modem (1-port) converter detected Tue Jun 11 13:42:09 2019 kern.info kernel: [ 928.649134] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB8 Tue Jun 11 13:42:09 2019 daemon.notice netifd: Network device 'usb0' link is down Tue Jun 11 13:42:09 2019 daemon.notice netifd: Interface 'rndis' has link connectivity loss Tue Jun 11 13:42:09 2019 kern.info kernel: [ 928.854407] cdc_ether 1-1:2.0 usb0: unregister 'cdc_ether' usb-1e1c0000.xhci-1, CDC Ethernet Device Tue Jun 11 13:42:09 2019 kern.warn kernel: [ 928.962733] usb 1-1: usbfs: process 12789 (usbmode) did not claim interface 1 before use Tue Jun 11 13:42:09 2019 daemon.notice netifd: Interface 'rndis' is disabled Tue Jun 11 13:42:09 2019 kern.warn kernel: [ 929.192592] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0 Tue Jun 11 13:42:10 2019 kern.warn kernel: [ 929.430522] usb 1-1: usbfs: process 12946 (usbmode) did not claim interface 1 before use Tue Jun 11 13:42:10 2019 kern.warn kernel: [ 929.642549] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0 Tue Jun 11 13:42:10 2019 kern.warn kernel: [ 929.824890] usb 1-1: usbfs: process 13011 (usbmode) did not claim interface 1 before use Tue Jun 11 13:42:10 2019 kern.warn kernel: [ 930.042611] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0 Tue Jun 11 13:42:11 2019 kern.warn kernel: [ 930.381315] usb 1-1: usbfs: process 13104 (usbmode) did not claim interface 1 before use Tue Jun 11 13:42:11 2019 kern.warn kernel: [ 930.592867] usb 1-1: usbfs: interface 1 claimed by usbfs while 'usbmode' sets config #0

Actually, editing /etc/usb-mode.json file seems to help. I changed it to show

"12d1:15c1": {
"*": {
"mode": "Huawei",
"msg": [ ]
}
},

After the change, device is recognized as wwan0 and everything is good

@openwrt-bot
Copy link
Author

yurtesen:

Sydney, have a look at this
https://bugs.openwrt.org/index.php?do=details&task_id=2319
You need to change the bConfigurationValue to 0 first, then to 3.
It will work if you first switch to 0

@openwrt-bot
Copy link
Author

sydney:

Hello Evren,

have a look at this
https://bugs.openwrt.org/index.php?do=details&task_id=2319

Thanks. I'm sorry for replying this late.

I am having the same issue. Did you find a solution?

No, not really.

IIRC, i "solved" it by having an rc.local script, something like echoing 0, sleeping for a few seconds, echo 3 the bConfigurationValue, like you already mentioned.

Also, my etc/config/network contained:


config interface 'wwan0'
option proto 'mbim'
option ifname 'wwan0'
option device '/dev/cdc-wdm0'
option pincode '1234'
option apn 'internet.proximus.be'
option mode 'preferlte'
option delay '5'
option auto '0'

config interface 'LTE'
option proto 'dhcp'
option ifname 'wwan0'
option auto '0'

But this appeared, obviously, not as an ideal solution..

@openwrt-bot
Copy link
Author

yurtesen:

Yes, so if they fix usbmode then things should be working for you. You should vote the bugreport I created... :)

I am right now using 18.06.2 the default bConfigurationValue which is 2. It loads cdc_ether and creates wwan0. I just setup dhclient on wwan0 and that seems to be enough.

I use the /etc/init.d/ncm-network script I have which use NDISDUP to tell the device to make connection. The script is in this guide:
https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_ncm

I am not exactly sure what mbim may have over what I am using right now. Perhaps it detects if connection goes offline? I also have a script which checks internet connectivity (which is the last script on that guide actually).

I think for now I will not do changes to my system as I need access to AT commands, although my solution is also not ideal. Just out of curiosity, you do not have /dev/ttyUSB0 etc. when you switch to bConfigurationValue 3 right? Because I see no serial parts when I switch to 3.

The problem for me is that I am sending an AT command

`AT^SYSCFGEX="00",3FFFFFFF,1,1,7FFFFFFFFFFFFFFF,,

to the modem to force it to use packet switched (PS) mode only. Because the SIM I use is a operator made clone of my normal SIM and when I receive a phone call, both SIMs receive it. If I allow circuit switched (CS) mode, then the router drops to 3G for ringing, freezing the connection for few seconds and in some cases do not go back to 4G.

About MBIM, I just didn't know how to configure it as there is literally no documentation about it and luci does not support it yet. But also I need to force modem to data only mode so I need the tty port so... tough luck for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant