Asus 4G-AX56 not yet supported

Well, you still have private IPv4 assigned even with internet4 APN mentioned on the operator's page.
At the same time you have IPv6 interface id - 0.0.0.0.0.0.0.0.220.128.224.52.183.227.52.149, similar to what we've seen on Fibocom FM350.

With the proper connection script you should be able to obtain the proper (public, routable) IPv6 address.

Is there such a script somewhere available?

Or would it still be good idea to update Fibocom FW first?

I don't think you will find a ready to use script anywhere, while the necessary procedure (if I'm not mistaken) is used in one of the unofficial fm350 scripts.
In regards to firmware update - they don't share it, we don't know how to apply it to the modem in the router that runs OpenWrt. I would stay away from Fibocoms.

Yeah. Or any chinese.

Some documentation did say there is AT command to do it, but unfortunatelly did not tell details.

If it seems not possible to do it this way, what's possible next? Once I had it done by running Anydesk or similar on a Windows device behind router, but that's what I'm thying to avoid now. Would like to have it all in one router without any other gear.

B.T.W: Updates seem to be here:

but it takes some approval from Fibocom to download them.

Actually I have to get a new SIM card having public address first. I suppose it is the easies way to go ahead in this matter and I (or actually ny wife) need it anyways.

I just had high hope this could be up and running using present SIM, but it seems to be impossible.

What happened now:

root@OpenWrt:~# opkg update
Downloading https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/kmods/6.6.50-1-a344cf3b12089ff23286afa2379054f0/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_kmods
Downloading https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/kmods/6.6.50-1-a344cf3b12089ff23286afa2379054f0/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/luci/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/routing/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/telephony/Packages.sig
Signature check passed.
root@OpenWrt:~# opkg install luci-ssl
Package luci-ssl (23.035.26083~7550ad6) installed in root is up to date.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 6.6.51~a344cf3b12089ff23286afa2379054f0-r1) for kmod-nf-reject
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 6.6.51~a344cf3b12089ff23286afa2379054f0-r1) for kmod-nf-reject6
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 6.6.51~a344cf3b12089ff23286afa2379054f0-r1) for kmod-nf-log
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 6.6.51~a344cf3b12089ff23286afa2379054f0-r1) for kmod-nf-log6
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 6.6.51~a344cf3b12089ff23286afa2379054f0-r1) for kmod-crypto-crc32c
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 6.6.51~a344cf3b12089ff23286afa2379054f0-r1) for kmod-nft-core
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 6.6.51~a344cf3b12089ff23286afa2379054f0-r1) for kmod-nf-flow
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 6.6.51~a344cf3b12089ff23286afa2379054f0-r1) for kmod-nf-ipt
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 6.6.51~a344cf3b12089ff23286afa2379054f0-r1) for kmod-ipt-core
root@OpenWrt:~# opkg list-installed kernel
kernel - 6.6.50~a344cf3b12089ff23286afa2379054f0-r1

Why again version mismatch between 6.6.50 and 6.6.51?

if you want to avoid it, maintain your own kmod repo.

Original distfeeds have it "6.6.50-1-a344cf3b12089ff23286afa2379054f0"

. /etc/os-release
KERNEL="$(opkg list-installed kernel)"
cat << EOF >> /etc/opkg/distfeeds.conf
src/gz openwrt_kmods http://downloads.openwrt.org/\
snapshots/targets/${OPENWRT_BOARD}/kmods/${KERNEL##* }
EOF

gives "6.6.50~a344cf3b12089ff23286afa2379054f0-r1" witch is not available and then fails.

But opkg try to install 6.6.51 version. Three different versions.

Nice. It's all messing up again.

Can I install those few packages manually avoiding opkg trying to install those wrong 6.6.51 version files? And without first setting up a http server to host those packages?

OK. I get the point. It's the luci-ssl package which has updated and is dependent on those 6.6.51 kernel modules which are then dependent on the kernel version.

It does not take that much point to keep old versions of kernel modules while old versions of those other files are not available.

Also maintaining an own kmod rep does not resolve it without keeping an own rep of everything it takes.

What should I do now, while the modem connects to the internet at router bootup as it should, but getting signal and other information in Luci takes command:

mmcli -e -m /org/freedesktop/ModemManager1/Modem/0

run from command line?

It's in cdc_ether state.

Asso if I reset it by mmcli -r -m /org/freedesktop/ModemManager1/Modem/0

it ends up to the same state. Internet OK but state in Luci "disabled".

Get rid of MM completely.
Consider using https://github.com/4IceG/luci-app-3ginfo-lite

That did not help at all. This 3ginfo does not get any information at all.

Wwan interface is up even when the modem seems to be disabled. Is it the wwan status that prevents needed action to happen?

You need to work with the author to have your modem added.

Not sure I fully understand the issue but what you see is probably a feature of ECM.
You need MBIM or QMI to fully control the modem. ECM is limited.

Main issue is, I need to leave the router for several weeks working alone and I have to trust it can come up if connection is lost for any reason. It has to detect and take actions if there is no connection.

I suppose this is what:

/usr/lib/ModemManager/connection.d/10-report-down

is there for.

I just can't trust it does the job if wwan seems to be up but moden "pretends" to be disabled.

See TL-MR6400 V4 - QMI Not working - #14 by AndrewZ

Here are led gpios taken from the original FW:

WWAN-high          gpio9
WWAN-mid           gpio11
WWAN-low           gpio17
LTE               gpio0 (red), gpio3 (yellow), gpio7 (blue), gpio10 (white)
Internet          gpio15 (white), gpio5 (red)
Wlan_5G              gpio16
Wlan_2,4G           gpio13
Power                 gpio14

All active high except gpio0 (LTE red).

WPS_button        gpio4
Reset_button       gpio8

Both active low.

What does it take to get these available in userspace?

Here you have a patch file to add this device:

diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 9654e237a8..fddacbde89 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -486,6 +486,20 @@ define Device/asus_rt-ax53u
 endef
 TARGET_DEVICES += asus_rt-ax53u

+define Device/asus_4g-ax56
+  $(Device/nand)
+  DEVICE_VENDOR := ASUS
+  DEVICE_MODEL := 4G-AX56
+  IMAGE_SIZE := 51200k
+  IMAGES += factory.bin
+  IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | \
+        check-size
+  DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 kmod-usb-ledtrig-usbport \
+        kmod-usb-serial kmod-usb-serial-wwan kmod-usb-net-cdc-ether \
+       kmod-usb-serial-option kmod-mii kmod-usb-net
+endef
+TARGET_DEVICES += asus_4g-ax56
+
 define Device/asus_rt-ax54
   $(Device/nand)
   DEVICE_VENDOR := ASUS
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/boar>index 9a77b1b1bc..d25f1911cf 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
@@ -25,7 +25,8 @@ asus,rp-ac87)
        ucidef_set_led_rssi "rssimed-wlan1" "RSSIMED" "green:rssimed-wlan1" "wlan1" "40" "100"
        ucidef_set_led_rssi "rssihigh-wlan1" "RSSIHIGH" "green:rssihigh-wlan1" "wlan1" "70" "100"
        ;;
-asus,rt-ax53u)
+asus,rt-ax53u|\
+asus,4g-ax56)
        ucidef_set_led_usbport "usb" "USB" "blue:usb" "usb1-port2"
        ucidef_set_led_wlan "wlan2g" "WiFi 2.4GHz" "mt76-phy0" "phy0tpt"
        ucidef_set_led_wlan "wlan5g" "WiFi 5GHz" "mt76-phy1" "phy1tpt"

combined with this mt7621_asus_4g-ax56.dts file:

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "mt7621.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>

/ {
	compatible = "asus,rt-ax53u", "mediatek,mt7621-soc";
	model = "ASUS RT-AX53U";

	aliases {
		led-boot = &led_power;
		led-failsafe = &led_power;
		led-running = &led_power;
		led-upgrade = &led_power;
		label-mac-device = &gmac0;
	};

	chosen {
		bootargs = "console=ttyS0,115200";
		bootargs-override = "console=ttyS0,115200";
	};

        leds {
                compatible = "gpio-leds";

                led_power: power {
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_POWER;
                        gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
                };

                wlan2g {
                        label = "blue:wlan2g";
                        gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "phy0tpt";
                };

                wlan5g {
                        label = "blue:wlan5g";
                        gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
                        linux,default-trigger = "phy1tpt";
                };
	};

	gpio-export {
		compatible = "gpio-export";

                modem_rssi_low {
                        gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
			gpio-export,name = "modem-rssi-low";
			gpio-export,output = <0>;
		};

                modem_rssi_medium {
                        gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
                        gpio-export,name = "modem-rssi-medium";
                        gpio-export,output = <0>;
                };

                modem_rssi_high {
                        gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
                        gpio-export,name = "modem-rssi-high";
                        gpio-export,output = <0>;
                };

                modem_internet_white {
                        gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
                        gpio-export,name = "modem-internet-white";
                        gpio-export,output = <0>;
                };

                modem_internet_red {
                        gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
                        gpio-export,name = "modem-internet-red";
                        gpio-export,output = <0>;
                };

                modem_LTE_red {
                        gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
                        gpio-export,name = "modem-LTE-red";
                        gpio-export,output = <1>;
                };

                modem_LTE_yellow {
                        gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
                        gpio-export,name = "modem-LTE-yellow";
                        gpio-export,output = <0>;
                };

                modem_LTE_blue {
                        gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
                        gpio-export,name = "modem-LTE-blue";
                        gpio-export,output = <0>;
                };

                modem_LTE_white {
                        gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
                        gpio-export,name = "modem-LTE-white";
                        gpio-export,output = <0>;
                };
        };

        keys {
                compatible = "gpio-keys";

                key-restart {
                        label = "reset";
                        gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_RESTART>;
                };

                key-wps {
                        label = "wps";
                        gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_WPS_BUTTON>;
                };
        };
};

&nand {
	status = "okay";

	mediatek,nmbm;
	mediatek,bmt-remap-range =
		<0x000000 0x7e0000>,
		<0x35e0000 0x7800000>;

	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		partition@0 {
			label = "u-boot";
			reg = <0x0 0x80000>;
			read-only;
		};

		/*
		 * u-boot gets split here while keeping u-boot read-only,
		 * which allows safe usage of fw_setenv
		 */
		partition@80000 {
			label = "u-boot-env";
			reg = <0x80000 0x60000>;
		};

		partition@e0000 {
			label = "nvram";
			reg = <0xe0000 0x100000>;
			read-only;
		};

		partition@1e0000 {
			label = "factory";
			reg = <0x1e0000 0x100000>;
			read-only;
			nvmem-layout {
				compatible = "fixed-layout";
				#address-cells = <1>;
				#size-cells = <1>;

				eeprom_factory_0: eeprom@0 {
					reg = <0x0 0xe00>;
				};

				macaddr_factory_4: macaddr@4 {
					reg = <0x4 0x6>;
				};

				precal_factory_e10: precal@e10 {
					reg = <0xe10 0x19c10>;
				};
			};
		};

		partition@2e0000 {
			label = "factory2";
			reg = <0x2e0000 0x100000>;
			read-only;
		};

                partition@3e0000 {
                        label = "kernel";
                        reg = <0x3e0000 0x400000>;
                };

                partition@7e0000 {
                        label = "ubi";
                        reg = <0x7e0000 0x7020000>;
                };

		/* Last 8M are reserved for NMBM management (bad blocks) */
	};
};

&pcie {
	status = "okay";
};

&pcie1 {
	wifi@0,0 {
		compatible = "mediatek,mt76";
		reg = <0x0000 0 0 0 0>;
		nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
		nvmem-cell-names = "eeprom", "precal";
		mediatek,disable-radar-background;
	};
};

&gmac0 {
	nvmem-cells = <&macaddr_factory_4>;
	nvmem-cell-names = "mac-address";
};

&gmac1 {
	status = "okay";
	label = "wan";
	phy-handle = <&ethphy0>;

	nvmem-cells = <&macaddr_factory_4>;
	nvmem-cell-names = "mac-address";
};

&ethphy0 {
	/delete-property/ interrupts;
};

&switch0 {
	ports {
		port@1 {
			status = "okay";
			label = "lan1";
		};

		port@2 {
			status = "okay";
			label = "lan2";
		};

		port@3 {
			status = "okay";
			label = "lan3";
		};

                port@4 {
                        status = "okay";
                        label = "lan4";
                };
	};
};

&state_default {
	gpio {
		groups = "i2c", "uart2", "uart3", "jtag", "wdt";
		function = "gpio";
	};
};


It does install all drivers to add Fibocom modem. Network works, wlan works, power and WiFi leds are driven by kernel and all LTE/internet related leds are exported to user space.

Reset and WPS buttons are untested because I don't remember how to do it, but gpios should be correct. I just dont know if they are active high or low.

It still needs some user space scripts or any thing to combine modem with corresponding leds. I don't know how to do this either.

Also modem is left in NCM state by the original firmware. It needs command:

echo -e "AT+GTUSBMODE=34\r\n" > /dev/ttyUSB0

to put it in ether_cdc state.

Does anybody know if there is any AT command to enable this modem?

It still works fine, but in Luci modem status is "disabled". Actually it is not, because data goes fine both directions. Only signal strength and other information is missing.

It can be enabled by command "mmcli -e -m <path_to_modem>" but is there any other way to do it? What does "mmcli -e" do?

You can try these, it´s working with the Fibocom FM350 modem.
Use picocom or minicom to access your modem.

ATI
AT+CFUN=?
AT+CREG=?
AT+CGREG=?
AT+CEREG=?
AT+CGEREP=?
AT+CGDCONT?
AT+CGDCONT=?
AT+CGAUTH=?
AT+EIAAPN=?
AT+CTZR=?
AT+CGACT=?
AT+CGCONTRDP=?
AT+GTDNS=?

AT+CSQ
AT+CESQ

AT+CFUN=0
AT+CFUN=1

The second last command will put the modem in flight mode and the last one will off-flight mode the modem.
Hopefully will we see what unsolicited results code are used during modem setup.

You can also try AT+CLAC to veiw "all" AT-commands.