I know this device uses ncm, so I created an interface with that. Then I used /dev/ttyACM0 device for use. Then I got the APN name from the service provider. Everything seems right, but I still can't connect anywhere.
Show the relevant part of /etc/config/network
Run logread -f
then restart the interface in Luci, wait up to one minute, terminate log collection by ^C and post the collected data.
root@OpenWrt:~# 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 'fdd7:7fa0:1db5::/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.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '1 2 3 5 0t'
config interface 'ttnet'
option proto 'ncm'
option device '/dev/ttyACM0'
option mode 'preferlte'
option pdptype 'IP'
option apn 'internet'
option ipv6 'auto'
root@OpenWrt:~# logread -f
Sat Nov 2 22:49:30 2024 daemon.notice netifd: Interface 'ttnet_4' is disabled
Sat Nov 2 22:49:30 2024 daemon.notice netifd: Network alias '' link is down
Sat Nov 2 22:49:30 2024 daemon.notice netifd: Interface 'ttnet_4' has link connectivity loss
Sat Nov 2 22:49:30 2024 daemon.notice netifd: ttnet (2805): Stopping network ttnet
Sat Nov 2 22:49:30 2024 daemon.notice netifd: ttnet_4 (2670): udhcpc: received SIGTERM
Sat Nov 2 22:49:30 2024 daemon.notice netifd: ttnet_4 (2670): udhcpc: entering released state
Sat Nov 2 22:49:31 2024 daemon.notice netifd: ttnet_4 (2670): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "ttnet_4" } (Permission denied)
Sat Nov 2 22:49:31 2024 daemon.notice netifd: Interface 'ttnet_4' is now down
Sat Nov 2 22:49:31 2024 daemon.notice netifd: ttnet (2805): sending -> AT+ZGACT=0,1
Sat Nov 2 22:49:32 2024 daemon.warn odhcpd[1724]: No default route present, overriding ra_lifetime!
Sat Nov 2 22:49:32 2024 daemon.notice netifd: ttnet (2805): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "ttnet" } (Permission denied)
Sat Nov 2 22:49:32 2024 daemon.notice netifd: Interface 'ttnet' is now down
Sat Nov 2 22:49:32 2024 daemon.notice netifd: Interface 'ttnet' is setting up now
Sat Nov 2 22:49:33 2024 daemon.warn odhcpd[1724]: No default route present, overriding ra_lifetime!
Sat Nov 2 22:49:34 2024 daemon.notice netifd: ttnet (2836): sending -> AT+CFUN=1
Sat Nov 2 22:49:35 2024 daemon.notice netifd: ttnet (2836): Configuring modem
Sat Nov 2 22:49:35 2024 daemon.notice netifd: ttnet (2836): sending -> AT+ZGDCONT=1,"IP","internet","",0,0
Sat Nov 2 22:49:36 2024 daemon.notice netifd: ttnet (2836): sending -> AT+ZGPCOAUTH=1,"","",0
Sat Nov 2 22:49:37 2024 daemon.notice netifd: ttnet (2836): WARNING: Variable 'modes' does not exist or is not an array/object
Sat Nov 2 22:49:37 2024 daemon.notice netifd: ttnet (2836): Starting network ttnet
Sat Nov 2 22:49:37 2024 daemon.notice netifd: ttnet (2836): Setting up usb1
Sat Nov 2 22:49:37 2024 daemon.notice netifd: Interface 'ttnet' is now up
Sat Nov 2 22:49:37 2024 daemon.notice netifd: Network device 'usb1' link is up
Sat Nov 2 22:49:37 2024 daemon.notice netifd: Network alias 'usb1' link is up
Sat Nov 2 22:49:38 2024 daemon.notice netifd: Interface 'ttnet_4' is enabled
Sat Nov 2 22:49:38 2024 daemon.notice netifd: Interface 'ttnet_4' has link connectivity
Sat Nov 2 22:49:38 2024 daemon.notice netifd: Interface 'ttnet_4' is setting up now
Sat Nov 2 22:49:38 2024 daemon.notice netifd: ttnet_4 (3065): udhcpc: started, v1.36.1
Sat Nov 2 22:49:38 2024 daemon.notice netifd: ttnet_4 (3065): udhcpc: broadcasting discover
Sat Nov 2 22:49:38 2024 daemon.warn odhcpd[1724]: No default route present, overriding ra_lifetime!
Sat Nov 2 22:49:41 2024 daemon.notice netifd: ttnet_4 (3065): udhcpc: broadcasting discover
Sat Nov 2 22:49:44 2024 daemon.notice netifd: ttnet_4 (3065): udhcpc: broadcasting discover
What is your OpenWrt version? For some reason the connect command is not executed.
Delete this:
It's 23.05.5, and I did just that. Trying again. I can see it has now an IPv4 adress. But still no connection:
root@OpenWrt:~# logread -f
Sat Nov 2 23:33:46 2024 daemon.notice netifd: Interface 'ttnet_4' is disabled
Sat Nov 2 23:33:46 2024 daemon.notice netifd: Network alias '' link is down
Sat Nov 2 23:33:46 2024 daemon.notice netifd: Interface 'ttnet_4' has link connectivity loss
Sat Nov 2 23:33:46 2024 daemon.notice netifd: ttnet (3691): Stopping network ttnet
Sat Nov 2 23:33:46 2024 daemon.notice netifd: ttnet_4 (2635): udhcpc: received SIGTERM
Sat Nov 2 23:33:46 2024 daemon.notice netifd: ttnet_4 (2635): udhcpc: unicasting a release of 10.137.133.253 to 10.137.133.2
Sat Nov 2 23:33:46 2024 daemon.notice netifd: ttnet_4 (2635): udhcpc: sending release
Sat Nov 2 23:33:46 2024 daemon.notice netifd: ttnet_4 (2635): udhcpc: entering released state
Sat Nov 2 23:33:46 2024 daemon.notice netifd: ttnet_4 (2635): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "ttnet_4" } (Permission denied)
Sat Nov 2 23:33:46 2024 daemon.notice netifd: Interface 'ttnet_4' is now down
Sat Nov 2 23:33:46 2024 daemon.warn dnsmasq[1]: no servers found in /tmp/resolv.conf.d/resolv.conf.auto, will retry
Sat Nov 2 23:33:47 2024 daemon.notice netifd: ttnet (3691): sending -> AT+ZGACT=0,1
Sat Nov 2 23:33:47 2024 daemon.warn odhcpd[1723]: No default route present, overriding ra_lifetime!
Sat Nov 2 23:33:47 2024 daemon.notice netifd: ttnet (3691): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "ttnet" } (Permission denied)
Sat Nov 2 23:33:47 2024 daemon.notice netifd: Interface 'ttnet' is now down
Sat Nov 2 23:33:47 2024 daemon.notice netifd: Interface 'ttnet' is setting up now
Sat Nov 2 23:33:48 2024 daemon.warn odhcpd[1723]: No default route present, overriding ra_lifetime!
Sat Nov 2 23:33:50 2024 daemon.notice netifd: ttnet (3726): sending -> AT+CFUN=1
Sat Nov 2 23:33:50 2024 daemon.notice netifd: ttnet (3726): Configuring modem
Sat Nov 2 23:33:51 2024 daemon.notice netifd: ttnet (3726): sending -> AT+ZGDCONT=1,"IP","internet","",0,0
Sat Nov 2 23:33:52 2024 daemon.notice netifd: ttnet (3726): sending -> AT+ZGPCOAUTH=1,"","",0
Sat Nov 2 23:33:53 2024 daemon.notice netifd: ttnet (3726): Starting network ttnet
Sat Nov 2 23:33:53 2024 daemon.notice netifd: ttnet (3726): Connecting modem
Sat Nov 2 23:33:53 2024 daemon.notice netifd: ttnet (3726): sending -> AT+ZGACT=1,1
Sat Nov 2 23:33:53 2024 daemon.notice netifd: ttnet (3726): Setting up usb1
Sat Nov 2 23:33:53 2024 daemon.notice netifd: Interface 'ttnet' is now up
Sat Nov 2 23:33:53 2024 daemon.notice netifd: Network device 'usb1' link is up
Sat Nov 2 23:33:53 2024 daemon.notice netifd: Network alias 'usb1' link is up
Sat Nov 2 23:33:54 2024 daemon.notice netifd: Interface 'ttnet_4' is enabled
Sat Nov 2 23:33:54 2024 daemon.notice netifd: Interface 'ttnet_4' has link connectivity
Sat Nov 2 23:33:54 2024 daemon.notice netifd: Interface 'ttnet_4' is setting up now
Sat Nov 2 23:33:54 2024 daemon.notice netifd: ttnet_4 (3956): udhcpc: started, v1.36.1
Sat Nov 2 23:33:54 2024 daemon.notice netifd: ttnet_4 (3956): udhcpc: broadcasting discover
Sat Nov 2 23:33:54 2024 daemon.warn odhcpd[1723]: No default route present, overriding ra_lifetime!
Sat Nov 2 23:33:57 2024 daemon.notice netifd: ttnet_4 (3956): udhcpc: broadcasting discover
Sat Nov 2 23:34:00 2024 daemon.notice netifd: ttnet_4 (3956): udhcpc: broadcasting select for 10.137.133.253, server 10.137.133.2
Sat Nov 2 23:34:00 2024 daemon.notice netifd: ttnet_4 (3956): udhcpc: lease of 10.137.133.253 obtained from 10.137.133.2, lease time 7200
Sat Nov 2 23:34:00 2024 daemon.notice netifd: Interface 'ttnet_4' is now up
Sat Nov 2 23:34:00 2024 daemon.info dnsmasq[1]: reading /tmp/resolv.conf.d/resolv.conf.auto
Sat Nov 2 23:34:00 2024 daemon.info dnsmasq[1]: using nameserver 195.175.39.60#53
Sat Nov 2 23:34:00 2024 daemon.info dnsmasq[1]: using nameserver 195.175.39.59#53
Sat Nov 2 23:34:00 2024 daemon.info dnsmasq[1]: using only locally-known addresses for test
Sat Nov 2 23:34:00 2024 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Sat Nov 2 23:34:00 2024 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Sat Nov 2 23:34:00 2024 daemon.info dnsmasq[1]: using only locally-known addresses for local
Sat Nov 2 23:34:00 2024 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Sat Nov 2 23:34:00 2024 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Sat Nov 2 23:34:00 2024 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Sat Nov 2 23:34:01 2024 daemon.warn odhcpd[1723]: No default route present, overriding ra_lifetime!
You forgot to assign this interface to wan firewall zone.
https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_ncm#network_configuration
I did what you said. Btw, I think I am close. Because inside the router, I ping to google.com.tr and it responds! From the PC it's connected to, ping doesn't respond. I think the router gets internet, but won't share it to the clients connected via LAN. How do I overcome this?
root@OpenWrt:~# 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 'wan'
list network 'wan6'
list network 'wwan'
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'
You cannot follow examples selectively... You use "ttnet" name, so it should be there instead of "wwan". Alternatively, rename your interface from "ttnet" to "wwan".
Yes that's what I did just now. Sorry. This fixed it. Thanks a lot. Now LAN's got internet too. Yippy!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.