Need help to configure 4G with WE826 router

Hello,

I have bought a 4G WE826-T2 model from Aliexpress. I used it some time with the software provided by ZBT with a SIM card but I was not very satisfied of the quality of the software. My SIM card has no PIN.

I have installed OpenWrt on WE826-T2 modem.
I managed to connect the router to my Wifi. I can connect my PC to the router thru LAN cable and use Internet.
Now I want to connect the router to the 4G network.
I have installed the modemmanager package.
I have followed instruction: https://openwrt.org/docs/guide-user/network/wan/access.modem.through.nat
The model interface displays: Network device is not present

What should I do to configure 4G with WE826 ?

cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdbb:b719:bf9b::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0.1'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'eth0.2'
        option macaddr 'f8:5e:3c:44:9d:73'

config interface 'wan'
        option device 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option device 'eth0.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 6t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 6t'

config interface 'Camgo_Wattignies'
        option proto 'dhcp'

config interface 'modem'
        option proto 'static'
        option device '@wan'
        option ipaddr '192.168.100.2'
        option netmask '255.255.255.0'

----------------------------------------
cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/10180000.wmac'
        option channel '1'
        option band '2g'
        option htmode 'HT20'
        option cell_density '0'

config wifi-iface 'wifinet1'
        option device 'radio0'
        option mode 'sta'
        option network 'Camgo_Wattignies'
        option ssid 'SFR_F5BF'
        option encryption 'psk2'
        option key 'sikjqw97x3sq78zu65qk'

---------------------------
cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        option filter_aaaa '0'
        option filter_a '0'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'


-------------------------------------
cat /etc/config/firewall

config defaults
        option syn_flood '1'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'

config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'Camgo_Wattignies'
        list network 'modem'
        list network 'wan'
        list network 'wan6'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

Show the output of cat /sys/kernel/debug/usb/devices

1 Like
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=  1, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 5.15
S:  Manufacturer=Linux 5.15.134 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= 4
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=214b ProdID=7250 Rev= 1.00
S:  Product=USB2.0 HUB
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1508 ProdID=1001 Rev= 3.18
S:  Manufacturer=Fibocom NL668 Modem
S:  Product=Fibocom NL668 Modem
S:  SerialNumber=8c698153
C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
A:  FirstIf#= 4 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff 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#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
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=(none)
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=(none)
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= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=(none)
E:  Ad=89(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
I:* If#= 5 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
I:  If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=88(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=42 Prot=01 Driver=(none)
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=8a(I) 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.15
S:  Manufacturer=Linux 5.15.134 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

I suggest to remove ModemManager and follow https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_cdc

Thank you for your help. I have done it but it is not working: I cannot connect to Internel on mobile interface:

dmesg
[    0.000000] Linux version 5.15.134 (builder@buildhost) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r23497-6637af95aa) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 Mon Oct 9 21:45:35 2023
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is Zbtlink ZBT-WE826 (16M)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Writing ErrCtl register=000655ca
[    0.000000] Readback ErrCtl register=000655ca
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 120984K/131072K available (5927K kernel code, 611K rwdata, 740K rodata, 1224K init, 225K bss, 10088K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000002] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007700] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.073636] pid_max: default: 32768 minimum: 301
[    0.079276] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.086336] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.103972] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.113510] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.120370] pinctrl core: initialized pinctrl subsystem
[    0.127197] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.133715] thermal_sys: Registered thermal governor 'step_wise'
[    0.551544] mt7620-pci 10140000.pcie: PCIE0 no card, disable it(RST&CLK)
[    0.563856] mt7620-pci: probe of 10140000.pcie failed with error -1
[    0.577263] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.582761] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.589275] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.594739] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.601144] rt2880_gpio 10000688.gpio: registering 1 gpios
[    0.606515] rt2880_gpio 10000688.gpio: registering 1 irq handlers
[    0.615274] clocksource: Switched to clocksource systick
[    0.622311] NET: Registered PF_INET protocol family
[    0.627392] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.635664] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.643785] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.651343] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.658761] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.665604] TCP: Hash tables configured (established 1024 bind 1024)
[    0.671961] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.678337] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.685612] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.691111] PCI: CLS 0 bytes, default 32
[    0.695190] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    0.706354] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.720075] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.725769] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.737084] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.747820] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.757752] printk: console [ttyS0] disabled
[    0.761953] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    0.771644] printk: console [ttyS0] enabled
[    0.780102] printk: bootconsole [early0] disabled
[    0.812127] spi spi0.0: force spi mode3
[    0.817411] spi-nor spi0.0: w25q128 (16384 Kbytes)
[    0.822402] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.829016] OF: Bad cell count for /palmbus@10000000/spi@b00/flash@0/partitions
[    0.836544] OF: Bad cell count for /palmbus@10000000/spi@b00/flash@0/partitions
[    0.844478] OF: Bad cell count for /palmbus@10000000/spi@b00/flash@0/partitions
[    0.852047] OF: Bad cell count for /palmbus@10000000/spi@b00/flash@0/partitions
[    0.859784] Creating 4 MTD partitions on "spi0.0":
[    0.864697] 0x000000000000-0x000000030000 : "u-boot"
[    0.873580] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.880460] 0x000000040000-0x000000050000 : "factory"
[    0.889188] 0x000000050000-0x000001000000 : "firmware"
[    0.896143] 2 uimage-fw partitions found on MTD device firmware
[    0.902225] Creating 2 MTD partitions on "firmware":
[    0.907383] 0x000000000000-0x00000023015d : "kernel"
[    0.912458] mtd: partition "kernel" doesn't end on an erase/write block -- force read-only
[    0.924303] 0x00000023015d-0x000000fb0000 : "rootfs"
[    0.929479] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
[    0.940148] mtd: setting mtd5 (rootfs) as root device
[    0.946578] 1 squashfs-split partitions found on MTD device rootfs
[    0.952941] 0x0000005d0000-0x000000fb0000 : "rootfs_data"
[    0.990598] gsw: setting port4 to ephy mode
[    0.995172] mtk_soc_eth 10100000.ethernet: mdio-bus disabled
[    1.001254] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    1.008227] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    1.017570] rt2880_wdt 10000120.watchdog: Initialized
[    1.024731] NET: Registered PF_INET6 protocol family
[    1.038201] Segment Routing with IPv6
[    1.042066] In-situ OAM (IOAM) with IPv6
[    1.046362] NET: Registered PF_PACKET protocol family
[    1.051621] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.065307] 8021q: 802.1Q VLAN Support v1.8
[    1.094930] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.108921] Freeing unused kernel image (initmem) memory: 1224K
[    1.114980] This architecture does not have kernel memory protection.
[    1.121597] Run /sbin/init as init process
[    1.125798]   with arguments:
[    1.125805]     /sbin/init
[    1.125813]   with environment:
[    1.125819]     HOME=/
[    1.125825]     TERM=linux
[    2.698037] init: Console is alive
[    2.702227] init: - watchdog -
[    5.347284] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    5.490497] usbcore: registered new interface driver usbfs
[    5.496367] usbcore: registered new interface driver hub
[    5.501889] usbcore: registered new device driver usb
[    5.517697] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.526627] fsl-ehci: Freescale EHCI Host controller driver
[    5.535349] ehci-platform: EHCI generic platform driver
[    5.551310] phy phy-usbphy.0: remote usb device wakeup disabled
[    5.557397] phy phy-usbphy.0: UTMI 16bit 30MHz
[    5.561937] ehci-platform 101c0000.ehci: EHCI Host Controller
[    5.567850] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[    5.576104] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[    5.590656] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[    5.598312] hub 1-0:1.0: USB hub found
[    5.603240] hub 1-0:1.0: 1 port detected
[    5.616031] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    5.624292] ohci-platform: OHCI generic platform driver
[    5.630179] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[    5.637251] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[    5.645582] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[    5.681015] hub 2-0:1.0: USB hub found
[    5.685869] hub 2-0:1.0: 1 port detected
[    5.726846] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    5.738846] init: - preinit -
[    5.886561] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    6.817778] hub 1-1:1.0: USB hub found
[    6.845784] hub 1-1:1.0: 4 ports detected
[    7.144578] random: procd: uninitialized urandom read (4 bytes read)
[    8.386504] random: jshn: uninitialized urandom read (4 bytes read)
[    8.514246] random: jshn: uninitialized urandom read (4 bytes read)
[    8.811101] random: jshn: uninitialized urandom read (4 bytes read)
[    9.742816] 8021q: adding VLAN 0 to HW filter on device eth0
[    9.978647] usb 1-1.3: new high-speed USB device number 3 using ehci-platform
[   11.207293] jffs2: notice: (360) jffs2_build_xattr_subsystem: complete building xattr subsystem, 25 of xdatum (20 unchecked, 3 orphan) and 32 of xref (3 dead, 0 orphan) found.
[   11.229114] mount_root: switching to jffs2 overlay
[   11.244400] overlayfs: upper fs does not support tmpfile.
[   11.266337] urandom-seed: Seeding with /etc/urandom.seed
[   11.477755] procd: - early -
[   11.481156] procd: - watchdog -
[   12.088477] mtk_soc_eth 10100000.ethernet eth0: port 0 link up (100Mbps/Full duplex)
[   12.548409] procd: - watchdog -
[   12.552163] procd: - ubus -
[   13.067202] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.096892] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.113141] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.135957] procd: - init -
[   15.672287] random: jshn: uninitialized urandom read (4 bytes read)
[   15.985989] random: ubusd: uninitialized urandom read (4 bytes read)
[   15.994955] random: ubus: uninitialized urandom read (4 bytes read)
[   17.240081] kmodloader: loading kernel modules from /etc/modules.d/*
[   18.247910] Loading modules backported from Linux version v6.1.24-0-g0102425ac76b
[   18.255653] Backport generated by backports.git v5.15.92-1-44-gd6ea70fafd36
[   22.546434] PPP generic driver version 2.4.2
[   22.584244] NET: Registered PF_PPPOX protocol family
[   22.754340] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[   22.761757] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[   22.769739] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected
[   22.778775] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   22.909291] kmodloader: done loading kernel modules from /etc/modules.d/*
[   51.123069] random: crng init done
[   51.126578] random: 89 urandom warning(s) missed due to ratelimiting
[  109.566145] 8021q: adding VLAN 0 to HW filter on device eth0
[  109.601580] br-lan: port 1(eth0.1) entered blocking state
[  109.607227] br-lan: port 1(eth0.1) entered disabled state
[  109.613213] device eth0.1 entered promiscuous mode
[  109.618130] device eth0 entered promiscuous mode
[  109.728997] br-lan: port 1(eth0.1) entered blocking state
[  109.734621] br-lan: port 1(eth0.1) entered forwarding state
[  110.573572] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  139.016613] phy0-sta0: authenticate with b4:9d:fd:55:f5:c1
[  139.050173] phy0-sta0: send auth to b4:9d:fd:55:f5:c1 (try 1/3)
[  139.060589] phy0-sta0: authenticated
[  139.093298] phy0-sta0: associate with b4:9d:fd:55:f5:c1 (try 1/3)
[  139.123069] phy0-sta0: RX AssocResp from b4:9d:fd:55:f5:c1 (capab=0xc31 status=0 aid=2)
[  139.131818] phy0-sta0: associated
[  140.127391] IPv6: ADDRCONF(NETDEV_CHANGE): phy0-sta0: link becomes ready
[  182.535398] urngd: v1.0.2 started.
[  622.558693] kmodloader: loading kernel modules from /etc/modules.d/*
[  622.607030] cdc_ether 1-1.3:1.4 usb0: register 'cdc_ether' at usb-101c0000.ehci-1.3, CDC Ethernet Device, f6:83:87:46:a8:a2
[  622.618799] usbcore: registered new interface driver cdc_ether
[  622.653112] kmodloader: done loading kernel modules from /etc/modules.d/*
[  622.930507] kmodloader: loading kernel modules from /etc/modules.d/*
[  622.958878] kmodloader: done loading kernel modules from /etc/modules.d/*
[  623.090202] kmodloader: loading kernel modules from /etc/modules.d/*
[  623.115780] kmodloader: done loading kernel modules from /etc/modules.d/*
[  649.188092] mtk_soc_eth 10100000.ethernet eth0: port 0 link down
[  649.195124] br-lan: port 1(eth0.1) entered disabled state
[  654.381103] mtk_soc_eth 10100000.ethernet eth0: port 0 link up (100Mbps/Full duplex)
[  654.389560] br-lan: port 1(eth0.1) entered blocking state
[  654.395146] br-lan: port 1(eth0.1) entered forwarding state
[ 1239.821732] mtk_soc_eth 10100000.ethernet eth0: port 0 link down
[ 1239.828772] br-lan: port 1(eth0.1) entered disabled state
[ 1242.288367] mtk_soc_eth 10100000.ethernet eth0: port 0 link up (100Mbps/Full duplex)
[ 1242.296801] br-lan: port 1(eth0.1) entered blocking state
[ 1242.302389] br-lan: port 1(eth0.1) entered forwarding state

--------------------------------------------
cat /sys/kernel/debug/usb/devices
T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1508 ProdID=1001 Rev= 3.18
S:  Manufacturer=Fibocom NL668 Modem
S:  Product=Fibocom NL668 Modem
S:  SerialNumber=8c698153
C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
A:  FirstIf#= 4 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff 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#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
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=(none)
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=(none)
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= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
E:  Ad=89(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
I:  If#= 5 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
I:* If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
E:  Ad=88(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=42 Prot=01 Driver=(none)
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

-----------------------
cat /etc/config/network
config interface 'Mobile_network'
        option proto 'dhcp'
        option device 'usb0'

It looks like you missed this part that is relevant to your modem:

it is also sometimes necessary to send a special β€œdial” command to the AT command port. It is recommended to install additional packages picocom kmod-usb-serial-option and consult AT Commands Guide for the given modem.

The problem with this modem that it does not support operating modes other than ECM and it cannot auto-dial on its own and requires the abovementioned "dial" command on every [re-]connection attempt.

I don't know if ModemManager has support for this modem, but you can give it a try. Keep the drivers (kmod-usb-net-cdc-ether kmod-usb-serial-option), delete DHCP interface you created, install MM and see if it can do the job.

I tried ModemManager as a second option but it seems it does not support this modem:

mmcli --scan-modems
error: couldn't request to scan devices: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Unsupported: Cannot request manual scan of devices: unsupported'

So back to the first option:
I have installed kmod-usb-serial-option and picocom.
I downloaded the manual for Fibocom NL668 modem
I cannot find any mention of ECM mode.
I managed to run AT command. I tested some of them: I am now sure the SIM card is connected but I don't know how to move further:

//SIM is detected by the module
AT+CPIN?
+CPIN: READY
OK

//module is registered to the network
AT+CEREG?  
+CEREG: 0,1
OK

//APN is right and have an IP
AT+CGCONTRDP
+CGCONTRDP: 1,5,mmsbouygtel.com,"10.91.103.212",,"62.201.129.201","62.201.129.202"
OK

Send AT+GTRNDIS=1,1

You're great, it is working, thank you very much.

No idea where you find this command and what it does, there is nothing about it in the documentation.

FIBOCOM NL668 AT Commands User Manual_V3.5.13.pdf
Feel free to provide email via PM, so I can mail it to you.

That is your "dial" command.

After the router is turn off, I need to run again the same command.
I tried to put it in the startup file (/etc/rc.local) but it is not working.

echo AT+GTRNDIS=1,1 | picocom /dev/ttyUSB2

Some suggestion on how to do it ?

I would try slightly different approach.
Delete the interface you created and install luci-proto-ncm and configure the interface as follows:

config interface 'wwan'
        option proto 'ncm'
        option device '/dev/ttyUSB2'
        option apn 'internet'

Add it to the wan firewall zone through the GUI. More details: https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_ncm#network_configuration

It will not work for you until you replace /etc/gcom/ncm.json with the customized version: https://pastebin.com/0EXMNDAa
I've intentionally kept it very simple, you can customize it further if you wish.

Hi.
I messed with my ec25 settings, and got a fix:
I use socat. Some thing like this, at system/startup,Local Startup-
Just change the command, and your usb correct port.

echo -e AT+CFUN=1 | socat - /dev/ttyUSB2,crnl
exit

Finally I get it working with this line

echo AT+GTRNDIS=1,1 | picocom -qrix 1000 /dev/ttyUSB2

in the /etc/rc.local file.
-q=quiet
-r=no reset
-i=no init
-x 1000=exit after 1sec idle

@AndrewZ may I request again the file you put in pastebin. I have seen it but I did not expect it will disappear so fast and forgot to save it. I am interested in trying your solution.

Link updated.

I have updated the ncm.json with the one from Pastebin [which has expired again]. What I don't understand is, how does NCM know to use the 'fibocom' entry in that file?

ncm.sh will obtain the manufacturer name from the modem then it will look into ncm.json for specific commands.

I am about ready to give up on this combination, it's maddeningly inconsistent. If I do it manually with picocom, the longest it has worked for was about 10 minutes. At that point, any attempt to disconnect or reconnect results in "ERROR".

If I set it to come up on boot, it looks a lot like it is working, with an assigned IP address and default gateway that has an ARP entry, but no internet connectivity.

If I use LUCI to restart the interface, I can see with picocom that this is printed in a loop, forever:

OK
AT+CGMI
Fibocom

OK
AT+CGMI
Fibocom

OK
AT+CGMI
Fibocom

along with

Thu May 16 11:43:49 2024 daemon.notice netifd: wwan0 (9423): Failed to get modem information
Thu May 16 11:43:49 2024 daemon.notice netifd: wwan0 (9592): Stopping network wwan0
Thu May 16 11:43:50 2024 daemon.notice netifd: wwan0 (9592): Failed to get modem information

You should not have picocom running while the connection script is talking to the modem, i.e. when you restart the interface from Luci, etc.

Do you have exactly the same modem as mentioned at the beginning of the thread - "Vendor=1508 ProdID=1001" ?