LTE USB dongle (MBIM protocol) doesn't work

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
nmzik
DD-WRT Novice


Joined: 13 Apr 2016
Posts: 5

PostPosted: Mon Aug 15, 2022 11:35    Post subject: LTE USB dongle (MBIM protocol) doesn't work Reply with quote
Hello everyone!

I am trying to get my modem (MBIM protocol) to work on DD-WRT.
I'm running DD-WRT v3.0-r49741 std on a Netgear R7000.

The modem is working flawlessly on Windows, Linux and OpenWRT (with additional packages).
DD-WRT settings:
Connection type was set to "Mobile Broadband". Core USB Support is enabled.
Just plugging the modem doesn't do anything. (no cdc_wdm0 in /dev)

dmesg log:
Code:
usb 4-1: new SuperSpeed USB device number 3 using xhci_hcd


I suspect it is caused by not loading cdc_mbim by default (line 1889, lib3g.c):
Code:
insmod("cdc-acm cdc-wdm usbnet qmi_wwan usbserial usb_wwan sierra option qcserial");

Devs, please add cdc_mbim module.

As soon as I load the module, cdc_wdm0 will appear.
Code:
modprobe cdc_mbim

Code:
[  770.711551] cdc_mbim 4-1:2.0: cdc-wdm0: USB WDM device
[  770.717301] cdc_mbim 4-1:2.0 wwan0: register 'cdc_mbim' at usb-0000:00:0c.0-1, CDC MBIM, 06:31:88:22:b8:e1
[  770.727170] usbcore: registered new interface driver cdc_mbim

I am currently stuck trying to get it further as I wasn't be able to find any mbim utility in DD-WRT to make a connection.
Code:
mbimcli: not found
umbim: not found
mbim-control: not found

Looking through source code, there is a file called "mbim-connect.sh". Is it even included in build/firmware?
Code:
if (pidof("mbim-connect.sh") < 0) {
   dd_loginfo("mbim", "STARTING mbim-status.sh\n");
   sysprintf("mbim-connect.sh");
}

Code:
root@DD-WRT:/# find . -name mbim
root@DD-WRT:/#


Forcing nvram variable "forcecheck" + replugging modem/rebooting router doesn't do anything.
Code:
nvram set forcecheck=97
nvram commit


Code:
nvram show | grep 3g
size: 38235 bytes (27301 left)
3gcontrol=/dev/usb/tts/0
3gdata=
wan_proto=3g


Looking through UI code, there is an option to force connection type:
Code:
<% ifndef("MULTISIM", "<!--"); %>
      <option value="97" <% nvsm("wan_dial", "97", "selected"); %> >Force MBIM</option>
      <option value="98" <% nvsm("wan_dial", "98", "selected"); %> >Force QMI</option>
      <option value="99" <% nvsm("wan_dial", "99", "selected"); %> >Force DirectIP</option>
<% ifndef("MULTISIM", "-->"); %>

Not sure how to enable it though.

Below are some debug outputs..
Code:
lsmod
Module                  Size  Used by
cdc_mbim                4108  0
cdc_ncm                13828  1 cdc_mbim
qcserial                5021  0
option                 33137  0
sierra                  6760  0
usb_wwan                4344  2 qcserial,option
usbserial              19246  4 qcserial,option,sierra,usb_wwan
qmi_wwan               12287  0
usbnet                 17017  3 cdc_mbim,cdc_ncm,qmi_wwan
cdc_wdm                 8536  2 cdc_mbim,qmi_wwan
cdc_acm                15103  0
xhci_plat_hcd           2194  0
xhci_pci                2676  0
xhci_hcd               87374  2 xhci_plat_hcd,xhci_pci
ohci_pci                2271  0
ohci_hcd               24371  1 ohci_pci
ehci_pci                2958  0
ehci_hcd               35377  1 ehci_pci
usbcore               135657 19 cdc_mbim,cdc_ncm,qcserial,option,sierra,usb_wwan,usbserial,qmi_wwan,usbnet,cdc_wdm,cdc_acm,xhci_plat_hcd,xhci_pci,xhci_hcd,ohci_pci,ohci_hcd,ehci_pci,ehci_hcd
usb_common              1598  1 usbcore
nf_nat_pptp             1554  0
nf_conntrack_pptp       3128  1 nf_nat_pptp
nf_nat_proto_gre         975  1 nf_nat_pptp
nf_conntrack_proto_gre     2871  1 nf_conntrack_pptp
ip6_tables              9629  0
tun                    16417  0
wl                   4590300  0
b5301x_srab             1778  0
b5301x_common          10655  1 b5301x_srab
et                     64856  0
ctf                    51182  0
softdog                 1711  1

Code:
cat /sys/kernel/debug/usb/devices
T:  Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=5000 MxCh= 0
D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  2
P:  Vendor=413c ProdID=81d7 Rev= 3.18
S:  Manufacturer=Dell Inc.
S:  Product=DW5821e Snapdragon X20 LTE
S:  SerialNumber=0123456789ABCDEF
C:  #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=896mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:  If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=4096ms
I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=
E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=83(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=
E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=85(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
C:* #Ifs= 4 Cfg#= 2 Atr=a0 MxPwr=896mA
A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E:  Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=84(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms


I'd very appreciate any advice you can give me.


Last edited by nmzik on Mon Aug 15, 2022 14:35; edited 4 times in total
Sponsor
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1889

PostPosted: Mon Aug 15, 2022 12:40    Post subject: Reply with quote
What is the output of
Code:
 nvram show | grep wan_dial

_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum