GL-MT300Nv2 with Huawei E3276s-150 non-hilink

Hi,
I try to run GL-MT300Nv2 with Huawei E3276s-150 and noticed a problem.
Modem is non-hilink one.

After connection to USB port, there are new ports created:

  • /dev/ttyUSB0
  • /dev/cdc-wdm0

and ifconfig -a returns additional interface:

  • wwan0

dmesg returns:

    [] usb 1-1: new high-speed USB device number 2 using ehci-platform`
    [] usb-storage 1-1:1.0: USB Mass Storage device detected`
    [] scsi host0: usb-storage 1-1:1.0
    [] usb-storage 1-1:1.1: USB Mass Storage device detected
    [] scsi host1: usb-storage 1-1:1.1
    [] usb 1-1: USB disconnect, device number 2
    [] usb 1-1: new high-speed USB device number 3 using ehci-platform
    [] option 1-1:1.0: GSM modem (1-port) converter detected
    [] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
    [] huawei_cdc_ncm 1-1:1.1: MAC-Address: xx:xx:xx:xx:xx:xx
    [] huawei_cdc_ncm 1-1:1.1: setting rx_max = 16384
    [] huawei_cdc_ncm 1-1:1.1: setting tx_max = 16384
    [] huawei_cdc_ncm 1-1:1.1: NDP will be placed at end of frame for this device.
    [] huawei_cdc_ncm 1-1:1.1: cdc-wdm0: USB WDM device
    [] huawei_cdc_ncm 1-1:1.1 wwan0: register 'huawei_cdc_ncm' at usb-101c0000.ehci-1, Huawei CDC NCM device, xx:xx:xx:xx:xx:xx
    [] usb-storage 1-1:1.2: USB Mass Storage device detected
    [] scsi host2: usb-storage 1-1:1.2
    [] usb-storage 1-1:1.3: USB Mass Storage device detected
    [] scsi host3: usb-storage 1-1:1.3
    [] scsi 2:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
    [] scsi 3:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
    [] sd 3:0:0:0: [sda] Attached SCSI removable disk                              

Modem autmatically registers sim card in the provider network, command:
AT+CPIN?
returns:
+CPIN: READY

The very last and most important thing is, I cannot start a connection.

I tryied connect via web interface using 3/4G tab using Modem Device:
/dev/ttyUSB0 and /dev/cdc-wdm0(qmi), Service Type UMTS/GPRS.

I also started try the manual uci set commands:

    uci set network.modem=interface
    uci set network.modem.device='/dev/ttyUSB0' #'/dev/cdc-wdm0'
    uci set network.modem.proto='wwan', #'3g' , 'ncm'

but have no idea what is the correct direction

What configuration use to set-up a connection with this modem?

A one comment is that router is working flawlessly with E3272s-153 in ‘3g’ mode

can you try to use ncm for protocol and use /dev/cdc-wdm0 for device?

 uci set network.modem.device='/dev/cdc-wdm0'
 uci set network.modem.proto='ncm'

Hi,
I tested your proposal and configured:

 uci set network.modem.device='/dev/cdc-wdm0'
 uci set network.modem.proto='ncm'

Modem is still not connecting.

logread returns repetable block of information:

 daemon.notice netifd: Interface 'modem' is setting up now
 daemon.notice netifd: modem (3753): Starting network modem
 daemon.notice netifd: modem (3753): sending -> 
 daemon.notice netifd: modem (3753): Timeout running AT-command
 daemon.notice netifd: modem (3753): Failed to connect
 daemon.notice netifd: modem (3941): Stopping network modem
 daemon.notice netifd: modem (3941): sending -> 
 daemon.notice netifd: Interface 'modem' is now down

dmesg returns:

[] huawei_cdc_ncm 1-1:1.1: unknown notification 3 received: index 1 len 4
[] huawei_cdc_ncm 1-1:1.1: unknown notification 3 received: index 1 len 4
[] huawei_cdc_ncm 1-1:1.1: unknown notification 3 received: index 1 len 4
[] huawei_cdc_ncm 1-1:1.1: unknown notification 3 received: index 1 len 4
[] Rcv Wcid(1) AddBAReq
[] Start Seq = 000000bc
[] Rcv Wcid(1) AddBAReq
[] Start Seq = 00000290

Below I put some more identification data read back from the modem:

“ATI”

Manufacturer: huawei
Model: E3276
Revision: 21.260.05.00.618
IMEI: xxxxxxxxxxxxxxx
+GCAP: +CGSM,+DS,+ES 

“AT^VERSION?”

^VERSION:BDT:Mar 07 2013, 09:43:01
^VERSION:EXTS:21.260.05.00.618
^VERSION:INTS:
^VERSION:EXTD:UTPS23.009.11.02.618_MAC23.009.11.03.618
^VERSION:INTD:
^VERSION:EXTH:CH1E3276SM Ver.C
^VERSION:INTH:
^VERSION:EXTU:E3276
^VERSION:INTU:
^VERSION:CFG:1004
^VERSION:PRL:

“AT^SYSCFGEX?”

^SYSCFGEX:"00",3FFFFFFF,1,2,800C5

“AT^SYSCFGEX=?”

^SYSCFGEX: ("00","01","02","03"),((2000000400380,"GSM900/GSM1800/WCDMA900/WCDMA2100"),(2a80000,"GSM850/GSM1900/AWS/WCDMA1900"),(3fffffff,"All bands")),(0-2),(0-4),((800c5,"LTE_B1/LTE_B3/LTE_B7/LTE_B8/LTE_B20"),(7fffffffffffffff,"All bands"))

“AT^NDISDUP?”

OK

“AT^NDISDUP=?”

^NDISDUP: (1-20),(0-1)

“AT^SETPORT?”

^SETPORT:A1,A2;12,16,A1,A2

“AT^SETPORT=?”

^SETPORT:1: 3G MODEM
^SETPORT:2: 3G PCUI
^SETPORT:3: 3G DIAG
^SETPORT:5: 3G GPS
^SETPORT:A: BLUE TOOTH
^SETPORT:16: NCM
^SETPORT:A1: CDROM
^SETPORT:A2: SD
^SETPORT:10: 4G MODEM
^SETPORT:12: 4G PCUI
^SETPORT:13: 4G DIAG
^SETPORT:14: 4G GPS

“AT+CPIN?”

+CPIN: READY

You may need all the following command.
Be sure to uci commit your changes.

        option proto 'ncm'
        option ifname 'wwan0'
        option device '/dev/cdc-wdm0'

Please use the following command to show the full config

cat /etc/config/network

Hi,
I put your config proposal, next, uci commit, next reboot.
After reboot, there was no automatically connection to Internet, so after a few minutes, manually set command ifup modem.
No effect.

Please find below resault for cat /etc/config/network:

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

config globals 'globals'
	option ula_prefix 'fd0d:xxxx:xxxx::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option hostname 'GL-MT300N-V2-xxx'
	option ipaddr '192.168.8.1'

config device 'lan_dev'
	option name 'eth0.1'
	option macaddr 'e4:95:6e:xx:xx:xx'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'dhcp'
	option hostname 'GL-MT300N-V2-xxx'

config device 'wan_dev'
	option name 'eth0.2'
	option macaddr 'e4:95:6e:xx:xx:xx'

config interface 'wan6'
	option ifname '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 '1 6t'

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

config interface 'modem'
	option proto 'ncm'
	option device '/dev/cdc-wdm0'
	option dialnum '*99#'
	option apn 'darmowy'
	option ifname 'wwan0'

All tips are very welcome :slight_smile:

Hi,
modem is alive! That is good news.

With mentioned configuration of modem:

config interface 'modem'
	option proto 'ncm'
	option device '/dev/cdc-wdm0'
	option dialnum '*99#'
	option apn 'darmowy'
	option ifname 'wwan0'

router connects to the Internet, only while modem is connected to the routers USB port from the beginning of booting of the router.
It connects to the Internet automatically.

Even then are some problems.
I can ping addresses from router shell

root@GL-MT300N-V2:~# ping google.com
PING google.com (172.217.16.46): 56 data bytes
64 bytes from 172.217.16.46: seq=0 ttl=56 time=17.150 ms
64 bytes from 172.217.16.46: seq=1 ttl=56 time=35.051 ms
64 bytes from 172.217.16.46: seq=2 ttl=56 time=26.644 ms

But cannot form the client connected to the LAN:

user@host:~$ ping google.com
PING google.com (172.217.16.46) 56(84) bytes of data.
From console.gl-inet.com (192.168.8.1) icmp_seq=1 Destination Port Unreachable
From console.gl-inet.com (192.168.8.1) icmp_seq=2 Destination Port Unreachable
From console.gl-inet.com (192.168.8.1) icmp_seq=3 Destination Port Unreachable

There is still unresolved problem of the connecting modem after router boot-up.
if I connect modem to the USB port, after router boot-up, the connection to the Internet cannot be established.

Logread with modem connected to the USB port from the beginning of router booting procedure,
connection to Internet established:

 kern.info kernel: [    0.000000] Board has DDR2
 kern.info kernel: [    0.000000] Analog PMU set to hw control
 kern.info kernel: [    0.000000] Digital PMU set to hw control
 kern.info kernel: [    0.000000] SoC Type: MediaTek MT7628AN ver:1 eco:2
 kern.info kernel: [    0.000000] bootconsole [early0] enabled
 kern.info kernel: [    0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
 kern.info kernel: [    0.000000] MIPS: machine is GL-MT300N-V2
 kern.info kernel: [    0.000000] Determined physical RAM map:
 kern.info kernel: [    0.000000]  memory: 08000000 @ 00000000 (usable)
 kern.info kernel: [    0.000000] Initrd not found or empty - disabling initrd
 kern.info kernel: [    0.000000] Zone ranges:
 kern.info kernel: [    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
 kern.info kernel: [    0.000000] Movable zone start for each node
 kern.info kernel: [    0.000000] Early memory node ranges
 kern.info kernel: [    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
 kern.info kernel: [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
 kern.debug kernel: [    0.000000] On node 0 totalpages: 32768
 kern.debug kernel: [    0.000000] free_area_init_node: node 0, pgdat 803bc4b0, node_mem_map 81000000
 kern.debug kernel: [    0.000000]   Normal zone: 256 pages used for memmap
 kern.debug kernel: [    0.000000]   Normal zone: 0 pages reserved
 kern.debug kernel: [    0.000000]   Normal zone: 32768 pages, LIFO batch:7
 kern.warn kernel: [    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
 kern.warn kernel: [    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
 kern.debug kernel: [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
 kern.debug kernel: [    0.000000] pcpu-alloc: [0] 0
 kern.info kernel: [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
 kern.notice kernel: [    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
 kern.info kernel: [    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
 kern.info kernel: [    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
 kern.info kernel: [    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
 kern.info kernel: [    0.000000] Writing ErrCtl register=00000006
 kern.info kernel: [    0.000000] Readback ErrCtl register=00000006
 kern.info kernel: [    0.000000] Memory: 125552K/131072K available (3059K kernel code, 145K rwdata, 728K rodata, 156K init, 200K bss, 5520K reserved, 0K cma-reserved)
 kern.info kernel: [    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
 kern.info kernel: [    0.000000] NR_IRQS:256
 kern.info kernel: [    0.000000] intc: using register map from devicetree
 kern.info kernel: [    0.000000] CPU Clock: 575MHz
 kern.crit kernel: [    0.000000] clocksource_probe: no matching clocksources found
 kern.info kernel: [    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6647862422 ns
 kern.info kernel: [    0.000012] sched_clock: 32 bits at 287MHz, resolution 3ns, wraps every 7469508094ns
 kern.info kernel: [    0.007529] Calibrating delay loop... 380.92 BogoMIPS (lpj=1904640)
 kern.info kernel: [    0.069996] pid_max: default: 32768 minimum: 301
 kern.info kernel: [    0.074599] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
 kern.info kernel: [    0.080941] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
 kern.info kernel: [    0.094305] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
 kern.info kernel: [    0.103813] futex hash table entries: 256 (order: -1, 3072 bytes)
 kern.info kernel: [    0.109845] pinctrl core: initialized pinctrl subsystem
 kern.info kernel: [    0.116267] NET: Registered protocol family 16
 kern.info kernel: [    0.139923] mt7621_gpio 10000600.gpio: registering 32 gpios
 kern.info kernel: [    0.145494] mt7621_gpio 10000600.gpio: registering 32 gpios
 kern.info kernel: [    0.150926] mt7621_gpio 10000600.gpio: registering 32 gpios
 kern.info kernel: [    0.158170] clocksource: Switched to clocksource MIPS
 kern.info kernel: [    0.164524] NET: Registered protocol family 2
 kern.info kernel: [    0.169795] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
 kern.info kernel: [    0.176488] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
 kern.info kernel: [    0.182681] TCP: Hash tables configured (established 1024 bind 1024)
 kern.info kernel: [    0.188878] UDP hash table entries: 256 (order: 0, 4096 bytes)
 kern.info kernel: [    0.194478] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
 kern.info kernel: [    0.200864] NET: Registered protocol family 1
 kern.debug kernel: [    0.205088] PCI: CLS 0 bytes, default 32
 kern.warn kernel: [    0.210641] Crashlog allocated RAM at address 0x3f00000
 kern.info kernel: [    0.232883] squashfs: version 4.0 (2009/01/31) Phillip Lougher
 kern.info kernel: [    0.238544] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
 kern.info kernel: [    0.250805] io scheduler noop registered
 kern.info kernel: [    0.254543] io scheduler deadline registered (default)
 kern.info kernel: [    0.260376] gpio-export gpio_export: 1 gpio(s) exported
 kern.info kernel: [    0.265608] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
 kern.info kernel: [    0.275415] console [ttyS0] disabled
 kern.info kernel: [    0.278906] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
 kern.info kernel: [    0.287610] console [ttyS0] enabled
 kern.info kernel: [    0.294648] bootconsole [early0] disabled
 kern.info kernel: [    0.304467] spi-mt7621 10000b00.spi: sys_freq: 191666666
 kern.info kernel: [    0.315674] m25p80 spi32766.0: using chunked io (size=32)
 kern.info kernel: [    0.321239] m25p80 spi32766.0: w25q128 (16384 Kbytes)
 kern.notice kernel: [    0.326396] 4 ofpart partitions found on MTD device spi32766.0
 kern.notice kernel: [    0.332326] Creating 4 MTD partitions on "spi32766.0":
 kern.notice kernel: [    0.337544] 0x000000000000-0x000000030000 : "u-boot"
 kern.notice kernel: [    0.344434] 0x000000030000-0x000000040000 : "u-boot-env"
 kern.notice kernel: [    0.351821] 0x000000040000-0x000000050000 : "factory"
 kern.notice kernel: [    0.358835] 0x000000050000-0x000000f50000 : "firmware"
 kern.notice kernel: [    0.413988] 2 uimage-fw partitions found on MTD device firmware
 kern.notice kernel: [    0.420046] 0x000000050000-0x000000192d23 : "kernel"
 kern.notice kernel: [    0.426738] 0x000000192d23-0x000000f50000 : "rootfs"
 kern.notice kernel: [    0.433690] mtd: device 5 (rootfs) set to be root filesystem
 kern.notice kernel: [    0.439605] 1 squashfs-split partitions found on MTD device rootfs
 kern.notice kernel: [    0.445885] 0x000000980000-0x000000f50000 : "rootfs_data"
 kern.info kernel: [    0.462753] rt3050-esw 10110000.esw: link changed 0x00
 kern.info kernel: [    0.470448] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
 kern.info kernel: [    0.479600] mt7621_wdt 10000120.watchdog: Initialized
 kern.info kernel: [    0.486257] NET: Registered protocol family 10
 kern.info kernel: [    0.494573] NET: Registered protocol family 17
 kern.info kernel: [    0.499252] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
 kern.info kernel: [    0.512076] 8021q: 802.1Q VLAN Support v1.8
 kern.info kernel: [    0.518101] hctosys: unable to open rtc device (rtc0)
 kern.info kernel: [    0.531201] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
 kern.info kernel: [    0.539287] Freeing unused kernel memory: 156K
 user.info kernel: [    2.359390] init: Console is alive
 user.info kernel: [    2.363063] init: - watchdog -
 user.info kernel: [    6.299847] kmodloader: loading kernel modules from /etc/modules-boot.d/*
 kern.info kernel: [    6.388709] usbcore: registered new interface driver usbfs
 kern.info kernel: [    6.394405] usbcore: registered new interface driver hub
 kern.info kernel: [    6.399966] usbcore: registered new device driver usb
 kern.info kernel: [    6.411528] exFAT: Version 1.2.9
 kern.notice kernel: [    6.456003] SCSI subsystem initialized
 kern.info kernel: [    6.466875] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
 kern.info kernel: [    6.475435] ehci-platform: EHCI generic platform driver
 kern.info kernel: [    6.491063] phy phy-10120000.usbphy.0: remote usb device wakeup disabled
 kern.info kernel: [    6.497872] phy phy-10120000.usbphy.0: UTMI 16bit 30MHz
 kern.info kernel: [    6.503220] ehci-platform 101c0000.ehci: EHCI Host Controller
 kern.info kernel: [    6.509122] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
 kern.info kernel: [    6.517274] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
 kern.info kernel: [    6.538192] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
 kern.info kernel: [    6.545695] hub 1-0:1.0: USB hub found
 kern.info kernel: [    6.549935] hub 1-0:1.0: 1 port detected
 kern.info kernel: [    6.557493] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
 kern.info kernel: [    6.565647] ohci-platform: OHCI generic platform driver
 kern.info kernel: [    6.571275] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
 kern.info kernel: [    6.578240] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
 kern.info kernel: [    6.586353] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
 kern.info kernel: [    6.653387] hub 2-0:1.0: USB hub found
 kern.info kernel: [    6.657608] hub 2-0:1.0: 1 port detected
 kern.info kernel: [    6.664614] uhci_hcd: USB Universal Host Controller Interface driver
 kern.info kernel: [    6.685217] sdhci: Secure Digital Host Controller Interface driver
 kern.info kernel: [    6.691564] sdhci: Copyright(c) Pierre Ossman
 kern.info kernel: [    6.697385] sdhci-pltfm: SDHCI platform and OF driver helper
 kern.info kernel: [    6.707799] usbcore: registered new interface driver usb-storage
 user.info kernel: [    6.717440] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
 user.info kernel: [    6.735271] init: - preinit -
 kern.info kernel: [    6.986438] usb 1-1: new high-speed USB device number 2 using ehci-platform
 kern.notice kernel: [    7.247314] random: procd: uninitialized urandom read (4 bytes read, 13 bits of entropy available)
 kern.info kernel: [    7.261192] usb-storage 1-1:1.0: USB Mass Storage device detected
 kern.info kernel: [    7.286190] scsi host0: usb-storage 1-1:1.0
 kern.info kernel: [    7.291516] usb-storage 1-1:1.1: USB Mass Storage device detected
 kern.info kernel: [    7.309186] scsi host1: usb-storage 1-1:1.1
 kern.info kernel: [    7.652544] rt3050-esw 10110000.esw: link changed 0x00
 kern.notice kernel: [    8.289252] scsi 0:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
 kern.notice kernel: [    8.309380] scsi 1:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
 kern.notice kernel: [    8.323800] sd 1:0:0:0: [sda] Attached SCSI removable disk
 kern.notice kernel: [   11.385600] jffs2: notice: (430) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
 user.info kernel: [   11.403527] mount_root: switching to jffs2 overlay
 user.warn kernel: [   11.427067] urandom-seed: Seeding with /etc/urandom.seed
 user.info kernel: [   11.554994] procd: - early -
 user.info kernel: [   11.558030] procd: - watchdog -
 user.info kernel: [   12.275373] procd: - watchdog -
 user.info kernel: [   12.278932] procd: - ubus -
 kern.notice kernel: [   12.833816] random: ubusd: uninitialized urandom read (4 bytes read, 24 bits of entropy available)
 kern.notice kernel: [   12.898469] random: ubusd: uninitialized urandom read (4 bytes read, 24 bits of entropy available)
 kern.notice kernel: [   12.916377] random: ubusd: uninitialized urandom read (4 bytes read, 24 bits of entropy available)
 kern.notice kernel: [   12.938350] random: ubusd: uninitialized urandom read (4 bytes read, 24 bits of entropy available)
 kern.notice kernel: [   12.972147] random: ubusd: uninitialized urandom read (4 bytes read, 24 bits of entropy available)
 kern.notice kernel: [   12.981392] random: ubusd: uninitialized urandom read (4 bytes read, 24 bits of entropy available)
 kern.notice kernel: [   13.003343] random: ubusd: uninitialized urandom read (4 bytes read, 24 bits of entropy available)
 kern.notice kernel: [   13.169212] random: ubusd: uninitialized urandom read (4 bytes read, 25 bits of entropy available)
 user.info kernel: [   13.179190] procd: - init -
 kern.notice kernel: [   13.571614] random: jshn: uninitialized urandom read (4 bytes read, 25 bits of entropy available)
 user.info kernel: [   14.116290] kmodloader: loading kernel modules from /etc/modules.d/*
 kern.info kernel: [   14.183485] ntfs: driver 2.1.32 [Flags: R/O MODULE].
 kern.info kernel: [   14.533001] tun: Universal TUN/TAP device driver, 1.6
 kern.info kernel: [   14.538138] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
 kern.info kernel: [   14.577724] l2tp_core: L2TP core driver, V2.0
 kern.info kernel: [   14.592389] l2tp_netlink: L2TP netlink interface
 kern.info kernel: [   14.622513] gre: GRE over IPv4 demultiplexor driver
 kern.info kernel: [   14.721515] ip_gre: GRE over IPv4 tunneling driver
 kern.info kernel: [   14.773949] ip6_tables: (C) 2000-2006 Netfilter Core Team
 kern.info kernel: [   14.813327] Netfilter messages via NETLINK v0.30.
 kern.info kernel: [   14.835713] ip_set: protocol 6
 kern.info kernel: [   14.946218] i2c /dev entries driver
 kern.info kernel: [   15.001231] Linux video capture interface: v2.00
 kern.info kernel: [   15.119741] u32 classifier
 kern.info kernel: [   15.122498]     input device check on
 kern.info kernel: [   15.126206]     Actions configured
 kern.info kernel: [   15.162236] Mirror/redirect action on
 kern.info kernel: [   15.194562] nf_conntrack version 0.5.0 (1964 buckets, 7856 max)
 kern.info kernel: [   15.277898] usb 1-1: USB disconnect, device number 2
 kern.info kernel: [   15.307616] fuse init (API version 7.23)
 kern.info kernel: [   15.878285] usb 1-1: new high-speed USB device number 3 using ehci-platform
 kern.info kernel: [   16.173321] usb-storage 1-1:1.2: USB Mass Storage device detected
 kern.info kernel: [   16.190430] scsi host2: usb-storage 1-1:1.2
 kern.info kernel: [   16.195661] usb-storage 1-1:1.3: USB Mass Storage device detected
 kern.info kernel: [   16.388469] scsi host3: usb-storage 1-1:1.3
 kern.warn kernel: [   16.697537]
 kern.warn kernel: [   16.697537]
 kern.warn kernel: [   16.697537] === pAd = c06a0000, size = 1402624 ===
 kern.warn kernel: [   16.697537]
 kern.warn kernel: [   16.707176] <-- RTMPAllocTxRxRingMemory, Status=0, ErrorValue=0x
 kern.warn kernel: [   16.714512] <-- RTMPAllocAdapterBlock, Status=0
 kern.warn kernel: [   16.719146] RtmpChipOpsHook(748): Not support for HIF_MT yet!
 kern.warn kernel: [   16.724969] mt7628_init()-->
 kern.warn kernel: [   16.727896] mt7628_init(FW(8a00), HW(8a01), CHIPID(7628))
 kern.warn kernel: [   16.733385] e2.bin mt7628_init(1142)::(2), pChipCap->fw_len(63536)
 kern.warn kernel: [   16.739665] mt_bcn_buf_init(289): Not support for HIF_MT yet!
 kern.warn kernel: [   16.745488] <--mt7628_init()
 kern.info kernel: [   16.853062] usbcore: registered new interface driver cdc_acm
 kern.info kernel: [   16.858882] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
 kern.info kernel: [   16.892255] usbcore: registered new interface driver cdc_wdm
-01-31-0-ge882dff19e7f
 kern.info kernel: [   16.918069] Backport generated by backports.git backports-20160324-13-g24da7d3c
 kern.info kernel: [   16.977854] ip_tables: (C) 2000-2006 Netfilter Core Team
 kern.info kernel: [   17.002293] usbcore: registered new interface driver ipheth
 kern.info kernel: [   17.177971] usbcore: registered new interface driver usbserial
 kern.info kernel: [   17.184086] usbcore: registered new interface driver usbserial_generic
 kern.info kernel: [   17.190883] usbserial: USB Serial support registered for generic
 kern.notice kernel: [   17.200211] scsi 2:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
 kern.info kernel: [   17.359521] xt_time: kernel timezone is -0000
 kern.info kernel: [   17.369353] usbcore: registered new interface driver cdc_ether
 kern.notice kernel: [   17.390091] scsi 3:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
 kern.notice kernel: [   17.404129] sd 3:0:0:0: [sda] Attached SCSI removable disk
 kern.info kernel: [   17.414983] usbcore: registered new interface driver cdc_ncm
 kern.info kernel: [   17.519319] usbcore: registered new interface driver cp210x
 kern.info kernel: [   17.525093] usbserial: USB Serial support registered for cp210x
 kern.info kernel: [   17.565709] gspca_main: v2.14.0 registered
 kern.info kernel: [   17.581892] usbcore: registered new interface driver sonixb
 kern.info kernel: [   17.602741] usbcore: registered new interface driver sonixj
 kern.info kernel: [   17.627550] usbcore: registered new interface driver gspca_zc3xx
 kern.info kernel: [   17.669448] huawei_cdc_ncm 1-1:1.1: MAC-Address: xx:xx:xx:xx:xx:xx
 kern.info kernel: [   17.675755] huawei_cdc_ncm 1-1:1.1: setting rx_max = 16384
 kern.info kernel: [   17.698935] huawei_cdc_ncm 1-1:1.1: setting tx_max = 16384
 kern.info kernel: [   17.718253] huawei_cdc_ncm 1-1:1.1: NDP will be placed at end of frame for this device.
 kern.info kernel: [   17.726695] huawei_cdc_ncm 1-1:1.1: cdc-wdm0: USB WDM device
 kern.info kernel: [   17.733798] huawei_cdc_ncm 1-1:1.1 wwan0: register 'huawei_cdc_ncm' at usb-101c0000.ehci-1, Huawei CDC NCM device, xx:xx:xx:xx:xx:xx
 kern.info kernel: [   17.746149] usbcore: registered new interface driver huawei_cdc_ncm
 kern.info kernel: [   17.939939] PPP generic driver version 2.4.2
 kern.info kernel: [   17.959924] PPP MPPE Compression module registered
 kern.info kernel: [   17.979359] NET: Registered protocol family 24
 kern.info kernel: [   17.986088] PPTP driver version 0.8.5
 kern.info kernel: [   18.000024] usbcore: registered new interface driver qmi_wwan
 kern.info kernel: [   18.022786] usbcore: registered new interface driver rndis_host
 kern.info kernel: [   18.089425] usbcore: registered new interface driver sierra
 kern.info kernel: [   18.095232] usbserial: USB Serial support registered for Sierra USB modem
 kern.info kernel: [   18.130463] usbcore: registered new interface driver sierra_net
 kern.info kernel: [   18.170990] usbcore: registered new interface driver uvcvideo
 kern.info kernel: [   18.176828] USB Video Class driver (1.1.1)
 kern.info kernel: [   18.214585] l2tp_ppp: PPPoL2TP kernel driver, V2.0
 kern.info kernel: [   18.227355] usbcore: registered new interface driver option
 kern.info kernel: [   18.233234] usbserial: USB Serial support registered for GSM modem (1-port)
 kern.info kernel: [   18.240800] option 1-1:1.0: GSM modem (1-port) converter detected
 kern.info kernel: [   18.247318] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
 kern.info kernel: [   18.331488] usbcore: registered new interface driver rt2800usb
 user.info kernel: [   18.346042] kmodloader: done loading kernel modules from /etc/modules.d/*
 daemon.notice procd: /etc/rc.d/S19initswitch: uci: Entry not found
 daemon.notice procd: /etc/rc.d/S19initswitch: uci: Entry not found
 user.notice : Added device handler type: 8021ad
 user.notice : Added device handler type: 8021q
 user.notice : Added device handler type: macvlan
 user.notice : Added device handler type: bridge
 user.notice : Added device handler type: Network device
 user.notice : Added device handler type: tunnel
 kern.warn kernel: [   25.641855] TX_BCN DESC a696e000 size = 320
 kern.warn kernel: [   25.646176] RX[0] DESC a6978000 size = 2048
 kern.warn kernel: [   25.653490] RX[1] DESC a6979000 size = 1024
 authpriv.info dropbear[1201]: Not backgrounding
 kern.warn kernel: [   25.715401] prepare to get e2p access------------
 kern.warn kernel: [   25.720515] E2pAccessMode=2
 kern.warn kernel: [   25.724098] cfg_mode=9
 kern.warn kernel: [   25.726487] cfg_mode=9
 kern.warn kernel: [   25.728913] wmode_band_equal(): Band Equal!
 kern.warn kernel: [   25.737336] APSDCapable[0]=1
 kern.warn kernel: [   25.740280] APSDCapable[1]=1
 kern.warn kernel: [   25.743198] APSDCapable[2]=1
 kern.warn kernel: [   25.746119] APSDCapable[3]=1
 kern.warn kernel: [   25.749060] APSDCapable[4]=1
 kern.warn kernel: [   25.751979] APSDCapable[5]=1
 kern.warn kernel: [   25.754895] APSDCapable[6]=1
 kern.warn kernel: [   25.757811] APSDCapable[7]=1
 kern.warn kernel: [   25.760745] APSDCapable[8]=1
 kern.warn kernel: [   25.763663] APSDCapable[9]=1
 kern.warn kernel: [   25.766579] APSDCapable[10]=1
 kern.warn kernel: [   25.769600] APSDCapable[11]=1
 kern.warn kernel: [   25.772605] APSDCapable[12]=1
 kern.warn kernel: [   25.775610] APSDCapable[13]=1
 kern.warn kernel: [   25.778635] APSDCapable[14]=1
 kern.warn kernel: [   25.781643] APSDCapable[15]=1
 kern.warn kernel: [   25.784650] default ApCliAPSDCapable[0]=1
 kern.warn kernel: [   25.984121] Key1Str is Invalid key length(0) or Type(0)
 kern.warn kernel: [   25.989805] Key2Str is Invalid key length(0) or Type(0)
 kern.warn kernel: [   25.995472] Key3Str is Invalid key length(0) or Type(0)
 kern.warn kernel: [   26.001162] Key4Str is Invalid key length(0) or Type(0)
 kern.warn kernel: [   26.065108] RTMPSetDefaultChannel() : default channel to 1
 kern.warn kernel: [   26.070841] load fw image from fw_header_image
 kern.warn kernel: [   26.075350] AndesMTLoadFwMethod1(2548)::pChipCap->fw_len(63536)
 daemon.notice procd: /etc/rc.d/S50mjpg-streamer: /etc/rc.d/S50mjpg-streamer: device '/dev/video0' does not exist
 user.notice root: drv_ralink_cleanup
 daemon.notice procd: /etc/init.d/network: Command failed: Not found
 daemon.notice netifd: Interface 'lan' is enabled
 daemon.notice netifd: Interface 'lan' is setting up now
 daemon.notice netifd: Interface 'lan' is now up
 daemon.notice netifd: Interface 'loopback' is enabled
 daemon.notice netifd: Interface 'loopback' is setting up now
 daemon.notice netifd: Interface 'loopback' is now up
 daemon.notice netifd: Interface 'modem' is setting up now
 daemon.notice netifd: Interface 'wan' is enabled
 daemon.notice netifd: Interface 'wan6' is enabled
 daemon.info odhcpd[1154]: Raising SIGUSR1 due to address change on br-lan
 daemon.notice netifd: bridge 'br-lan' link is up
 daemon.notice netifd: Interface 'lan' has link connectivity
 daemon.notice netifd: Network device 'eth0' link is up
 daemon.notice netifd: VLAN 'eth0.1' link is up
 daemon.notice netifd: Network device 'lo' link is up
 daemon.notice netifd: Interface 'loopback' has link connectivity
 daemon.notice netifd: VLAN 'eth0.2' link is up
 daemon.notice netifd: Interface 'wan' has link connectivity
 daemon.notice netifd: Interface 'wan' is setting up now
 daemon.notice netifd: Interface 'wan6' has link connectivity
 daemon.notice netifd: Interface 'wan6' is setting up now
 daemon.notice netifd: wan (1526): udhcpc: started, v1.25.1
 daemon.info odhcpd[1154]: Using a RA lifetime of 0 seconds on br-lan
 daemon.notice odhcpd[1154]: Failed to send to ff02::1%br-lan (Address not available)
 daemon.notice netifd: wan (1526): udhcpc: sending discover
 daemon.err odhcp6c[1525]: Failed to send DHCPV6 message to ff02::1:2 (Address not available)
 daemon.err insmod: module is already loaded - xt_multiport
 daemon.err insmod: module is already loaded - xt_connmark
 daemon.err insmod: module is already loaded - xt_comment
 daemon.err insmod: module is already loaded - xt_length
 daemon.err odhcp6c[1525]: Failed to send DHCPV6 message to ff02::1:2 (Address not available)
 user.notice firewall: Reloading firewall due to ifup of lan (br-lan)
 daemon.notice netifd: wan (1526): udhcpc: sending discover
 daemon.err insmod: module is already loaded - xt_multiport
 daemon.err insmod: module is already loaded - xt_connmark
 daemon.err insmod: module is already loaded - xt_comment
 daemon.err insmod: module is already loaded - xt_length
 daemon.notice netifd: modem (1450): sending -> AT
 daemon.notice netifd: modem (1450): sending -> ATZ
 daemon.notice netifd: modem (1450): sending -> ATQ0
 daemon.notice netifd: wan (1526): udhcpc: sending discover
 daemon.notice netifd: modem (1450): sending -> ATV1
 daemon.notice netifd: modem (1450): sending -> ATE1
 daemon.notice netifd: modem (1450): sending -> ATS0=0
 daemon.info dnsmasq[2179]: started, version 2.78 cachesize 150
 daemon.info dnsmasq[2179]: DNS service limited to local subnets
 daemon.info dnsmasq[2179]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify
 daemon.info dnsmasq-dhcp[2179]: DHCP, IP range 192.168.8.100 -- 192.168.8.249, lease time 12h
 daemon.info dnsmasq[2179]: using local addresses only for domain test
 daemon.info dnsmasq[2179]: using local addresses only for domain onion
 daemon.info dnsmasq[2179]: using local addresses only for domain localhost
 daemon.info dnsmasq[2179]: using local addresses only for domain local
 daemon.info dnsmasq[2179]: using local addresses only for domain invalid
 daemon.info dnsmasq[2179]: using local addresses only for domain example.net
 daemon.info dnsmasq[2179]: using local addresses only for domain example.org
 daemon.info dnsmasq[2179]: using local addresses only for domain example.com
 daemon.info dnsmasq[2179]: using 3 more local addresses
 daemon.warn dnsmasq[2179]: no servers found in /tmp/resolv.conf.auto, will retry
 daemon.info dnsmasq[2179]: read /etc/hosts - 4 addresses
 daemon.info dnsmasq[2179]: read /tmp/hosts/odhcpd - 0 addresses
 daemon.info dnsmasq[2179]: read /tmp/hosts/dhcp.cfg02411c - 3 addresses
 daemon.info dnsmasq-dhcp[2179]: read /etc/ethers - 0 addresses
 daemon.crit xl2tpd[2208]: setsockopt recvref[30]: Protocol not available
 daemon.info xl2tpd[2208]: Using l2tp kernel support.
 daemon.info xl2tpd[2208]: xl2tpd version xl2tpd-1.3.6 started on GL-MT300N-V2 PID:2208
 daemon.info xl2tpd[2208]: Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc.
 daemon.info xl2tpd[2208]: Forked by Scott Balmos and David Stipp, (C) 2001
 daemon.info xl2tpd[2208]: Inherited by Jeff McAdams, (C) 2002
 daemon.info xl2tpd[2208]: Forked again by Xelerance (www.xelerance.com) (C) 2006
 daemon.info xl2tpd[2208]: Listening on IP address 0.0.0.0, port 1701
 daemon.notice netifd: modem (1450): sending -> AT+CGDCONT=1,"IP","darmowy"
 daemon.notice procd: /etc/rc.d/S96led: setting up led wifi
 daemon.notice netifd: modem (1450): Starting network modem
 daemon.notice netifd: modem (1450): sending -> AT^NDISDUP=1,1,"darmowy"
 daemon.notice netifd: modem (1450): Setting up wwan0
 daemon.notice netifd: Interface 'modem' is now up
 daemon.notice netifd: Network device 'wwan0' link is up
 daemon.notice netifd: Network alias 'wwan0' link is up
 daemon.notice netifd: Interface 'modem_4' is enabled
 daemon.notice netifd: Interface 'modem_4' has link connectivity
 daemon.notice netifd: Interface 'modem_4' is setting up now
 daemon.notice netifd: modem (1450): Command failed: Unknown error
 daemon.notice netifd: modem_4 (2442): udhcpc: started, v1.25.1
 daemon.notice netifd: modem_4 (2442): udhcpc: sending discover
 daemon.notice netifd: modem_4 (2442): udhcpc: sending select for 100.82.168.2
 daemon.notice netifd: modem_4 (2442): udhcpc: lease of 100.82.168.2 obtained, lease time 518400
 daemon.notice netifd: Interface 'modem_4' is now up
 daemon.info dnsmasq[2179]: reading /tmp/resolv.conf.auto
 daemon.info dnsmasq[2179]: using local addresses only for domain test
 daemon.info dnsmasq[2179]: using local addresses only for domain onion
 daemon.info dnsmasq[2179]: using local addresses only for domain localhost
 daemon.info dnsmasq[2179]: using local addresses only for domain local
 daemon.info dnsmasq[2179]: using local addresses only for domain invalid
 daemon.info dnsmasq[2179]: using local addresses only for domain example.net
 daemon.info dnsmasq[2179]: using local addresses only for domain example.org
 daemon.info dnsmasq[2179]: using local addresses only for domain example.com
 daemon.info dnsmasq[2179]: using nameserver 212.2.127.254#53
 daemon.info dnsmasq[2179]: using nameserver 212.2.96.52#53
 daemon.info dnsmasq[2179]: using 3 more local addresses
 user.notice mwan3: ifup interface modem (wwan0)
 daemon.info odhcpd[1154]: Using a RA lifetime of 0 seconds on br-lan
 daemon.notice procd: /etc/rc.d/S99ss-server:
 daemon.info procd: - init complete -
 daemon.info dnsmasq[2179]: read /etc/hosts - 4 addresses
 daemon.info dnsmasq[2179]: read /tmp/hosts/odhcpd - 0 addresses
 daemon.info dnsmasq[2179]: read /tmp/hosts/dhcp.cfg02411c - 3 addresses
 daemon.info dnsmasq-dhcp[2179]: read /etc/ethers - 0 addresses
 daemon.info odhcpd[1154]: Using a RA lifetime of 0 seconds on br-lan
 daemon.notice odhcpd[1154]: Got DHCPv6 request
 daemon.warn odhcpd[1154]: DHCPV6 CONFIRM IA_NA from 00040d417f137d79594245c2e9116f31db2b on br-lan: not on-link
 daemon.info dnsmasq-dhcp[2179]: DHCPDISCOVER(br-lan) 192.168.8.116 xx:xx:xx:xx:xx:xx
 daemon.info dnsmasq-dhcp[2179]: DHCPOFFER(br-lan) 192.168.8.116 xx:xx:xx:xx:xx:xx
 daemon.info dnsmasq-dhcp[2179]: DHCPDISCOVER(br-lan) 192.168.8.116 xx:xx:xx:xx:xx:xx
 daemon.info dnsmasq-dhcp[2179]: DHCPOFFER(br-lan) 192.168.8.116 xx:xx:xx:xx:xx:xx
 daemon.info dnsmasq-dhcp[2179]: DHCPREQUEST(br-lan) 192.168.8.116 xx:xx:xx:xx:xx:xx
 daemon.info dnsmasq-dhcp[2179]: DHCPACK(br-lan) 192.168.8.116 xx:xx:xx:xx:xx:xx xxx
 daemon.notice odhcpd[1154]: Got DHCPv6 request

Summing up:

  • what to do to connect to the Internet with booted up router and then connected modem to the USB port ?
  • what to do to allow LAN client to reach Internet ?

This is related to firewall. Can you give the content of firewall

cat /etc/config/firewall

The content of cat /etc/config/firewall is:

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

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

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

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 src_ip 'fc00::/6'
	option dest_ip 'fc00::/6'
	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'

config include
	option path '/etc/firewall.user'

config include 'miniupnpd'
	option type 'script'
	option path '/usr/share/miniupnpd/firewall.include'
	option family 'any'
	option reload '1'

config include 'shadowsocks'
	option type 'script'
	option path '/var/etc/shadowsocks.include'
	option reload '1'

config rule 'glservice_rule'
	option name 'glservice'
	option dest_port '83'
	option proto 'tcp udp'
	option src 'wan'
	option target 'ACCEPT'
	option enabled '0'

the content of cat /etc/firewall.user is:

force_dns() {
	# lanip=$(ifconfig br-lan |sed -n 's/.*dr:\(.*\) Bc.*/\1/p')
	lanip=$(uci get network.lan.ipaddr)
    iptables -t nat -A PREROUTING -s 0/0 -p udp --dport 53 -j DNAT --to $lanip
    iptables -t nat -A PREROUTING -s 0/0 -p tcp --dport 53 -j DNAT --to $lanip
}
force=$(uci get glconfig.general.force_dns)
if [ -n "$force" ]; then
    force_dns
fi

The uci get glconfig.general.force_dns is empty.

Ok. Based on your suggestion I found the solution for the question:

For the connection LAN client to the Internet I found my mistake. I forgot to add “modem” to the firewall zone wan.
The zone should look (at least) like that:

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

Of course, if we want to have also Ethernet cable wan connected, there should be those networks included:

	list network 'wan'
	list network 'wan6'
	list network 'modem'

If you, @alzhao have any comment for those solution, please do.

The still open question is:

I checked one more aspect. After ifdown modem, modem disconnects from the Internet. But next ifup modem does not connect modem to the Internet.

The router has MWAN3 enabled which will change the interface you are using to access internet.

So I think when you disable modem the route table is changed my mwan3.