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
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
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
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
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.
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.
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.
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.