LTE Modem Doesn't Work

How do I use LTE as wan,
I can't seem to find a guide of setting up LTE as wan that works
I've also tried ModemManager and it also doesn't work
How do I set this up

The modem is detected when I do lsusb and cat /sys/kernel/debug/usb/devices

Bus 002 Device 001: ID 1d6b:0001 Linux 5.10.176 ohci_hcd Generic Platform OHCI controller
Bus 001 Device 002: ID 2cb7:0001 Fibocom,Incorporated Fibocom Mobile Boardband
Bus 001 Device 001: ID 1d6b:0002 Linux 5.10.176 ehci_hcd EHCI Host Controller
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2cb7 ProdID=0001 Rev= 1.00
S:  Manufacturer=Fibocom,Incorporated
S:  Product=Fibocom Mobile Boardband
S:  SerialNumber=1234567890ABCDEF
C:* #Ifs= 8 Cfg#= 1 Atr=e0 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00

This is ECM, cdc_ether. Will be good to see the complete output.

Here is the complete output

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

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
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= 5.10
S:  Manufacturer=Linux 5.10.176 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=101c0000.ehci
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#=  2 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2cb7 ProdID=0001 Rev= 1.00
S:  Manufacturer=Fibocom,Incorporated
S:  Product=Fibocom Mobile Boardband
S:  SerialNumber=1234567890ABCDEF
C:* #Ifs= 8 Cfg#= 1 Atr=e0 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=(none)
E:  Ad=87(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 7 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 1
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= 5.10
S:  Manufacturer=Linux 5.10.176 ohci_hcd
S:  Product=Generic Platform OHCI controller
S:  SerialNumber=101c1000.ohci
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

Install packages picocom kmod-usb-serial-option
Temporary add your IDs to the driver:
echo "2cb7 0001" > /sys/bus/usb-serial/drivers/option1/new_id
You will have a number of /dev/ttyUSBx added, see your system log.
Then test which one (or two) will respond to AT commands.
picocom /dev/ttyUSB1 as an example.
Once you found the port that responds to AT query your modem with

ati
at+gtusbmode?
at+gtusbmode=?

What should I do after I done those steps?

Show the result )

1 Like

Here is the result

root@OpenWrt:~# ls /dev
bus        mtd0ro     mtd4       mtdblock1  port       stdin      ttyS12     ttyS5      ttyUSB4    zero
console    mtd1       mtd4ro     mtdblock2  ppp        stdout     ttyS13     ttyS6      ttyUSB5
full       mtd1ro     mtd5       mtdblock3  ptmx       tty        ttyS14     ttyS7      ttyUSB6
hwrng      mtd2       mtd5ro     mtdblock4  pts        ttyS0      ttyS15     ttyS8      ttyUSB7
kmsg       mtd2ro     mtd6       mtdblock5  random     ttyS1      ttyS2      ttyS9      urandom
log        mtd3       mtd6ro     mtdblock6  shm        ttyS10     ttyS3      ttyUSB2    watchdog
mtd0       mtd3ro     mtdblock0  null       stderr     ttyS11     ttyS4      ttyUSB3    watchdog0
root@OpenWrt:~# picocom /dev/ttyUSB2
picocom v3.1

port is        : /dev/ttyUSB2
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        :
omap is        :
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready
ati
Apr 10 2020-13:07:26

OK
at+gtusbmode?
+GTUSBMODE: 10

OK
at+gtusbmode=?
+GTUSBMODE: (10,11)

OK

Terminating...
Skipping tty reset...
Thanks for using picocom
1 Like

Do you know the model name?
Please query your modem with atiX where X is a number from 0 to 9 and show the output.

I've opened the router and it says Fibocom L716-CN

and here's the output

Terminal ready
ati0
Apr 10 2020-13:07:26

OK
ati1
Apr 10 2020-13:07:26

OK
ati2
Apr 10 2020-13:07:26

OK
ati3
"L716"

OK
ati4
Apr 10 2020-13:07:26

OK
ati5
Apr 10 2020-13:07:26

OK
ati6
Apr 10 2020-13:07:26

OK
ati7
"L716 LTE Module"

OK
ati8
"17006.1000.00.41.51.12"

OK
ati9
"H001"

OK

Terminating...
Skipping tty reset...
Thanks for using picocom
1 Like

See https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_cdc
You need to install kmod-usb-net-cdc-ether (and nothing else) and add an interface with DHCP as shown there.
There is a possibility that some sort of "dial" AT command will be needed but I do not currently have any manuals for this model.

I've followed the guide, and it shows Network device is not present

here is the log from dmesg

[ 2267.389122] kmodloader: loading kernel modules from /etc/modules.d/*
[ 2267.424593] usbcore: registered new interface driver usbserial_generic
[ 2267.437688] usbserial: USB Serial support registered for generic
[ 2267.461294] usbcore: registered new interface driver option
[ 2267.472617] usbserial: USB Serial support registered for GSM modem (1-port)
[ 2267.492895] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 2267.621712] kmodloader: loading kernel modules from /etc/modules.d/*
[ 2267.652175] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 2267.781361] kmodloader: loading kernel modules from /etc/modules.d/*
[ 2267.812241] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 2269.700873] option 1-1:1.0: GSM modem (1-port) converter detected
[ 2269.713800] option 1-1:1.1: GSM modem (1-port) converter detected
[ 2269.726674] option 1-1:1.2: GSM modem (1-port) converter detected
[ 2269.739171] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[ 2269.753245] option 1-1:1.3: GSM modem (1-port) converter detected
[ 2269.765696] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
[ 2269.779770] option 1-1:1.4: GSM modem (1-port) converter detected
[ 2269.792226] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4
[ 2269.806291] option 1-1:1.5: GSM modem (1-port) converter detected
[ 2269.818749] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB5
[ 2269.833145] option 1-1:1.6: GSM modem (1-port) converter detected
[ 2269.845636] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB6
[ 2269.859723] option 1-1:1.7: GSM modem (1-port) converter detected
[ 2269.872178] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB7
[ 3524.584133] kmodloader: loading kernel modules from /etc/modules.d/*
[ 3524.628049] usbcore: registered new interface driver cdc_ether
[ 3524.644251] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 3524.774282] kmodloader: loading kernel modules from /etc/modules.d/*
[ 3524.806516] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 3524.935952] kmodloader: loading kernel modules from /etc/modules.d/*
[ 3524.968398] kmodloader: done loading kernel modules from /etc/modules.d/*

Check your system log, it should have something like this:
kern.info kernel: [...] cdc_ether 1-1:1.0 eth2: register ‘cdc_ether’ at usb-1b000000.usb-1, CDC Ethernet Device,
Then make sure you use this interface name (eth2 in my example) in wanb configuration.
Don't forget to add your new wanb interface to wan firewall zone.

Nope, nothing, the only thing that mention cdc is this line

root@OpenWrt:~# dmesg | grep cdc
[ 3524.628049] usbcore: registered new interface driver cdc_ether
root@OpenWrt:~#

Once again - system log, not dmesg output.
logread | grep cdc

Sorry, still nothing

root@OpenWrt:~# logread | grep cdc
Sun Sep 17 02:43:45 2023 kern.info kernel: [ 3524.628049] usbcore: registered new interface driver cdc_ether
root@OpenWrt:~#

Weird...
Run logread -f in the current ssh session
Open another ssh session, run picocom there as you did this earlier and send at+cfun=15, if it will fail - use at+cfun=1,1 instead.
Wait a bit and show the new output from the 1st session.

I ran this in my current ssh session

root@OpenWrt:~# logread -w
logread: unrecognized option: w
Usage: logread [options]
Options:
    -s <path>           Path to ubus socket
    -l  <count>         Got only the last 'count' messages
    -e  <pattern>       Filter messages with a regexp
    -r  <server> <port> Stream message to a server
    -F  <file>          Log file
    -S  <bytes>         Log size
    -p  <file>          PID file
    -h  <hostname>      Add hostname to the message
    -P  <prefix>        Prefix custom text to streamed messages
    -z  <facility>      handle only messages with given facility (0-23), repeatable
    -Z  <facility>      ignore messages with given facility (0-23), repeatable
    -f                  Follow log messages
    -u                  Use UDP as the protocol
    -t                  Add an extra timestamp
    -0                  Use \0 instead of \n as trailer when using TCP

root@OpenWrt:~#

and this in new session, both says failed

root@OpenWrt:~# picocom /dev/ttyUSB2
picocom v3.1

port is        : /dev/ttyUSB2
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        :
omap is        :
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready
at+cfun=15
OK

FATAL: read zero bytes from port
term_exitfunc: reset failed for dev UNKNOWN: Not a tty
root@OpenWrt:~# picocom /dev/ttyUSB2
picocom v3.1

port is        : /dev/ttyUSB2
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        :
omap is        :
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no


FATAL: cannot open /dev/ttyUSB2: No such file or directory
root@OpenWrt:~# picocom /dev/ttyUSB2
picocom v3.1

port is        : /dev/ttyUSB2
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        :
omap is        :
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready
at+cfun=1,1
OK

FATAL: read zero bytes from port
term_exitfunc: reset failed for dev UNKNOWN: Not a tty
root@OpenWrt:~#

My mistake... logread -f please.
Once your modem is back, send once AT+CGDCONT=1,"IP","your APN here",""
then the "dial" command AT+GTRNDIS=1,1
and logread should provide something useful after that.

What IP should I input?

"IP" is literally "IP"