Supported D-Link 4G USB dongle does not work

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


Joined: 05 Jul 2014
Posts: 56

PostPosted: Sat Feb 12, 2022 17:08    Post subject: Supported D-Link 4G USB dongle does not work Reply with quote
Good day everyone

I have a Linksys WRT610n v2 router running DD-WRT v3.0-r48141 mega (01/21/22) firmware
and a D-Link DWM-222 A2 dongle, which seems to be supported according to this table

From dmesg, I can see that initial detection and setup of the modem goes well, but no ttyUSB devices are created. As a result, a PPP interface is not created either. Also there is quite a lot of Unknown symbol errors from the related modules (cdc_acm, qmi_wwan, usb_wwan, sierra, etc.)

The modem works fine in Windows. Moreover, the router works flowlessly with exact same SIM card and exact same internet settings (APN, Dial String, etc.), but with an older 3G modem (Huawei E3531). However, I need to get this D-Link 4G modem to work. Is there anything I can try to make it work? Does it make sense to try an older firmware?

I would very much appreciate any advice.

Below are some debug outputs.

Code:

root@camgate:~# cat /sys/kernel/debug/usb/devices

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 4.04
S:  Manufacturer=Linux 4.4.299 ohci_hcd
S:  Product=OHCI PCI host controller
S:  SerialNumber=0000:00:04.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 2
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 4.04
S:  Manufacturer=Linux 4.4.299 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:00:04.1
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2001 ProdID=ac01 Rev= 2.28
S:  Manufacturer=Mobile Connect
S:  Product=Mobile Connect
S:  SerialNumber=a9d3d07f63c2
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us


Code:

root@camgate:~# lsmod

Module                  Size  Used by
qcserial                4960  0
option                 32640  0
sierra                  6272  0
usb_wwan                4256  2 qcserial,option
usbserial              16736  4 qcserial,option,sierra,usb_wwan
qmi_wwan               12096  0
usbnet                 16384  1 qmi_wwan
cdc_wdm                 7808  1 qmi_wwan
cdc_acm                14176  0
ohci_pci                1856  0
ohci_hcd               21088  1 ohci_pci
ehci_pci                2624  0
ehci_hcd               31232  1 ehci_pci
usbcore               120032 14 qcserial,option,sierra,usb_wwan,usbserial,qmi_wwan,usbnet,cdc_wdm,cdc_acm,ohci_pci,ohci_hcd,ehci_pci,ehci_hcd
usb_common              1472  1 usbcore
ip6_tables              9152  0
b5301x_srab             1824  0
b5301x_common           9824  1 b5301x_srab
bcm57xx               115232  0


Code:

root@camgate:~# cat /var/log/messages | grep ppp

Jan  1 01:00:24 camgate daemon.notice pppd[1546]: pppd 2.4.8 started by root, uid 0
Jan  1 01:00:24 camgate daemon.info pppd[1546]: Exit.
Jan  1 01:00:25 camgate user.info : [ppp_redial] : redial process successfully started
Jan  1 01:01:08 camgate daemon.notice pppd[1886]: pppd 2.4.8 started by root, uid 0
Jan  1 01:01:08 camgate daemon.info pppd[1886]: Exit.
Jan  1 01:01:52 camgate daemon.notice pppd[2100]: pppd 2.4.8 started by root, uid 0
Jan  1 01:01:52 camgate daemon.info pppd[2100]: Exit.
Jan  1 01:02:35 camgate daemon.notice pppd[2319]: pppd 2.4.8 started by root, uid 0
Jan  1 01:02:35 camgate daemon.info pppd[2319]: Exit.
Jan  1 01:03:19 camgate daemon.notice pppd[2531]: pppd 2.4.8 started by root, uid 0
Jan  1 01:03:19 camgate daemon.info pppd[2531]: Exit.


Code:

root@camgate:~# dmesg

bootloader size: 262144
nvram size: 65536
Physically mapped flash: Filesystem type: squashfs, size=0x54474e
partition size = 5581824
Creating 5 MTD partitions on "Physically mapped flash":
0x000000000000-0x000000040000 : "cfe"
0x000000040000-0x0000007e0000 : "linux"
0x00000020d400-0x000000760000 : "rootfs"
mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
mtd: partition "rootfs" set to be root filesystem
0x0000007e0000-0x0000007f0000 : "nvram"
0x000000760000-0x0000007e0000 : "ddwrt"
Creating 1 MTD partitions on "Physically mapped flash":
0x0000007f0000-0x000000800000 : "nvram_cfe"
ERROR: Unknown flash, device_id:0x00
bcmsflash: found no supported devices
brcmnand: found no supported devices
nflash: found no supported devices
create ctf proc
et_module_init: passivemode set to 0x0
et_module_init: txworkq set to 0x0
et_module_init: et_txq_thresh set to 0xce4
et_module_init: et_rxlazy_timeout set to 0x3e8
et_module_init: et_rxlazy_framecnt set to 0x20
et_module_init: et_rxlazy_dyn_thresh set to 0
robo attach
robo id 3115
attach ctf for eth%d
_ctf_attach:attach eth%d
bind ctf to eth if
eth0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 7.14.164.18 (r692288)
PPP generic driver version 2.4.2
PPP BSD Compression module registered
PPP Deflate Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
_ctf_attach:attach wl0
cmd 2 new_cmd 0
PCI: Enabling device 0000:01:01.0 (0000 -> 0002)
_ctf_attach:attach wl1
Broadcom Watchdog Timer: 0.07 initialized.
u32 classifier
    Performance counters on
    Actions configured
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (913 buckets, 3652 max)
nf_conntrack_rtsp v0.7 loading
xt_time: kernel timezone is -0000
gre: GRE over IPv4 demultiplexor driver
nf_nat_rtsp v0.7 loading
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 17
bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
Bridge firewalling registered
8021q: 802.1Q VLAN Support v1.8
startup nvram driver
found nvram
found cfe nvram
check if nvram copy is required CFE Size is 61440
nvram copy magic is 48534C46
max nvram space = 65536
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 228K
switch id 15
switch id32 53115
b5301x_common: found switch: BCM53115, rev 8
bcm_robo_config_vlan_fun vid=1, vlan->members=0x11e, vlan->untag=0x1e
bcm_robo_config_vlan_fun ports=1 2 3 4 8t
bcm_robo_config_vlan_fun vid=2, vlan->members=0x101, vlan->untag=0x101
bcm_robo_config_vlan_fun ports=0 8
bcm_robo_config_vlan_fun vid=1, vlan->members=0x11f, vlan->untag=0x1f
bcm_robo_config_vlan_fun ports=0 1 2 3 4 8t
device br0 entered promiscuous mode
device vlan1 entered promiscuous mode
device eth0 entered promiscuous mode
device eth2 entered promiscuous mode
device eth0 left promiscuous mode
device eth0 entered promiscuous mode
br0: port 2(eth2) entered forwarding state
br0: port 2(eth2) entered forwarding state
br0: port 1(vlan1) entered forwarding state
br0: port 1(vlan1) entered forwarding state
device br0 left promiscuous mode
device br0 entered promiscuous mode
device br0 left promiscuous mode
CTF: disabled
fast-classifier (PBR safe v2.1.6b): starting up
fast-classifier: registered
ip6_tables: (C) 2000-2006 Netfilter Core Team
cdc_acm: Unknown symbol usb_put_intf (err 0)
cdc_acm: Unknown symbol usb_alloc_urb (err 0)
cdc_acm: Unknown symbol usb_anchor_urb (err 0)
cdc_acm: Unknown symbol usb_free_urb (err 0)
cdc_acm: Unknown symbol usb_alloc_coherent (err 0)
cdc_acm: Unknown symbol usb_ifnum_to_if (err 0)
cdc_acm: Unknown symbol usb_register_driver (err 0)
cdc_acm: Unknown symbol usb_get_intf (err 0)
cdc_acm: Unknown symbol usb_driver_release_interface (err 0)
cdc_acm: Unknown symbol usb_clear_halt (err 0)
cdc_acm: Unknown symbol usb_submit_urb (err 0)
cdc_acm: Unknown symbol usb_free_coherent (err 0)
cdc_acm: Unknown symbol usb_driver_claim_interface (err 0)
cdc_acm: Unknown symbol usb_control_msg (err 0)
cdc_acm: Unknown symbol usb_deregister (err 0)
cdc_acm: Unknown symbol usb_kill_urb (err 0)
cdc_acm: Unknown symbol usb_get_from_anchor (err 0)
cdc_wdm: Unknown symbol usb_alloc_urb (err 0)
cdc_wdm: Unknown symbol usb_free_urb (err 0)
cdc_wdm: Unknown symbol usb_register_driver (err 0)
cdc_wdm: Unknown symbol usb_submit_urb (err 0)
cdc_wdm: Unknown symbol usb_register_dev (err 0)
cdc_wdm: Unknown symbol usb_deregister (err 0)
cdc_wdm: Unknown symbol usb_deregister_dev (err 0)
cdc_wdm: Unknown symbol usb_kill_urb (err 0)
usbnet: Unknown symbol usb_alloc_urb (err 0)
usbnet: Unknown symbol usb_free_urb (err 0)
usbnet: Unknown symbol usb_clear_halt (err 0)
usbnet: Unknown symbol usb_submit_urb (err 0)
usbnet: Unknown symbol usb_control_msg (err 0)
usbnet: Unknown symbol usb_set_interface (err 0)
usbnet: Unknown symbol usb_string (err 0)
usbnet: Unknown symbol usb_unlink_urb (err 0)
usbnet: Unknown symbol usb_get_urb (err 0)
usbnet: Unknown symbol usb_scuttle_anchored_urbs (err 0)
usbnet: Unknown symbol usb_kill_urb (err 0)
usbnet: Unknown symbol usb_get_from_anchor (err 0)
qmi_wwan: Unknown symbol usbnet_write_cmd (err 0)
qmi_wwan: Unknown symbol usb_ifnum_to_if (err 0)
qmi_wwan: Unknown symbol usb_register_driver (err 0)
qmi_wwan: Unknown symbol usbnet_change_mtu (err 0)
qmi_wwan: Unknown symbol usbnet_open (err 0)
qmi_wwan: Unknown symbol usb_driver_release_interface (err 0)
qmi_wwan: Unknown symbol usbnet_get_ethernet_addr (err 0)
qmi_wwan: Unknown symbol cdc_parse_cdc_header (err 0)
qmi_wwan: Unknown symbol usbnet_tx_timeout (err 0)
qmi_wwan: Unknown symbol usbnet_suspend (err 0)
qmi_wwan: Unknown symbol usbnet_start_xmit (err 0)
qmi_wwan: Unknown symbol usb_driver_claim_interface (err 0)
qmi_wwan: Unknown symbol usbnet_get_endpoints (err 0)
qmi_wwan: Unknown symbol usb_deregister (err 0)
qmi_wwan: Unknown symbol usb_cdc_wdm_register (err 0)
qmi_wwan: Unknown symbol usbnet_stop (err 0)
qmi_wwan: Unknown symbol usbnet_disconnect (err 0)
qmi_wwan: Unknown symbol usbnet_probe (err 0)
qmi_wwan: Unknown symbol usbnet_resume (err 0)
usbserial: Unknown symbol usb_put_intf (err 0)
usbserial: Unknown symbol usb_alloc_urb (err 0)
usbserial: Unknown symbol usb_free_urb (err 0)
usbserial: Unknown symbol usb_register_driver (err 0)
usbserial: Unknown symbol usb_match_one_id (err 0)
usbserial: Unknown symbol usb_disabled (err 0)
usbserial: Unknown symbol usb_show_dynids (err 0)
usbserial: Unknown symbol usb_get_intf (err 0)
usbserial: Unknown symbol usb_put_dev (err 0)
usbserial: Unknown symbol usb_get_dev (err 0)
usbserial: Unknown symbol usb_submit_urb (err 0)
usbserial: Unknown symbol usb_match_id (err 0)
usbserial: Unknown symbol usb_store_new_id (err 0)
usbserial: Unknown symbol usb_poison_urb (err 0)
usbserial: Unknown symbol usb_unpoison_urb (err 0)
usbserial: Unknown symbol usb_deregister (err 0)
usbserial: Unknown symbol usb_kill_urb (err 0)
usb_wwan: Unknown symbol usb_alloc_urb (err 0)
usb_wwan: Unknown symbol usb_anchor_urb (err 0)
usb_wwan: Unknown symbol usb_free_urb (err 0)
usb_wwan: Unknown symbol usb_serial_port_softint (err 0)
usb_wwan: Unknown symbol usb_submit_urb (err 0)
usb_wwan: Unknown symbol usb_control_msg (err 0)
usb_wwan: Unknown symbol usb_unlink_urb (err 0)
usb_wwan: Unknown symbol usb_kill_urb (err 0)
usb_wwan: Unknown symbol usb_get_from_anchor (err 0)
sierra: Unknown symbol usb_alloc_urb (err 0)
sierra: Unknown symbol usb_anchor_urb (err 0)
sierra: Unknown symbol usb_free_urb (err 0)
sierra: Unknown symbol usb_serial_port_softint (err 0)
sierra: Unknown symbol usb_clear_halt (err 0)
sierra: Unknown symbol usb_kill_anchored_urbs (err 0)
sierra: Unknown symbol usb_submit_urb (err 0)
sierra: Unknown symbol usb_control_msg (err 0)
sierra: Unknown symbol usb_set_interface (err 0)
sierra: Unknown symbol usb_serial_deregister_drivers (err 0)
sierra: Unknown symbol usb_unanchor_urb (err 0)
sierra: Unknown symbol usb_kill_urb (err 0)
sierra: Unknown symbol usb_get_from_anchor (err 0)
sierra: Unknown symbol usb_serial_register_drivers (err 0)
option: Unknown symbol usb_wwan_write (err 0)
option: Unknown symbol usb_wwan_close (err 0)
option: Unknown symbol usb_wwan_port_probe (err 0)
option: Unknown symbol usb_submit_urb (err 0)
option: Unknown symbol usb_wwan_tiocmget (err 0)
option: Unknown symbol usb_wwan_chars_in_buffer (err 0)
option: Unknown symbol usb_wwan_write_room (err 0)
option: Unknown symbol usb_wwan_port_remove (err 0)
option: Unknown symbol usb_serial_deregister_drivers (err 0)
option: Unknown symbol usb_wwan_dtr_rts (err 0)
option: Unknown symbol usb_wwan_open (err 0)
option: Unknown symbol usb_wwan_ioctl (err 0)
option: Unknown symbol usb_serial_register_drivers (err 0)
option: Unknown symbol usb_wwan_tiocmset (err 0)
qcserial: Unknown symbol usb_wwan_write (err 0)
qcserial: Unknown symbol usb_wwan_close (err 0)
qcserial: Unknown symbol usb_wwan_port_probe (err 0)
qcserial: Unknown symbol usb_wwan_chars_in_buffer (err 0)
qcserial: Unknown symbol usb_wwan_write_room (err 0)
qcserial: Unknown symbol usb_set_interface (err 0)
qcserial: Unknown symbol usb_wwan_port_remove (err 0)
qcserial: Unknown symbol usb_serial_deregister_drivers (err 0)
qcserial: Unknown symbol usb_wwan_dtr_rts (err 0)
qcserial: Unknown symbol usb_wwan_open (err 0)
qcserial: Unknown symbol usb_serial_register_drivers (err 0)
br0: port 2(eth2) entered forwarding state
br0: port 1(vlan1) entered forwarding state
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ehci-pci 0000:00:04.1: EHCI Host Controller
ehci-pci 0000:00:04.1: new USB bus registered, assigned bus number 1
ehci-pci 0000:00:04.1: irq 5, io mem 0x18004000
ehci-pci 0000:00:04.1: USB 0.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-pci: OHCI PCI platform driver
ohci-pci 0000:00:04.0: OHCI PCI host controller
ohci-pci 0000:00:04.0: new USB bus registered, assigned bus number 2
ohci-pci 0000:00:04.0: irq 5, io mem 0x18009000
usb 1-1: new high-speed USB device number 2 using ehci-pci
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
fast-classifier: shutting down
fast-classifier (PBR safe v2.1.6b): starting up
fast-classifier: registered
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver cdc_wdm
usbcore: registered new interface driver qmi_wwan
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver sierra
usbserial: USB Serial support registered for Sierra USB modem
usbcore: registered new interface driver option
usbserial: USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver qcserial
usbserial: USB Serial support registered for Qualcomm USB modem
random: nonblocking pool is initialized
Sponsor
depswa
DD-WRT User


Joined: 05 Jul 2014
Posts: 56

PostPosted: Sat Feb 12, 2022 17:52    Post subject: Reply with quote
It seems that USB mode switching fails for some reason. I tried executing manually usb_modeswitch -v 0x2001 -p 0xac01 -S -W and it ended with Segmentation fault:

Code:

root@camgate:~# usb_modeswitch -v 0x2001 -p 0xac01 -S -W
Take all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.4.0 (C) Josua Dietze 2016
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x2001
DefaultProduct= 0xac01
SierraMode=1

Look for default devices ...
  found USB ID 2001:ac01
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 1d6b:0001
 Found devices in default mode (1)
Access device 002 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0

USB description data (for identification)
-------------------------
Manufacturer: Mobile Connect
     Product: Mobile Connect
  Serial No.: a9d3d07f63c2
-------------------------
Send Sierra control message
 communication with device stopped. May have switched modes anyway
-> Run lsusb to note any changes. Bye!

Segmentation fault


Interestingly, I found someone had luck with exactly the same D-Link dongle:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1227360#1227360

Does my firmware version have a broken usb_modeswitch functionality?
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 13898
Location: Texas, USA

PostPosted: Sat Feb 12, 2022 20:41    Post subject: Reply with quote
Not necessarily a new issue, perhaps. Sending BrainSlayer an email about possibly fixing issue / upgrading usb_modeswitch.

https://svn.dd-wrt.com/ticket/6290
https://svn.dd-wrt.com/ticket/6448

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
depswa
DD-WRT User


Joined: 05 Jul 2014
Posts: 56

PostPosted: Sat Feb 12, 2022 21:24    Post subject: Reply with quote
Thank you, kernel-panic69. It seems though that usb_modeswitch works, even though it finishes with Segmentation fault. I tried instead a standard eject instead of Sierra mode and it finally worked: usb_modeswitch -K -v 2001 -p ac01

Now the USB storage is disconnected and I have the dongle in modem mode, which is preserved through router reboots:

Code:

root@camgate:~# cat /proc/bus/usb/devices

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 4.04
S:  Manufacturer=Linux 4.4.299 ohci_hcd
S:  Product=OHCI PCI host controller
S:  SerialNumber=0000:00:04.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 2
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 4.04
S:  Manufacturer=Linux 4.4.299 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:00:04.1
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=480  MxCh= 0
D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2001 ProdID=7e3d Rev= 2.28
S:  Manufacturer=Mobile Connect
S:  Product=Mobile Connect
S:  SerialNumber=0123456789ABCDEF
C:* #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 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= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 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= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=87(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=89(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E:  Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=125us


Also, ttyUSB devices are created:

Code:

root@camgate:~# dmesg | tail -20

qmi_wwan 1-1:1.4 wwan0: register 'qmi_wwan' at usb-0000:00:04.1-1, WWAN/QMI device, 36:27:7a:8b:21:87
usbcore: registered new interface driver qmi_wwan
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver sierra
usbserial: USB Serial support registered for Sierra USB modem
usbcore: registered new interface driver option
usbserial: USB Serial support registered for GSM modem (1-port)
option 1-1:1.0: GSM modem (1-port) converter detected
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1:1.1: GSM modem (1-port) converter detected
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
option 1-1:1.2: GSM modem (1-port) converter detected
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
option 1-1:1.3: GSM modem (1-port) converter detected
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
usbcore: registered new interface driver qcserial
usbserial: USB Serial support registered for Qualcomm USB modem
random: nonblocking pool is initialized


However, still no PPP interface. I noticed that there is no device name in file /tmp/ppp/options.pppoe, and even if I add it manually (e.g., /dev/ttyUSB0), it will be deleted automatically within a minute or so:

Code:

root@camgate:~# cat /tmp/ppp/options.pppoe

defaultroute
usepeerdns
noipdefault
noauth
ipcp-max-failure 30
crtscts
460800
connect "COMGTDIAL='ATD*99#' /usr/sbin/comgt -s -d  /etc/comgt/dial.comgt >/tmp/comgt.out 2>&1"


As a result there is an error in file /tmp/comgt.out:
Code:

root@camgate:~# cat /tmp/comgt.out
Can't open device /etc/comgt/dial.comgt.


I do not know the details of which process is writing to options.pppoe in the background, but seems that it does not see my modem.
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Sun Feb 13, 2022 8:35    Post subject: Reply with quote
The DWM-222 A2 is supported in an updated lib3g which will be included in future builds.

https://svn.dd-wrt.com/ticket/7534

_________________
Kernel panic: Aiee, killing interrupt handler!
depswa
DD-WRT User


Joined: 05 Jul 2014
Posts: 56

PostPosted: Sun Feb 13, 2022 11:01    Post subject: Reply with quote
LOM, thank you very much for your work on lib3g! I can see that the support is added in r48338. So looking forward to a new build.
depswa
DD-WRT User


Joined: 05 Jul 2014
Posts: 56

PostPosted: Tue Feb 15, 2022 18:11    Post subject: Reply with quote
After flashing a new build 48352, the modem worked right away and I have now ppp0 interface and internet functioning. LOM, thank you again for your efforts with lib3g.

On the negative side, I discovered that most of the uqmi commands do not work. I was hoping to be able to send SMS messages. Does anyone know if this is an expected behaviour?

The driver qmi_wwan is loaded:
Code:

root@camgate:~# lsmod
Module                  Size  Used by
qmi_wwan               12096  0
usbnet                 16384  1 qmi_wwan
cdc_acm                14176  0
cdc_wdm                 7808  1 qmi_wwan
nf_nat_pptp             1408  0
nf_conntrack_pptp       3232  1 nf_nat_pptp
nf_nat_proto_gre         864  1 nf_nat_pptp
nf_conntrack_proto_gre     2560  1 nf_conntrack_pptp
sierra                  6272  0
qcserial                4960  0
option                 32640  1
usb_wwan                4256  2 qcserial,option
usbserial              16736  6 sierra,qcserial,option,usb_wwan
ohci_pci                1856  0
ohci_hcd               21088  1 ohci_pci
ehci_pci                2624  0
ehci_hcd               31232  1 ehci_pci
usbcore               120064 14 qmi_wwan,usbnet,cdc_acm,cdc_wdm,sierra,qcserial,option,usb_wwan,usbserial,ohci_pci,ohci_hcd,ehci_pci,ehci_hcd
usb_common              1472  1 usbcore
ip6_tables              9152  0
b5301x_srab             1824  0
b5301x_common           9824  1 b5301x_srab
bcm57xx               115232  0


And some commands do work:
Code:

root@camgate:~# uqmi -d /dev/cdc-wdm0 --get-iccid
"89450100210415016752"


But most don't. The status is shown as "disconnected" even though I have a working connection.
Code:

root@camgate:~# uqmi -d /dev/cdc-wdm0 --get-data-status
"disconnected"
root@camgate:~# uqmi -d /dev/cdc-wdm0 --get-signal-info
Illegal instruction
root@camgate:~# uqmi -d /dev/cdc-wdm0 --stop-network 0xffffffff
"Invalid handle"
root@camgate:~# uqmi -d /dev/cdc-wdm0 --start-network internet --autoconnect
"No effect"


I also noticed that usb_modeswitch was updated from version 2.4 to 2.6.1. However, it still finishes with Segmentation fault, though the mode is switched correctly just like with the previous version - so it must be something specific to DD-WRT. dmesg has these messages during Segmenttion fault:

Code:

do_page_fault(): sending SIGSEGV to usb_modeswitch for invalid read access from 00000008
epc = 00407111 in usb_modeswitch[400000+e000]
ra  = 0040561b in usb_modeswitch[400000+e000]
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Thu Feb 17, 2022 2:28    Post subject: Reply with quote
depswa wrote:
After flashing a new build 48352, the modem worked right away and I have now ppp0 interface and internet functioning.


I think that is your problem, the modem is connecting using ppp serial dial-up instead of qmi.

Seems someone has heavily modified the protocol selection part in lib3g since I rewrote it many years ago. It is spaghetti code now Sad (it doesn't look like Sebastian's coding style..)


check that 3gdata is set to qmi:

nvram show | grep 3gdata

It looks like you can force qmi protocol by setting an nvram variable:

nvram set checkforce = 98
nvram commit

then replug the modem.

_________________
Kernel panic: Aiee, killing interrupt handler!
depswa
DD-WRT User


Joined: 05 Jul 2014
Posts: 56

PostPosted: Thu Feb 17, 2022 12:45    Post subject: Reply with quote
You are absolutely right, and I believe I found what causes the problem. Macros for HAVE_LIBQMI and HAVE_UQMI on line 1777 are simply undefined, and the code between lines 1777 and 1810 is never executed. What is executed instead is the code at 1811 and below. This is easy to see from here:
Code:

root@camgate:~# nvram show | grep 3g
size: 31476 bytes (34060 left)
3gcontrol=/dev/usb/tts/2
3gdata=/dev/usb/tts/1
3gnmvariant=2
wan_proto=3g

Variable 3gnmvariant gets set on line 1813, and in my case it is equal to 2: (2 | QMI) & 0x0f = (2 | 0x80) & 0x0f = 2. If I manually set 3gcontrol and 3gdata to qmi they get redefined back to /dev/usb/tts/* within a minute even if checkforce=98. I guess this is done by redial process who calls get3GControlDevice() from lib3g.

I could not find where HAVE_LIBQMI and HAVE_UQMI macros are defined, but that code probably needs to be checked.
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7445
Location: Dresden, Germany

PostPosted: Fri Feb 18, 2022 10:08    Post subject: Reply with quote
depswa wrote:
You are absolutely right, and I believe I found what causes the problem. Macros for HAVE_LIBQMI and HAVE_UQMI on line 1777 are simply undefined, and the code between lines 1777 and 1810 is never executed. What is executed instead is the code at 1811 and below. This is easy to see from here:
Code:

root@camgate:~# nvram show | grep 3g
size: 31476 bytes (34060 left)
3gcontrol=/dev/usb/tts/2
3gdata=/dev/usb/tts/1
3gnmvariant=2
wan_proto=3g

Variable 3gnmvariant gets set on line 1813, and in my case it is equal to 2: (2 | QMI) & 0x0f = (2 | 0x80) & 0x0f = 2. If I manually set 3gcontrol and 3gdata to qmi they get redefined back to /dev/usb/tts/* within a minute even if checkforce=98. I guess this is done by redial process who calls get3GControlDevice() from lib3g.

I could not find where HAVE_LIBQMI and HAVE_UQMI macros are defined, but that code probably needs to be checked.


these are not undefined in my builds. uqmi is included and the macro is set. but correct me if i'm wrong

_________________
"So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7445
Location: Dresden, Germany

PostPosted: Fri Feb 18, 2022 10:12    Post subject: Reply with quote
found a bad typo. you where right see 48394.
_________________
"So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7445
Location: Dresden, Germany

PostPosted: Fri Feb 18, 2022 10:29    Post subject: Reply with quote
please check the attached build


dd-wrt.v24-48394_NEWD-2_K3.x_mega_wrt610nv2.bin
 Description:

Download
 Filename:  dd-wrt.v24-48394_NEWD-2_K3.x_mega_wrt610nv2.bin
 Filesize:  7.13 MB
 Downloaded:  112 Time(s)


_________________
"So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
depswa
DD-WRT User


Joined: 05 Jul 2014
Posts: 56

PostPosted: Fri Feb 18, 2022 13:33    Post subject: Reply with quote
Thank you for the quick fix, BrainSlayer. I confirm that it works correctly now, and the connection is made through qmi protocol. I have wwan0 interface instead of ppp0. And also can send SMS messages.

Code:

root@camgate:~# ip route
default via 10.138.126.33 dev wwan0
10.138.126.0/26 dev wwan0 scope link  src 10.138.126.32
127.0.0.0/8 dev lo scope link
192.168.0.0/24 dev br0 scope link  src 192.168.0.1
root@camgate:~# nvram show | grep 3g
size: 31378 bytes (34158 left)
3gcontrol=qmi
3gdata=qmi
wan_proto=3g
root@camgate:~# uqmi -d /dev/cdc-wdm0 --get-data-status
"connected"
root@camgate:~# uqmi -d /dev/cdc-wdm0 --send-message "Testing SMS" --send-message-target xxxxxxxx
root@camgate:~#


Unfortunately, some of the uqmi functionality is still unavailable, but I guess this is specific to particular 4G modem. For me, the most important is the ability to send SMS and it works great.

Code:

root@camgate:~# uqmi -d /dev/cdc-wdm0 --get-current-settings
Illegal instruction
root@camgate:~# uqmi -d /dev/cdc-wdm0 --get-signal-info
Illegal instruction
root@camgate:~# uqmi -d /dev/cdc-wdm0 --get-serving-system
Illegal instruction
root@camgate:~# uqmi -d /dev/cdc-wdm0 --list-messages
Illegal instruction
root@camgate:~# uqmi -d /dev/cdc-wdm0 --get-message 0
"Failed to connect to service"
root@camgate:~# uqmi -d /dev/cdc-wdm0 --get-raw-message 0
"Failed to connect to service"
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7445
Location: Dresden, Germany

PostPosted: Sat Feb 19, 2022 12:29    Post subject: Reply with quote
qmi is a api. but it doesnt force a vendor to implement everything. there are also wifi devices with qmi api. they do not support gsm networks of course then
_________________
"So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
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