OpenWrt support for Xiaomi AX9000

can some one explain how does one create a file from the linux terminal line sorry never used linux before THIS STEP I DONT UNDERSTAND please help out a brother

  1. Paste the [entire command into a linux terminal to generate a new BDF file board-2.bin compressed.

Just open a terminal like e.g. Konsole, Yakuake ..., paste the entire command, execute / press enter and you'll receive a generic-ax9000.tar.gz which you'll scp to root directory / on the router and
tar -xzvf generic-ax9000.tar.gz
(step
cd /lib/firmware/ath11k/QCN9074/hw1.0 && mv ./board-2.bin ./board-2.bin_stock
before

got it thanks bro

Thanks - so it seems VLANs can be configured and are working. I will test and report.

1 Like

Is it supposed that the IPQ8074 can just be set to very high 5 ghz channels? Very few were there until I set country to DE. Now these disappeared even though I should be allowed to use these in Germany with 14 dbm at least. I would love to use channel 140 or so... will this be possible in the future?

Well ... it should be possible to get all the channels allowed in your country/region.
But we are facing a problem that ath11 drivers + BDF contains their own DB (regdb) embedded into the BDF (Board Definition File)
And so far Qualcomm is not doing great job at covering all countries and frequencies allowed in each country
They even started to support loading an external regdb for some of the recent devices.
Robi requested from them to support it for used on AX9000 devices -> https://lists.infradead.org/pipermail/ath11k/2023-February/004023.html
and https://bugzilla.kernel.org/show_bug.cgi?id=216832
But when they are going to implement it ... no one knows, and we can see it is not a priority for QCM
Until this will be changed we are a bit stuck with what's there ... so far the US is covered quite well, but for other countries / regions there are reported issues
Having said that I am using channel 157 (country=UK)

Regarding the BDF issue:
Why are we having the linux terminal script and why dont we share the created bin file? Or does the script generate something random every time?
I guess the board2.bin contained in a rom would be identical anyway.

What am I missing here? I am really curious of the reason :slight_smile:
Thanks!

Well ... I am not sure how legal is the file on the pastebin...
The script is not generating anything random / nor using a specific device information.

If it was 110% legal than it would be committed to the official github and it could be added to the generated OpenWRT images
I have a feeling that it might be something that falls under NDA, but someone helped us by sharing it on pastebin

3 Likes

I see! Thanks! :slight_smile:
So if I understand well, the responsibility of actually generating the file remains with us.

It is quite clever, i must give that :slight_smile:

1 Like

got that working! Just added network devices for all VLANs and corresponding bridges to which the APs can be assigned to.

1 Like

thanks for the background info @RobertP . May I confirm that the BDF replacement is for the QCN9024 rather than the IPQ8074 ? Should the BDF for IPQ8074 be replaced as well?

Yes you are right
However, Robi requested ath11k drivers to support loading external regdb for all devices which is a very reasonable and good solution
But so far the biggest problem is with QCN9074 and its "pastebin BDF" which kind of works, but it seems to lack a proper country + wifi channels and txpower content

1 Like

how did you recover ? via uart ? who is holding the pen on the wiki is definetely wrong to lead people to load the wrong image?

I am not sure about the global version, but the Chinese version can be recovered by using the official recovery tool (the bottom most download button) provided by Xiaomi as long as you didn't corrupt the factory U-Boot. You run the tool, select a factory image (downloadable from the same page), select a ethernet card on your computer, then connect the ax9000 with one of its LAN port to the computer. You then hold RESET and turn on the power, until the orange LED flashes then release RESET. The tool should start doing its job and transmit the factory image through TFTP. After sometime, the white LED blinks quickly indicates that the factory image has been flashed into the inactive slot and you can safely cycle the power. If orange LED flashes then the recovery process is failed.

avoid the recovery tool ... has malware ... instead use tftp

Interesting... I haven't tried using pure TFTP but judging from the UI of the recovery tool it's using some sort of TFTP server so I believe something else should also work.

so I decided to get one of this (again) ... regarding the PCI wifi (QCN9074)
with the shipped board2.bin country US can only see lower 160mhz channels ; with the hacked board I can see all of them. For both versions although I get

Mon May  8 12:27:48 2023 daemon.notice hostapd: phy3-ap0: DFS-CAC-COMPLETED success=1 freq=5500 ht_enabled=0 chan_offset=0 chan_width=5 cf1=5570 cf2=0
Mon May  8 12:27:48 2023 kern.info kernel: [  406.574176] IPv6: ADDRCONF(NETDEV_CHANGE): phy3-ap0: link becomes ready
Mon May  8 12:27:48 2023 kern.info kernel: [  406.574438] br-lan: port 5(phy3-ap0) entered blocking state
Mon May  8 12:27:48 2023 kern.info kernel: [  406.579629] br-lan: port 5(phy3-ap0) entered forwarding state
Mon May  8 12:27:48 2023 daemon.notice netifd: Network device 'phy3-ap0' link is up
Mon May  8 12:27:48 2023 daemon.notice hostapd: phy3-ap0: interface state DFS->ENABLED
Mon May  8 12:27:48 2023 daemon.notice hostapd: phy3-ap0: AP-ENABLED

can't connect ..

for the shipped board2.bin (w 160mhz c 36)- shows the ssid but tells me the password is wrong when trying to connect (although i am sure i am typing the password correctly)
for the hacked board2.bin (w 160mhz c 100) - the ssid doesn't display in spite of having on the console that that the interface is enabled.

is anyone seing the above ? any thoughts on how to fix it ..

so i downloaded the linux firmware for qcn9074 git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/linux-firmware.git branch ath10k-20230405

The board2.bin on this repo is providing the right channels and I am able to bring up the interface however only on the lower frequencies (up to 64). This happens both on the 2.7 (included on the repo) and 2.9 firmware

2 Likes

i am now looking at the output of trace-cmd (for mac80211 & cfg80211 & ath11k) in case i find anything i will report back ...anything I should look for let me know

1 Like

What do you mean by hacked? are you referring to the BDF from pastebin?
If so, it might be your wifi config ... on the requested channel there might already be something (DFS check fails so the device is simply refusing to start?
OK - I think I know what it is ... if by writingc 100 means you try to run QCN9024 on the channel 100 :slight_smile:
Could you try to run the QCN9024 device on the lower 5G band (channels 36-64 if I remember correctly on top of my head)
Yes pastebin's BDF shows the upper 5G bands as available, but it didn't work for me either

1 Like