I installed OpenWRT 24 on a MR200v5, a simple TP-link with build in 4G, for use in my small campervan. I used the official distro, and it all almost seems to work, but not quite
Using the uqmi
command, I see it connects, and even gets an IP from the provider, but it is not passing through the IP to the OpenWRT interface.
uqmi output (note the CG-NAT IP details)
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= 6.06
S: Manufacturer=Linux 6.6.86 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=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=05c6 ProdID=9025 Rev= 3.18
S: Manufacturer=Android
S: Product=Android
S: SerialNumber=9bd61336
C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
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= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=82(I) 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=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=83(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=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=85(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= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-profile-settings 3gpp,1
{
"apn": "internet",
"pdp-type": "ipv4",
"username": "",
"password": "",
"auth": "none",
"no-roaming": false,
"apn-disabled": false
}
root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-serving-system
{
"registration": "registered",
"radio_interface": [
"lte"
],
"plmn_mcc": 204,
"plmn_mnc": 16,
"plmn_description": "Orββ\u0006",
"roaming": true
}
root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-current-settings
{
"pdp-type": "ipv4",
"ip-family": "ipv4",
"mtu": 1500,
"ipv4": {
"ip": "10.195.7.33",
"dns1": "212.2.127.254",
"dns2": "212.2.96.52",
"gateway": "10.195.7.34",
"subnet": "255.255.255.252"
},
"ipv6": {
},
"domain-names": {
}
}
root@OpenWrt:~#
OpenWRT interfaces Luci
Note how the virtual interface is not getting the DHCP
Also note the wwan24 interface is a temp wifi client to my home internet, so I can download packages and such.
ifconfig
root@OpenWrt:~# ifconfig
br-lan Link encap:Ethernet HWaddr 00:5F:67:51:B6:A5
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::25f:67ff:fe51:b6a5/64 Scope:Link
inet6 addr: fd20:f998:e527::1/60 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16390 errors:0 dropped:0 overruns:0 frame:0
TX packets:16477 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1454021 (1.3 MiB) TX bytes:30037832 (28.6 MiB)
eth0 Link encap:Ethernet HWaddr 00:5F:67:51:B6:A5
inet6 addr: fe80::25f:67ff:fe51:b6a5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16575 errors:0 dropped:0 overruns:0 frame:0
TX packets:26387 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1768339 (1.6 MiB) TX bytes:30678216 (29.2 MiB)
Interrupt:5
eth0.1 Link encap:Ethernet HWaddr 00:5F:67:51:B6:A5
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16390 errors:0 dropped:0 overruns:0 frame:0
TX packets:26372 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1454021 (1.3 MiB) TX bytes:30570702 (29.1 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1820 errors:0 dropped:0 overruns:0 frame:0
TX packets:1820 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:149802 (146.2 KiB) TX bytes:149802 (146.2 KiB)
phy1-ap0 Link encap:Ethernet HWaddr 00:5F:67:51:B6:A4
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:518 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:84405 (82.4 KiB)
wwan0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet6 addr: fe80::8479:f18b:e04:f82d/64 Scope:Link
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:383 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:123768 (120.8 KiB)
wwan24 Link encap:Ethernet HWaddr 00:5F:67:51:B6:A5
inet addr:192.168.19.166 Bcast:192.168.19.255 Mask:255.255.255.0
inet6 addr: fe80::25f:67ff:fe51:b6a5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3935 errors:0 dropped:0 overruns:0 frame:0
TX packets:749 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2111783 (2.0 MiB) TX bytes:81716 (79.8 KiB)
root@OpenWrt:~#
/etc/config/network
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 'fd20:f998:e527::/48'
option packet_steering '1'
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 interface 'wan'
option device '/dev/cdc-wdm0'
option proto 'qmi'
option pdptype 'ipv4'
option apn 'internet'
option auth 'none'
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 interface 'wwan24'
option proto 'dhcp'
root@OpenWrt:~#