OpenWrt Support for Armor G5 (NBG7815)

I'll try that soon, but first I tried the .itb file in your github account and it worked. Then I installed the .bin file with the sysupgrade command. It went into a reboot loop again.

Here are the steps I did:

NBG7815> ATSE NBG7815
013D72FF0710
NBG7815> ATEN 1,10F1ED65
NBG7815> ATGU

setenv serverip 192.168.10.1
setenv ipaddr 192.168.10.10

tftpboot openwrt-ipq807x-generic-zyxel_nbg7815-initramfs-fit-uImage.itb

bootm

sysupgrade -n /tmp/openwrt-ipq807x-generic-zyxel_nbg7815-squashfs-sysupgrade.bin

Why do I get the same error when I install with sysupgrade?

1 Like

Do not use sysupgrade, use dd instead.
It's because sysupgrade configuration needs some changes,

Check if you have correct root file, should be the same as root

then execute commands:

dd if=/dev/zero of=/dev/mmcblk0p8

dd if=YOUR_ROOT_FILE of=/dev/mmcblk0p8

3 Likes

Thanks a lot for your help, I'm looking forward to the new version. :blush:

2 Likes

Hi, I tried again today, I did the same operations from the beginning. No problem this time. Some flaws I've seen:
Wifi channels are very few.
Wifi 5ghz only allows UNII-1 channels (36,40,44,48).
There is no 160mhz in AC mode.
When I set the LED, the device restarts.
Probably not working on fan. (I am not sure)
I don't have a 10 gigabit and 2.5 gigabit supported computer, I don't know if it works, but it works fine as 1 gigabit.
Thanks a lot for your work, I hope these problems are solved :slight_smile:

https://youtu.be/cIOoOrgZvNw

4 Likes

So apart from the wifi issues if I ask my ISP for 2gbps ont I can purchase this router, put openWrt and all routing stuff should work on 2gbps both ways already?

Still seems cheapest actual router with multiple 2.5Gbps+ ports, at least in EU.

From my experience to break 1gbps with wifi in real world one needs 160hz ceiling mounted AP anyways.

ipq807x OEM firmwares rely heavily on proprietary NSS offloading, which is unlikely to be merged officially into OpenWrt.

For >1 GBit/s routing, you really want to look into x86_64.

I made sysupgrade-compatible package(tested on my Armor G5), so:

  1. Link to repository with Openwrt supporting Armor G5:
    https://github.com/itorK/openwrt/tree/nbg7815

  2. Link to latest images:
    https://github.com/itorK/openwrt/releases

Image for Armor G5 has name openwrt-ipq807x-generic-zyxel_nbg7815-squashfs-sysupgrade.bin

News:
I get some issues with flashing rootfs like @altuntepe mention in post earlier,
after some investigations i discovered that is problem with mmc hs400 > h200 speed switch (similiar problem as in qnap 301w)

emmc in armor g5 like to be crashed if working in hs400 mode, so in dts file I remove this mode.

Important:
If you flashing with dd from original firmware to openwrt, do cleanup 2 or 3 times and flash 2 or 3 times -> for sure that is happened.

Fan should be working at now.

5 Likes

I had the opportunity to try it today. I installed version 2022-11-20-0140 on Luci. It was installed without any problems. As far as I can see, the first 5ghz wifi card now seems to support more bands, but it still doesn't work except for the 36-40 band. The second 5ghz wifi card has less band options, as before.

Another issue I noticed is that 10 gigabit ports cannot go over 550 megabits. Could it have something to do with the Aquantia driver? I can get 1 gigabit with other ports without any problem.

1 Like

For the temperature sensors you need to add kmod-hwmon-tmp103 to the default packages

also (from checking your tree) for bluetooth dont modify the kernel config, there are already kmod packages(kmod-bluetooth) for bluetooth but i dont think ath11k has bluetooth coexistence in the driver

2 Likes

Dear sir
i use ttl connect NBG7815
it show NBG7815>
how can i change to root@NBG7815#
tks

It is explained in detail here.

1 Like

Dear altuntepe:

When i press f

etc folder do not have
openwrt_release file

If i keyin passwd ,it show root password do not changed

How to change root passwd

If i enter

tftpboot 0x44000000 192.168.1.99:openwrt-ipq807x-generic-zyxel_nbg7815-initramfs-fit-uImage.itb && bootm

It show do not know tftpboot command.

Is there any Tutorial

Thanks a lot

What to do from the beginning with stock software installed on the device:

1- Disconnect all LAN/WAN cables from the device.
2- Press and hold the reset button until the orange light
3- After about 5 minutes, the led will turn dark blue.
4- Now plug in the lan cable, make a Telnet connection with Putty to 192.168.123.1. (port 23)
5- It will ask for username: root
Password: nbg7815@2019 (copy and paste with right mouse click)
6- now copy and paste the following commands one by one in the same way:

uci set dropbear.setting.enable=1
uci commit dropbear
uci set network.general.auto_ip_change=0
uci commit network

After entering the command below, we will add # in front of the required parts as in the picture.

vi /etc/init.d/preboot

ss

*** To add #, press the i key after entering the above command. Use the arrow keys and add # to the required parts. Press ESC after adding them all. Then type :w and press enter. Exit edit mode by pressing CTRL+Z. For process control, you can enter vi /etc/init.d/preboot command again and check. ***
7- Unplug the device and plug it back in and start again. Congratulations, you can now connect to the device with Putty (SSH) and WinSCP (SCP). We typed the username and password in the previous commands, it's the same.

8- Now let's move on to the Openwrt installation.
9- Enter the commands below, then take your backups to your computer with WinSCP.

mkdir /tmp/ApplicationData/backup
mkdir /tmp/ApplicationData/openwrt
dd if=/dev/mmcblk0p7 of=/tmp/ApplicationData/backup/hlos_blk0p7.bin
dd if=/dev/mmcblk0p8 of=/tmp/ApplicationData/backup/rootfs_blk0p8.bin

10- Extract the "kernel" and "root" files with 7zip from the openwrt.bin file, and put them in the /tmp/ApplicationData/openwrt folder of the device with WinSCP.
11- Install openwrt on the device by entering the following commands:

dd if=/dev/zero of=/dev/mmcblk0p7
dd if=/tmp/ApplicationData/openwrt/kernel of=/dev/mmcblk0p7
    
dd if=/dev/zero of=/dev/mmcblk0p8 
dd if=/tmp/ApplicationData/openwrt/root of=/dev/mmcblk0p8

12- Unplug the device and plug it in, Openwrt is installed.
**There is no Luci web interface, so you cannot access it from 192.168.1.1. Edit the network file with WinSCP, after connecting the device to the internet, you can install the Luci interface by entering the following commands with Putty:

opkg update
opkg install luci

thanks @itorK All the work belongs to him.

1 Like

thanks altuntepe
i'll try it ,tomorrow

(do u use openwrt-ipq807x-zyxel nbg6817-sysupgrade.bin of @itorK )

I've added temp103 module to repository and fan control.

For fan default values are:

root@OpenWrt:~# uci show fanctld
fanctld.config=fanctld
fanctld.config.Enabled='1'
fanctld.config.Delay='20'
fanctld.config.Hits='3'
fanctld.config.TempTrig='73000'
fanctld.config.TempClr='68000'

Fan is enabled where temperature reach 73 degrees on minimum one sensor and stops where temp lower then 68 on all sensors.

Simply test:

fanctl start
fanctl stop

I noticed that there's diffrence with GPIO fan pin on stock firmware vs openwrt.
stock firmware -> GPIO PIN 21
Openwrt -> GPIO PIN 430

Why is GPIO so high at ours openwrt?

3 Likes

One issue on your tree, you added the TMP103 package to the target default packages not the device packages

For the bluetooth chip you need to add

&blsp1_uart3 {
	status = "okay";
}

With the fan GPIOs your DTS probably needs a mux to fix it, this was in the zyxel gpl DTS

	GPIO 21 and 22 - enable FAN1 and FAN22
	GPIO 25 and 26 - read RPM from FAN
	GPIO 31 - QCA8081 reset
	GPIO 32 - USB1_EN
	GPIO 37 - QCA8075 reset
	GPIO 54 - RESET BUTTON
	GPIO 59 - QCA8081 Interrupt
	GPIO 60 - LED enable - LED enable to LED board
	gpio_pins: gpio_pinmux {
		mux_1 {
			pins = "gpio21", "gpio22", "gpio32", "gpio31", "gpio37", "gpio60";
			function = "gpio";
			drive-strength = <2>;
				output-high;
				bias-disable;
		};
		mux_2 {
			pins = "gpio25", "gpio26", "gpio44", "gpio54", "gpio59";
			function = "gpio";
				input-enable;
				bias-disable;
		};
	}; 
1 Like

Claryfication -> Fan is working without problems(GPIO PIN is correct), but problem is with the huge range of GPIO

GPIO chip 200f000.spmi:pmic@0:gpio@c000 starts from GPIOs 430 and fan is at 463

root@OpenWrt:/sys/class/gpio# ls
export       gpio463      gpiochip430  gpiochip442  unexport

with stock firmware fan is at gpio21

BTW. gpio_pinmux is supported only in stock firmware

EDIT: Ok, I got it, driver in stock firmware has been customized and set base to 0 instead -1

1 Like

tanks a lot

thanks altuntepe , @itorK
with ur help i have install opnwrt in nbg7815
but there some errors show

when i run opkg update

*** Failed to download the package list from https://downloads.openwrt.org/snapshots/targets/ipq807x/generic/packages/Packages.gz
opkg_download: Failed to download https://downloads.openwrt.org/snapshots/targets/ipq807x/generic/packages/Packages.gz, wget returned 8.

then i run opkg install luci

Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency libip4tc2 for firewall
 * pkg_hash_check_unresolved: cannot find dependency libip6tc2 for firewall
 * pkg_hash_check_unresolved: cannot find dependency libiptext0 for firewall
 * pkg_hash_check_unresolved: cannot find dependency libiptext6-0 for firewall
 * pkg_hash_check_unresolved: cannot find dependency libxtables12 for firewall
 * pkg_hash_check_unresolved: cannot find dependency kmod-ipt-core for firewall
 * pkg_hash_check_unresolved: cannot find dependency kmod-ipt-conntrack for firewall
 * pkg_hash_check_unresolved: cannot find dependency kmod-ipt-nat for firewall

some package can't find

          yauger

That's expected. ipq807x support is not merged into OpenWrt proper yet, meaning there are no ipq807x target specific package repositories yet - and as with all other custom/ community builds, the kernel module dependencies are unique and not fullfilled by the official repos anyways.

If you want to install (target-/ kernel specific) features, you will need to build them (and everything else you may want) from source yourself (directly into your own sysupgrade images) - or wait for ipq807x- and nbg7815 support to become official (may take months+).