Configure internal LTE/4G modem for ZTE MF286D

so, just tried it:

config interface 'wwan'
        option proto 'qmi'  
        option device '/dev/cdc-wdm0'
        option pincode '1234'
        option auth 'none'
        option pdptype 'ipv4
        option autoconnect '1'

Seems to work:

root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-device-operating-mode
"online"
root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-data-status
"connected"
root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
	"type": "lte",
	"rssi": -68,
	"rsrq": -14,
	"rsrp": -103,
	"snr": 12.000000
}
root@OpenWrt:~# vi /etc/config/network
root@OpenWrt:~# ping -c 3 quad9.org
PING quad9.org (216.21.3.77): 56 data bytes
64 bytes from 216.21.3.77: seq=0 ttl=50 time=190.134 ms
64 bytes from 216.21.3.77: seq=1 ttl=50 time=188.876 ms
64 bytes from 216.21.3.77: seq=2 ttl=50 time=189.587 ms

So I uninstalled the modemmanager and it's protocol, 1,2 MB in size, not that much, but with 15 MB available, it's nearly 10% less. But now the infos about the mobile connection under "Status" are gone ...

yes, I saw this on your screen-shots, but how do I get the "Modem"-tab?

An my question was, why your app are not available via "System" - "Software" from the official repo? For this reason, you have to take care extra about updates of these apps.

"Modem" tab appears automatically when my packages are installed. You don't have to do anything special except what I wrote above.

Why my packages are not in the official repository... good question.

I think there are two reasons:

  1. There was no pressure to add them. Apparently they are not that necessary/useful.

  2. Another reason is frequency of updates. Sometimes it happens that there are several fixes to the package in one day and it is easier for me to quickly add them in one place.

they are not that useless, I would rather say :smile:

I added the repo and installed some of them:

grep -q IceG_repo /etc/opkg/customfeeds.conf || echo 'src/gz IceG_repo https://github.com/4IceG/Modem-extras/raw/main/myrepo' >> /etc/opkg/customfeeds.conf
wget https://github.com/4IceG/Modem-extras/raw/main/myrepo/IceG-repo.pub -O /tmp/IceG-repo.pub
opkg-key add /tmp/IceG-repo.pub
opkg update
opkg install luci-app-sms-tool-js luci-app-3ginfo-lite luci-app-lite-watchdog

But I got an error:

Installing luci-app-sms-tool-js (2.0.21-20240421) to root...
Downloading https://github.com/4IceG/Modem-extras/raw/main/myrepo/luci-app-sms-tool-js_2.0.21-20240421_all.ipk
Installing chat (2.4.9.git-2021-01-04-4) to root...
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/arm_cortex-a7_neon-vfpv4/base/chat_2.4.9.git-2021-01-04-4_arm_cortex-a7_neon-vfpv4.ipk
Installing comgt (0.32-35) to root...
Downloading https://downloads.openwrt.org/releases/23.05.3/targets/ipq40xx/generic/packages/comgt_0.32-35_arm_cortex-a7_neon-vfpv4.ipk
Installing luci-app-3ginfo-lite (1.0.69-20240427) to root...
Downloading https://github.com/4IceG/Modem-extras/raw/main/myrepo/luci-app-3ginfo-lite_1.0.69-20240427_all.ipk
Installing luci-app-lite-watchdog (1.0.15-20240102) to root...
Downloading https://github.com/4IceG/Modem-extras/raw/main/myrepo/luci-app-lite-watchdog_1.0.15-20240102_all.ipk
Configuring chat.
Configuring comgt.
Configuring luci-app-sms-tool-js.
uci: Parse error (EOF with unterminated ') at line 53, byte 61
uci: Parse error (EOF with unterminated ') at line 53, byte 61
Configuring luci-app-3ginfo-lite.
uci: Parse error (EOF with unterminated ') at line 53, byte 61
uci: Parse error (EOF with unterminated ') at line 53, byte 61
Configuring luci-app-lite-watchdog.
uci: Parse error (EOF with unterminated ') at line 53, byte 61
uci: Parse error (EOF with unterminated ') at line 53, byte 61

There was no Modem-tab, even not after reload.

So I reinstalled (accidentally) the non-js-version of luci-app-sms-tool via "System" - "Software" and got, after a reload, the Modem-tab with "Information about..." and twice "SMS messages".

As far as I see, the "Information about..." works now as it should.

The non-js version of the luci-app-sms-tool came configured with "/dev/ttyUSB1" but before checking this, I configured the js-version with "/dev/ttyUSB2" and tested it successfully.

So I removed the non-js-version, but what is the correct configuration, ttyUSB1 or ttyUSB2?

As far as I see, the change from ModemManager to QMI was no problem, it saves some space in memory and I can install some useful tools :slightly_smiling_face:

Thanks a lot, kind regards, thg

1 Like

I don't know what browser you use, but sometimes clearing the cache helps.

I don't know if I remember correctly, but I think I set it to ttyUSB1 everywhere.

Firefox, Linux, it worked after an other reload, when I installed the app via "System" - "Software", I thought the error during installation could have been the reason.

@all: I recognized this already before, I have ttyUSB1 and ttyUSB2, I can connect to both for sending AT-commands, it seems that they work similar. But, are there any differences at all? Why I do have two devices for the modem-connection?

Thanks, thg

I don't know what the exact difference is between these ports. The number of ports depends on the modem and its configuration. Set it to USB1, for example, and that's it.

The installation scripts should have cleared the cache for LuCI, so if there were any errors, it may not have happened and it had to be done manually.

all depends on the antenna you use, I think the ones I use are not that bad.

One of my antennas is a "Mobile Multiband LTE MIMO" with 3m cable SMA, a frequency from 791 MHz to 2600 MHz and 2 x 3 dbi at 800 MHz and 2 x 4,5 dbi at 2000 MHz.

Yes, this may be something you should check for.

Because of the nice tool @IceG created, I checked the antennas again, the router is located at the windows, nearest to the cell tower:

Attached rod antennas:

No antennas at all:

External antenna located at the window:

External antenna located outside:

So, if you have a good external antenna and if you can place it somewhere where you get a better signal, it probably will be a good win. Otherwise it does not help or even can result in a worse signal.

Regards, thg

Hi,

I just noticed, I get an error, when I try to open "Network" - "Interfaces" or "Routing":

If I revert back to the ModemManager, the errors disapears.

Any idea?

Thanks, thg

It would be good if they were available for SNAPSHOT like mesh11sd is.
@bluewavenet is frequently updating mesh11sd and other apps but has them in SNAPSHOT for testing purposes

You must have thought they were useful otherwise you would not have developed them in the first place.

It is simple to create a "release" tag to give a fixed point. That can then be submitted to the OpenWrt package feeds.
You would then continue to develop and fix, all in the same place, ie your repo.

Submitting to OpenWrt is a steep learning curve that is not fundamentally a technical one, but more if a process of meeting standards. The standards are not at all well documented and best understood by first studying in some depth existing pull requests on Github.
But I will say that when you have done it once, the next time becomes easy.

Matching the "standards" means it is much easier for reviewers to assess your code.
There are many ways to organise a repo but if a reviewer has to figure out your layout first, then the likelihood of a merge is going to be very much reduced.

It is up to you whether you can spare the time or have the patience for all this of course.

okay, found it, syntax-error in the "/etc/config/network", a quotation mark was missing.

Nevertheless, everything was working ...

Kind regards, thg

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.