Port to AVM FRITZ!Box 3490

i read but didn't fully understand. so now i reread and try to understand. so i have to build 2 targets: lantiq and that other wasp ath79? place the initramfs image of ath79 to the lantiq opt/ folder together with avm firmware files. i try to do it. but i can't read out: in the end, is 2,4 ghz AND 5 ghz chip working in dual mode like it's designed in the original firmware?


No, it's /opt/wasp.

yes, of course. However, the wireless LED does not give you any feedback (not implemented).

You need to refresh both of my patches, I just pushed some fixes to the dts and the wireless scripts.

That depends a lot on the region, I couldn't find any in Austria when I was looking for such a device.

Strange, with my eBay set to all Austria defaults and a simple query of "bt homehub 5 a" I am getting 38 hits, some even sell already OpenWrt converted units ready to go. Anyway, just saying, those are rock-solid simple VR9 devices great for vectoring VDSL2 use.


everything compiles fine except 3490 wasp. any idea?

mips-openwrt-linux-musl-cpp -nostdinc -x assembler-with-cpp -I/mnt/t420/hdd/software/linux/sources/openwrt/sources/snapshot-fb3490_wasp/build_dir/target-mips_24kc_musl/linux-ath79_generic/linux-4.19.123/arch/mips/boot/dts -I/mnt/t420/hdd/software/linux/sources/openwrt/sources/snapshot-fb3490_wasp/build_dir/target-mips_24kc_musl/linux-ath79_generic/linux-4.19.123/arch/mips/boot/dts/include -I/mnt/t420/hdd/software/linux/sources/openwrt/sources/snapshot-fb3490_wasp/build_dir/target-mips_24kc_musl/linux-ath79_generic/linux-4.19.123/include/ -undef -D__DTS__  -o /mnt/t420/hdd/software/linux/sources/openwrt/sources/snapshot-fb3490_wasp/build_dir/target-mips_24kc_musl/linux-ath79_generic/image-qca9558_avm_fritz3490_wasp.dtb.tmp ../dts/qca9558_avm_fritz3490_wasp.dts
../dts/qca9558_avm_fritz3490_wasp.dts:7:10: fatal error: qca9557.dtsi: No such file or directory
 #include "qca9557.dtsi"
compilation terminated.
make[5]: *** [Makefile:87: /mnt/t420/hdd/software/linux/sources/openwrt/sources/snapshot-fb3490_wasp/build_dir/target-mips_24kc_musl/linux-ath79_generic/image-qca9558_avm_fritz3490_wasp.dtb] Error 1
make[5]: Leaving directory '/mnt/t420/hdd/software/linux/sources/openwrt/sources/snapshot-fb3490_wasp/target/linux/ath79/image'
make[4]: *** [Makefile:20: install] Error 2
make[4]: Leaving directory '/mnt/t420/hdd/software/linux/sources/openwrt/sources/snapshot-fb3490_wasp/target/linux/ath79'
make[3]: *** [Makefile:13: install] Error 2
make[3]: Leaving directory '/mnt/t420/hdd/software/linux/sources/openwrt/sources/snapshot-fb3490_wasp/target/linux'
time: target/linux/install#42.83#14.70#59.62
make[2]: *** [target/Makefile:25: target/linux/install] Error 2
make[2]: Leaving directory '/mnt/t420/hdd/software/linux/sources/openwrt/sources/snapshot-fb3490_wasp'
make[1]: *** [target/Makefile:19: /mnt/t420/hdd/software/linux/sources/openwrt/sources/snapshot-fb3490_wasp/staging_dir/target-mips_24kc_musl/stamp/.target_install] Error 2
make[1]: Leaving directory '/mnt/t420/hdd/software/linux/sources/openwrt/sources/snapshot-fb3490_wasp'
make: *** [/mnt/t420/hdd/software/linux/sources/openwrt/sources/snapshot-fb3490_wasp/include/toplevel.mk:220: world] Fehler 2

edit: fixed this by editing qca9558_avm_fritz3490_wasp.dts: qca9557.dtsi to qca955x.dtsi

please help.

i put ath_tgt_fw1.fw and ath_tgt_fw2.fw in /lib/firmware. openwrt-ath79-generic-avm_fritz3490_wasp-initramfs-kernel.bin in /opt/wasp. but still no wifi. (not lantiq, not ath79).

A quote from one of the posts that I asked you to read:

Edit: To sum up:

  • ath_tgt_fw1.fw needs to go to /opt/wasp, not to /lib/firmware
  • ath_tgt_fw2.fw is not needed - this is replaced by the ath79 openwrt image
  • to start WiFi, you somehow need to load the ath79 image. This is done by running /opt/wasp/upload-wasp.sh

What we didn't discuss yet is how you configure WiFi: The ath79 target has no access to the flash memory, thus configuration within this target is not persistent. To overcome this limitation, the Lantiq stores the configuration files in /opt/wasp/files. The WiFi configuration is thus in /opt/wasp/files/etc/config/wireless, the network in /opt/wasp/files/etc/config/network. If you change any configuration file, you need to delete the file /opt/wasp/config.tar.gz and re-run /opt/wasp/upload-wasp.sh.

The file /opt/wasp/config.tar.gz serves as an overlay that is extracted on the ath79 target to the root filesystem (-> configuration files). Additionally, it contains a script /opt/wasp/files/usr/bin/wasp_script that is executed during the ath79 boot. By default, it disables the DHCP server on the ath79 target which makes no sense.

By default, the ath79 target uses a static IP address of, it can be changed in /opt/wasp/files/etc/config/network.

Upon first start of /opt/wasp/upload-wasp.sh all configuration files are created! I suggest to start with the default configuration for the first time and then continue with configuring the device.

If you want to install additional packages on the ath79 target, you need to place all its files on the lantiq target into /opt/wasp/files and re-create the config.tar.gz file - as it will be extracted to the root folder without further checks, it can contain binaries as well.

Technically, the ath79 target has a boot hook that waits for the upload of the file config.tar.gz by the stage 2 firmware upload.

Edit 2: I pushed a fix for the wrong include in the dts file to my branch, thanks for reporting. I suppose mine built successfully because I didn't clean before running make.

Thank you very much. I will try everything the next days. It's hard to read everything together from some github comments. after success and full understanding i will write a final how-to.

edit: what about the lantiq wifi? should it work out of the box after boot?
edit2: can i ssh into the ath79 target?

this is what i get now. no wlan on lantiq or ath79 yet...

root@router:~# cd /opt/wasp/
root@router:/opt/wasp# ./upload-wasp.sh 
Working on AVM FRITZ!Box 3490
AVM WASP Stage 1 uploader.
Using file     : /opt/wasp/ath_tgt_fw1.fw
Ethernet device: eth0
Checksum       : 0x5bba6771
Done uploading firmware.
Firmware start command sent.
Firmware start command sent.
Firmware upload successful!
AVM WASP Stage 2 uploader.
Using file  : /opt/wasp/openwrt-ath79-generic-avm_fritzbox-3490-wasp-initramfs-kernel.bin
Using Dev   : eth0.1
Using config: /opt/wasp/config.tar.gz

root@router:/opt/wasp# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 5a:0f:d9:63:ee:19 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::580f:d9ff:fe63:ee19/64 scope link 
       valid_lft forever preferred_lft forever
8: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 5a:0f:d9:63:ee:19 brd ff:ff:ff:ff:ff:ff
    inet brd scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fe80::580f:d9ff:fe63:ee19/64 scope link 
       valid_lft forever preferred_lft forever
9: eth0.1@eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
    link/ether 5a:0f:d9:63:ee:19 brd ff:ff:ff:ff:ff:ff

edit3: i dont see a wlan device, or is ath79 doing both: 2,4 and 5 ghz?

root@router:~# lspci -v
00:00.0 PCI bridge: Lantiq MIPS SoC PCI Express Port (rev 01) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 144
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	I/O behind bridge: [disabled]
	Memory behind bridge: 1c000000-1c0fffff [size=1M]
	Prefetchable memory behind bridge: [disabled]
	Capabilities: [40] Power Management version 3
	Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit-
	Capabilities: [70] Express Root Port (Slot-), MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Virtual Channel
	Capabilities: [160] Power Budgeting <?>
	Kernel driver in use: pcieport
lspci: Unable to load libkmod resources: error -12

01:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02) (prog-if 30 [XHCI])
	Flags: fast devsel
	Memory at 1c000000 (64-bit, non-prefetchable) [size=8K]
	Capabilities: [50] Power Management version 3
	Capabilities: [70] MSI: Enable- Count=1/8 Maskable- 64bit+
	Capabilities: [90] MSI-X: Enable- Count=8 Masked-
	Capabilities: [a0] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [150] Latency Tolerance Reporting

So everything is fine, as it seems!

There is no WiFi on the Lantiq!

Yes, you can SSH into the WASP - it's a fully featured OpenWrt, it just doesn't have persistent storage.

Of course you get no WiFi, because it is disabled by default (as with all OpenWrt installations). Just configure it and you're good to go.

Once again: There is no WiFi on the Lantiq!

there is a problem with "find_mtd_chardev "urlader". it doesnt return a value.
edit: there is no "urlader"

root@router:/opt/wasp# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00400000 00040000 "kernel"
mtd1: 1fc00000 00040000 "ubi"

Then you're not using the latest patch - probably, you've overread that:

The reason is that the SPI frequency is set to 50MHz in the dts - this is sometimes too fast, so I reduced it to 10MHz.

ok looking good now :slight_smile:

there is just one typo left.
if [ ! -e "${WASP}/openwrt-ath79-generic-avm_frit${MODEL}_wasp-initramfs-kernel.bin" ]; then

looks like everything is working fine. excellent work!
i have just 1 issue. i get an ip from LAN 1, 2 but not 3, 4. any ideas (only 169.x.x.x)?
in dmesg i can see link up and down on 3 and 4. so i dont think its an hardware issue...

i checked with the original fritzbox firmware. lan 3+4 are working and getting ip adresses!

I haven't really tested LAN, this was a very quick port from the 3390. There are different PHYs on the LAN ports, it's probably a dts issue - maybe rx/tx delays or stuff like that. I'll look into it (and the typo in the shell script, thanks for that).

OK, I refreshed the patches in the branch: The phy-mode property was wrongly set to "sgmii" while it should have been "rgmii". It works for me now, all four ports tested!

NB: I'm always amending the last commit and force-overwriting the branch. That's the reason why the change is always listed as being from Jan 14 - when creating a PR for a new device, the OpenWrt maintainers usually prefer one single commit, that's why I'm using this practice.

great! thank you and for the quick responses and explainations!!! i'm so happy to have a working openwrt on fb 3490! so much better than 3370 in performance. will test LAN now.
about the wifi LED: maybe it can be linked to the wasp eth port on netdev level? i will check that.

You're welcome - I'm happy for any improvements! Did you or will you also test VDSL?

VDSL immediately worked out of the box!
everything is working fine so far.
now i hope your patches will work on each openwrt update.

Great, I've never tested that either.

Hard to say, let's see - as a first step, I'll port the required patches to the 5.4 kernel which is currently in testing (shouldn't be too difficult).

i searched for a working openWRT firmware for the 3490 and google brought me here...
u got it working, can you upload it for me? that would be awesome!


I don't know exactly who you are addressing, but: If you read through this thread, you get a more-or-less-complete guide on how to compile and install yourself. @DocMAX said he will prepare a step-by-step guide once he sorted everything out, so you might just have to wait a little.

Source Code: https://github.com/andyboeh/openwrt/tree/avm_fritz3490 and https://github.com/andyboeh/openwrt/tree/avm_fritz3490_wasp

Depending on your level of knowledge, I suggest the following as reads: