Configure internal LTE/4G modem for ZTE MF286D

Hi,

after some problems getting OpenWrt on this router (thanks to frollic and Leo-PL for help) I'm now configuring the router.

Initially I followed the instructions under "Basic configuration" in the installation instructions for the router from here https://openwrt.org/toh/zte/mf286d, but without success.

I installed the modemmanager and the qmi-protocol and changed the /etc/config/network:

root@OpenWrt:~# opkg update && opkg install kmod-usb-serial kmod-usb-net kmod-usb-serial-wwan kmod-usb-serial-option kmod-usb-net-qmi-wwan kmod-usb-net-cdc-mbim
root@OpenWrt:/# opkg update && opkg install modemmanager
root@OpenWrt:/# opkg update && opkg install luci-proto-qmi

vi /etc/config/network
-> ...
config interface 'lte'
        option proto 'qmi' 
        option device '/dev/cdc-wdm0'
        option pdptype 'IPV4V6'
        option apn 'internet'
        option ipv6 'auto' 
        option pincode '1234'

But I didn't got any connection, most AT-commands didn't worked and none of the uqmi-commands.

I found more information in the forum here https://forum.openwrt.org/t/zte-mf286d-internal-4g-modem/175362 an finally was able to connect to the internet via the LTE/4G modem.

I had to install the modemmanager-protocol and changed the /etc/config/network:

root@OpenWrt:/# opkg update && opkg install luci-proto-modemmanager

vi /etc/config/network
-> ...
config interface 'wwan'
        option proto 'modemmanager'
        option device '/sys/devices/platform/soc/8af8800.usb3/8a00000.dwc3/xhci-hcd.0.auto/usb2/2-1'
        option apn ''
  	    option pincode '1234'
        option auth 'none'
        option iptype 'ipv4'
        option signalrate '5'

config device
        option name 'wwan0'
        option ipv6 '0' 

Now I have access to the internet, but only on the router, a connected laptop has access to the router, but not to the internet, so s.th. is still missing:

root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
	"type": "lte",
	"rssi": -72,
	"rsrq": -11,
	"rsrp": -102,
	"snr": 12.000000
}

root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-serving-system
{
	"registration": "registered",
	"plmn_mcc": 262,
	"plmn_mnc": 3,
	"plmn_description": "o\u0019�\u0005\"�W",
	"roaming": false
}

root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-current-settings
{
	"pdp-type": "ipv4",
	"ip-family": "ipv4",
	"mtu": 1500,
	"ipv4": {
		"ip": "10.115.234.123",
		"dns1": "62.109.121.17",
		"dns2": "62.109.121.18",
		"gateway": "10.115.234.213",
		"subnet": "255.255.255.248"
	},
	"ipv6": {
		
	},
	"domain-names": {
		
	}
}

root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-data-status
"connected"

root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-device-operating-mode
-> not working

root@OpenWrt:~# ip a s wwan0
7: wwan0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
    link/[65534] 
    inet 10.115.234.123/29 brd 10.115.226.215 scope global wwan0
       valid_lft forever preferred_lft forever

root@OpenWrt:~# ping -c 3 quad4.org
PING quad4.org (192.53.161.94): 56 data bytes
64 bytes from 192.53.161.94: seq=0 ttl=43 time=490.206 ms
64 bytes from 192.53.161.94: seq=1 ttl=43 time=170.948 ms
64 bytes from 192.53.161.94: seq=2 ttl=43 time=167.734 ms

--- quad4.org ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 167.734/276.296/490.206 ms

Any idea?

Thanks, kind regards, thg

Is wwan assigned to the wan firewall zone ?

1 Like

no, now yes and it's working :slightly_smiling_face:

Thanks :slight_smile:

1 Like

I am about to get one of these as well, could you share your way of installing the initial basic install?

also, did you look at this QMI tutorial?

Wiki is linked to in the 1st post.

thanks, but I was talking about installing openwrt not LTE protocols. You said you had some problems installing openwrt going through the wiki page. did you do it in a different way and then how did you do it with the help of [frollic] and [Leo-PL]?

you can find it here and possibly the install-instructions will be updated too:

https://forum.openwrt.org/t/cheap-router-with-lte-4g-wifi-2-4-5ghz-and-eth-ports/194651/60?u=wrt4thg

No, haven't seen this, I didn't got the qmi-thing working with the instructions I found here, but I had success with the modemmanager.

No clue where the difference is and no idea which solution is the better one ...

Regards thg

Thanks!
I know there is internal and external antennas that can be selected in stock firmware, how is this done with openwrt?

the "Install instructions" are also in the wiki-article and yes, it didn't worked for me as explained (writing mtd9 failed), see the link I just posted before ...

ok I will use that thread as a guid. hope for the best..

I never flashed openwrt with serial and I will try to use a raspberry pi with its serial pins, do you have any experience in this or you think I should go with a USB serial device?

you do not flash it via serial, you only need to get access to the console via serial. You boot the device via tftp and transfers the firmware with scp/ssh to install it via console.

Should be possible to use a Raspi with the GPIO-pins too, but it needs some software, that makes a serial uart out of it. I'm using an Arduino FT232H USB-serial-converter, but also a USB-TTL CP2102 was mentioned, quite cheap and probably much easier.

no idea too, I just attached the antennas to the router and I think, that I have a quite good signal - at least much better than with my mobile phone.

Just checked it, there seems to be no difference with antennas connected or not:

Antennas attached:
root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
	"type": "lte",
	"rssi": -72,
	"rsrq": -11,
	"rsrp": -102,
	"snr": 12.000000
}

No antennas:
root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
        "type": "lte",
        "rssi": -72,
        "rsrq": -14,
        "rsrp": -105,
        "snr": 11.600000
}

So either the internal antennas are good enough or you have to enable the external antennas?

I checked this today again, three scenarios, no antennas, "original" rod antenna and an external antenna with 3m cable.

First:
There seems to be no "switch" to change between internal antennas and the externals, connected with the SMA connector. I also didn't found anything in the manual, nor in the service manual (found here: https://www.manualslib.com/manual/2807009/Zte-Mf286d.html#product-MF286D ) and not on my screenshot with the antenna-menu (which might be incomplete):

But, if I connect the "real" external antenna to the router, it get's 5 signal LEDs, while it stays with 3 LEDs, when no antenna or the rod ones are connected.

Asking the modem for signal-info, does not give me the answer (or I can not interpret it correctly):


No antenna:
root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
	"type": "lte",
	"rssi": -76,
	"rsrq": -11,
	"rsrp": -104,
	"snr": 12.600000
}

Rod antenna:
root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
	"type": "lte",
	"rssi": -74,
	"rsrq": -9,
	"rsrp": -104,
	"snr": 10.200000
}

External antenna:
root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
	"type": "lte",
	"rssi": -64,
	"rsrq": -13,
	"rsrp": -94,
	"snr": 7.200000
}

Via AT-commands to the modem I get more "understandable" results:

No antenna between:
+CSQ: 20,99
and
+CSQ: 24,99

Rod antenna between:
+CSQ: 20,99
and
+CSQ: 23,99

External antenna between:
+CSQ: 24,99
and
+CSQ: 27,99

So, the SMA-connector for external antennas seems to work and needs no configuration, but to improve the signal quality it needs a good external antenna, probably with cable attached, so that you can place it in a better location.

Regards, thg

Plus it works only for two of 5(!) internal antennas, for the main bands of the modem - so I recommend doing that only in low-signal scenarios - it may be better to relocate whole unit sometimes.

As for setup using uqmi (it is in DEVICE_PACKAGES so no extra installation is needed, this setup is sufficient and should work with most providers, BUT with a caveat that APN set in the modem using AT+CGDCONT must be the same as set here.

config interface 'wan'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
        option auth 'none'
        option apn 'internet'
        option autoconnect '1'
        option pdptype 'ipv4'
1 Like

have a look at the internal view in the service manual:

There is a small "High frequency antenna", placed on the left side of the router, a "Mid and low frequency antenna + WiFi 5Ghz-1" on the right side and a "Diversity antenna + WiFi 5Ghz-2" in the middle of the router.

According to the documentation the SMA-connectors support LTE/4G and 3G only, the left one LTE B7 and B38 (2,5 to 2,7GHz), probably the "high frequency" one and the right connector LTE B1, B3, B8, B20, B28, UMTS B1, B8 and GSM 850/900/1800/1900 (700MHz up to 2,2 GHz), according to "mid and low frequency".

Thus, if you have a bad LTE/4G signal where you placed the router in the house for good WiFi/Ethernet-connection, an external antenna with cable placed at good LTE/4G coverage, should be a very good idea.

I tried my QMI-config with APN (the one the ZTE-router selected with the original firmware) and without, because I will change the provider later, without success.
Maybe I test your config later, it differs a little bit from the one I used.

With the modemmanager no APN is required.

But what is the difference with using QMI or modemmanager, any advantages/disadvantages for one of them?

Thanks, regards, thg

But at the same time it'll likely rid you of some options of carrier aggregation. Not much is lost though, if you'd need to use directional antennas anyway. Plus attenuation of antenna cables can cause fair share of signal loss at these frequencies. Plus, since the external antenna connectors are for different bands, you lose MIMO capability on them if you have weak signal at the internal antennas.

Maybe it was due to IP type, it has to match exactly too.

uqmi is tiny and quick, and you have it from the very start, ModemManager has more options, but takes up a lot of space in comparison.

It's probably not an argument, but if you have qmi you can use my packages (https://github.com/4IceG) for LuCI.

yes, this was my thought too ...

So you mean I should try it again and if it's working, I can remove all the ModemManager-stuff?

yeah already saw this before, the luci-app-sms-tool for example.

What's the reason, why your apps ar not available directly in the app-menu on the router?

Kind regards,

thg

My applications are visible in the new "modem" tab. Sometimes you need to log out or click somewhere in the menu to refresh it and the tab to be visible. That's how it works.