With these simple configurations, you can perform the network setup on OpenWrt for the ZTE MF79N. Configuring DHCP for eth2 ensures the automatic assignment of IP addresses, while USB mode switching enables the modem’s network functionality.
Install USB Modeswitch
root@Pineapple:~# opkg update
Downloading https://downloads.hak5.org/packages/mk6/190702/Packages.gz
Updated list of available packages in /var/opkg-lists/190702_pineapple
Downloading https://downloads.openwrt.org/releases/packages-19.07/mips_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/1907_base
Downloading https://downloads.openwrt.org/releases/packages-19.07/mips_24kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/1907_packages
Downloading https://downloads.openwrt.org/releases/packages-19.07/mips_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/1907_routing
Bashroot@Pineapple:~# opkg install usb-modeswitch
Package usb-modeswitch (2017-12-19-f40f84c2-2) installed in root is up to date.
BashEdit the USB Modeswitch Configuration File
Navigate to the /etc/usb-mode.json
file and add the following entry for the ZTE MF79N at the end of the file
"19d2:1225": {
"*": {
"t_vendor": 6610,
"t_product": [ 5125 ],
"mode": "StandardEject",
"msg": [ 34 ]
}
}
/etc/usb-mode.jsonThis configuration specifies the necessary parameters for modeswitching, allowing the ZTE MF79N to transition to the desired network mode.
it should look like this
check interface status
now you can check if the interface works correctly, probably its currently DOWN
which is ok for now
root@Pineapple:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
--- snip ---
--- snap ---
13: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 5f:3b:60:00:00:00 brd ff:ff:ff:ff:ff:ff
BashAssign an IP address over DHCP
to it with the OpenWRT dhcp client
root@Pineapple:~# udhcpc -i eth2
udhcpc: started, v1.30.1
udhcpc: sending discover
udhcpc: sending select for 192.168.0.101
udhcpc: lease of 192.168.0.101 obtained, lease time 86400
udhcpc: ifconfig eth2 192.168.0.101 netmask 255.255.255.0 broadcast 192.168.0.255
udhcpc: setting default routers: 192.168.0.1
Bashadd permanent network config for eth2
add eth2 interface to /etc/config/network ( the interface can be different )
check with dmesg which interface you get
config interface 'eth2'
option ifname 'eth2'
option proto 'dhcp'
option dns '8.8.8.8, 8.8.4.4'
/etc/config/networkPlug in the ZTE USB Router
output of dmesg
root@Pineapple:~# dmesg
---- snip ----
---- snap ----
[ 1638.852858] usb 1-1: USB disconnect, device number 19
[ 1638.860391] cdc_ether 1-1:1.0 eth2: unregister 'cdc_ether' usb-ehci-platform-1, ZTE CDC Ethernet Device
[ 1659.119471] usb 1-1: new high-speed USB device number 20 using ehci-platform
[ 1659.324332] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 1659.340015] usb-storage 1-1:1.0: Quirks match for vid 19d2 pid 1225: 1
[ 1659.354214] scsi host0: usb-storage 1-1:1.0
[ 1662.998352] usb 1-1: USB disconnect, device number 20
[ 1664.669459] usb 1-1: new high-speed USB device number 21 using ehci-platform
[ 1664.879602] cdc_ether 1-1:1.0 eth2: register 'cdc_ether' at usb-ehci-platform-1, ZTE CDC Ethernet Device, 5f:3b:60:00:00:00
[ 1664.894248] cdc_ether 1-1:1.0 eth2: kevent 12 may have been dropped
[ 1664.904535] cdc_ether 1-1:1.0 eth2: kevent 11 may have been dropped
[ 1664.921138] usb-storage 1-1:1.2: USB Mass Storage device detected
[ 1664.938806] scsi host0: usb-storage 1-1:1.2
[ 1665.568740] usb 1-1: USB disconnect, device number 21
[ 1665.589516] cdc_ether 1-1:1.0 eth2: unregister 'cdc_ether' usb-ehci-platform-1, ZTE CDC Ethernet Device
[ 1666.399501] usb 1-1: new high-speed USB device number 22 using ehci-platform
[ 1666.634377] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 1666.649404] usb-storage 1-1:1.0: Quirks match for vid 19d2 pid 1225: 1
[ 1666.661721] scsi host0: usb-storage 1-1:1.0
[ 1670.325566] usb 1-1: USB disconnect, device number 22
[ 1671.219562] usb 1-1: new high-speed USB device number 23 using ehci-platform
[ 1671.439610] cdc_ether 1-1:1.0 eth2: register 'cdc_ether' at usb-ehci-platform-1, ZTE CDC Ethernet Device, 5f:3b:60:00:00:00
[ 1671.454146] cdc_ether 1-1:1.0 eth2: kevent 12 may have been dropped
[ 1671.468024] cdc_ether 1-1:1.0 eth2: kevent 11 may have been dropped
[ 1671.500521] usb-storage 1-1:1.2: USB Mass Storage device detected
[ 1671.526190] scsi host0: usb-storage 1-1:1.2
[ 1672.581397] scsi 0:0:0:0: CD-ROM ZTE USB SCSI CD-ROM 2.31 PQ: 0 ANSI: 2
[ 1672.590456] scsi 0:0:0:0: Attached scsi generic sg0 type 5
[ 1672.650434] scsi 0:0:0:1: Direct-Access ZTE MMC Storage 2.31 PQ: 0 ANSI: 2
[ 1672.659765] sd 0:0:0:1: Attached scsi generic sg1 type 0
[ 1672.672069] sd 0:0:0:1: [sda] Attached SCSI removable disk
JSONcheck internet connectivity
root@Pineapple:~# ping megadodo.org -c 4
PING megadodo.org (51.255.232.79): 56 data bytes
64 bytes from 51.255.232.79: seq=0 ttl=49 time=313.202 ms
64 bytes from 51.255.232.79: seq=1 ttl=49 time=59.762 ms
64 bytes from 51.255.232.79: seq=2 ttl=49 time=65.040 ms
64 bytes from 51.255.232.79: seq=3 ttl=49 time=61.236 ms
--- megadodo.org ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 59.762/124.810/313.202 ms
root@Pineapple:~#
Java