Flash on Zyxel NR7101

Ah so this isn't fixable inside:

/lib/netifd/proto/qmi

I wonder?

Would ip monitor report NO-CARRIER and then LOWER_UP on device wwan0? I wrote this script for Asus routers:

#!/bin/sh

renew_wan_lease=0

ip monitor link dev eth0 | while read event; do
	
	# logger "maintain-wan-lease detected eth0 event: "$event

	case $event in

	*'NO-CARRIER'* )
		if [ $renew_wan_lease -eq 0 ]; then
			logger "maintain-wan-lease detected eth0 state change to: 'NO-CARRIER', so forcing udhcpc to release wan lease."
			killall -SIGUSR2 udhcpc
			renew_wan_lease=1		
		fi
	;;

	*'LOWER_UP'* )
		if [ $renew_wan_lease -eq 1 ]; then
			logger "maintain-wan-lease detected eth0 state change from: 'NO-CARRIER' to: 'LOWER_UP', so forcing udhcpc to renew wan lease."
			killall -SIGUSR1 udhcpc
			renew_wan_lease=0
		fi
	;;
	esac

done

So on the forced disconnect we release and then renew on reconnect?

Would this work for this situation?

@bmork I installed ModemManager and all seems well so far, but ought I to be concerned that if I either:

  • issue uqmi commands e.g. to get various signal stats whilst ModemManager; or

  • hot swap SIM card,

things seem to crash and the modem becomes unresponsive until reboot? In that condition I see various ModemManager errors in logread and uqmi commands don't work. All is well again then after a reboot.

I am primarily concerned to verify that this is a software issue and not a hardware fault with my unit. Since if there's a hardware fault I'd like to swap before mounting it outside on our wall.

Also in this state is there a way to reset the modem or something to make things work again without rebooting? I tried restarting wan and restarting ModemManager service but neither worked.

Using uqmi while ModemManager is running is not supported or recommended. You could run qmicli if you make sure both MM and qmicli use the qmi-proxy. It's possible to add proxy support to uqmi as well but I don't think that's been done yet.

And I guess the hardware doesn't support SIM hotswap. It's not a very common feature. This device has two SIM slots and a need for tools to access them. There can't be many requests for hotswapping. Why not put a SIM in each slot and use MM to switch between them?

mmcli -m any --set-primary-sim-slot=2
mmcli -m any --set-primary-sim-slot=1
1 Like

Ah thanks. Sounds like all this is software and I don't need to panic then. Could in theory both SIM slots be used at the one time and data aggregated? Or at least this presumably means a fallback connection could be facilitated.

I'm also curious about voice calls and how that might work. I thought UK providers only whitelist ordinary mobile phones for VoLTE.

No. You'd need twice as many radios for that. The SIM slots are active/passive. The modem resets when switching between them, so it's not a convenient solution for fallback either. Could be done, but the failover will be slow.

Probably. How would you use voice calls with the NR7101?

Is there a way to setup a voice data stream with a LAN client like my Windows desktop?

Nice info bjorn, but i have always been concerned about modemmanager.
Does it have a gui on openwrt, or is it all cli based? also, can it be scripted, or there is a config file you can setup, to make it work, without any other things to do?
Always used ROOter, but im more confident with scripts and configs, but if you have to start a connection manually every reboot, might be nasty.
I presume you can setup the connection and it should reconnect right?
Always talking about modemmanager.

There is luci-proto-modemmanager, which presents a GUI for interface with protocol ModemManager. Just like luci-proto-qmi it allows you to enter APN and username and password and will connect on boot. My hope is that it will in my case also automatically reconnect after my ISP forcibly disconnects me at the 48 hour mark.

ModemManager does seem to me slightly bloated but that is subjective and not based on an understanding of how it is implemented. It has a few dependencies like dbus, which is apparently for inter process communication. One sees a lot of info about what it's doing and warnings and so forth in logread.

I think I might have been able to forego ModemManager and just set 'set-autoconnect' to enabled and then use an ip monitor script to release and renew udhcpc but I'm not sure.

If ModemManager manages the 48 hour reconnect I'll just leave it running.

There is a luci-proto-modemmanager. But I'm not much of a GUI user, so I have no experience with it.

Configuration is like any other OpenWrt interface, using the 'modemmanager' proto and some protocol specific settings:

The hard part for manual configuration is figuring out the long sysfs device path. The easiest way IMHO (if not using luci) is to boot the router with an unconfigured modemmanager installed and run "mmcli -m any" in a shell after all devices has been discoevered (assuming you have only one modem). You'll see something like this (sim-missing is correct here, but obviously not normally expected):

root@OpenWrt:/# mmcli -m any
  -----------------------------------
  General  |                    path: /org/freedesktop/ModemManager1/Modem/2
           |               device id: 0ff633247bcd307113676648ca9c89f6f3ba6e37
  -----------------------------------
  Hardware |            manufacturer: Quectel
           |                   model: RG502Q-EA
           |       firmware revision: RG502QEAAAR11A07M4G
           |          carrier config: Telenor_Norway_Commercial
           | carrier config revision: 0A014300
           |            h/w revision: RG502Q-EA
           |               supported: gsm-umts, lte, 5gnr
           |                 current: gsm-umts, lte, 5gnr
           |            equipment id: 354351110015210
  -----------------------------------
  System   |                  device: /sys/devices/platform/1e1c0000.xhci/usb2/2-1
           |                 drivers: cdc_mbim, option1
           |                  plugin: quectel
           |            primary port: cdc-wdm0
           |                   ports: cdc-wdm0 (mbim), ttyUSB0 (qcdm), ttyUSB1 (gps), 
           |                          ttyUSB2 (at), ttyUSB3 (at), wwan0 (net)
  -----------------------------------
  Status   |                   state: failed
           |           failed reason: sim-missing
           |             power state: on
  -----------------------------------
  Modes    |               supported: allowed: 3g; preferred: none
           |                          allowed: 4g; preferred: none
           |                          allowed: 3g, 4g; preferred: 4g
           |                          allowed: 3g, 4g; preferred: 3g
           |                          allowed: 5g; preferred: none
           |                          allowed: 4g, 5g; preferred: 5g
           |                          allowed: 4g, 5g; preferred: 4g
           |                          allowed: 3g, 5g; preferred: 5g
           |                          allowed: 3g, 5g; preferred: 3g
           |                          allowed: 3g, 4g, 5g; preferred: 5g
           |                          allowed: 3g, 4g, 5g; preferred: 4g
           |                          allowed: 3g, 4g, 5g; preferred: 3g
           |                 current: allowed: any; preferred: none
  -----------------------------------
  Bands    |               supported: utran-1, utran-3, utran-6, utran-5, utran-8, utran-9, 
           |                          eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8, 
           |                          eutran-12, eutran-13, eutran-14, eutran-17, eutran-18, eutran-19, 
           |                          eutran-20, eutran-25, eutran-26, eutran-28, eutran-29, eutran-30, 
           |                          eutran-32, eutran-34, eutran-38, eutran-39, eutran-40, eutran-41, 
           |                          eutran-42, eutran-43, eutran-48, eutran-66, eutran-71, utran-19
  -----------------------------------
  IP       |               supported: ipv4, ipv6, ipv4v6
  -----------------------------------
  SIM      |          sim slot paths: slot 1: none (active)
           |                          slot 2: /org/freedesktop/ModemManager1/SIM/2

and you see the device path listed as "System | device". This can be cut into an interface config in /etc/config/network like this:

config interface 'mm'
        option device '/sys/devices/platform/1e1c0000.xhci/usb2/2-1'
        option proto 'modemmanager'
        option apn 'telenor.smart'
        option pincode '1234'
        option iptype 'ipv4v6'

This will start the connection on every boot, like any other interface configured in "network"

the point with modemmanager, is that, all the juicy stuffs, come from 5.15 kernel.
if it can be configured on a conf file its ok, i use cake-autorate, have no gui, but is quite simple to config. and yeah, i know you hate GUI, but if they work, they are handy.
since boards with both pcie and usb m.2 starting to pop out, having easy MHI to work, would be nice. Probably when openwrt 23 come out, would be interesting.

Do you shape using the NR7101 itself or just pass to a downstream device to shape? I have implemented the latter and of course also use cake-autorate, which seems to work rather well these days.

Actually the nftables egress hook is also not available until kernel 5.16. But for now those for whom this might be useful (e.g. those using VPN pbr) can just make use of appropriate tc calls to build up IFBs for cake.

Nope, i use a downstream owrt router. Zyxel cpu is too weak for such a thing.
Also i still use 21, i don't think owrt is really ready for FW4 and nftable.
Will wait for better times, or might just wait for owrt 23

Times are good! Wake up and smell that nftables brew!

Nah, like a wiseman said, "If it's not broken, Don't fix it!" :joy:

1 Like

image

By the way how do you find this device? I'm rather happy with it. What sort of signal stats and bandwidth do you get?

Since this discussion has drifted off-topic, I'm setting a timer for it to close.
Please open new topics (with appropriate topic title) for any questions not related to flashing OpenWrt on this device.

Thanks!

Ouch, we got scolded! Too bad, was a nice chit chat on 7101.
I guess we gotta open a new thread, 4 Friends, 4 Beers, and a Zyxel 7101, would that be ok? :grinning:
Anyway, Boss spoken, guess should be full of details on how to flash this modem, Rip this thread :frowning:

2 Likes

@bmork The supervisor password is not working anymore on telenor branded NR7101.. Any tips?

It didn't work for me either on my new device but I found I could just flash anyway using the Zyxel GUI.

How to flash that without access to GUI?