Wireless stopped working

Hi all, I'm using OpenWrt on other devices since that now I tried to reborn an old ADSL2+ Wifi router to use in cascade in my current network, the router is a D-Link 2570B B1.
Firstly I've flashed the firmware openwrt-19.07.7-brcm63xx-generic-DSL274XB-F1-squashfs-cfe-EU and everything was working good: ethernet and wifi.. thenI had the brillant idea to flash another firmware to have a try, the firmware was openwrt-19.07.6-brcm63xx-smp-DSL275XB-D1-squashfs-cfe and aftr doing this I've messed up the router.. Wifi stopped working saying that radio0 is not available.. then I decided to come back and flash again the DSL274XB-F1 firmware hoping that everything back working as intended but unfortunately it doesn't work as expected and radio0 still doesn't work..
I tried to reboot, to soft and hard reset, to flash the firmware again multiple times in recovery mode but anything of these methods helped me..
I tried also to update opkg packages and install ath-9k from scratch with wpad-mini (removing wpad-basic that was installed) with no luck. I tried also to usi the uci commands sequence to force the regeneration of the wireless config with no luck..
Trying to upload a config/wireless using scp, this file was from a previous backup of the first working installed openwrt firmware, the same I'm trying to let it work again, and indeed doing this the wireless section appears in the luci gui but radio0 still does not work.

Why this firmware worked at first time and does not in the next ?

lsmod shows ath9k is correctly loaded, no dmesg errors.

lspci shows the following:

00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device 6328
01:00.0 Ethernet controller: Qualcomm Atheros AR5008 Wireless Network Adapter (rev 01)

iw list shows nothing..
/etc/config does not contain any wireless file
iwinfo says: "Segmentation fault"

the following is the /etc/config/wireless backup file from the first 100% working installation (now it doesn't work anymore using the same firmware):

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11g'
	option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
	option htmode 'HT20'
	option txpower '19'
	option channel 'auto'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'
	option disabled '1'

config wifi-iface 'wifinet1'
	option ssid 'MokaPhone'
	option device 'radio0'
	option mode 'sta'
	option key 'password123'
	option network 'wwan'
	option encryption 'psk2'

You might have gotten lucky with your first attempt (unless it's documented that that image works for your model too?).

Most probably the first device has a flash layout matching that of your device, while the second does not. You should check the flash layout for both images.

It sounds like you overwrote part of the flash containing wireless calibration data. It also sounds like you didn't back up any part of the stock flash contents though? You can more or less restore that calibration data from another identical device, but the data is radio/device specific so it will be good enough but not like before. With a bit of luck though you won't notice.

Ath9k often refers to the calibration data as ART (Atheros Radio Table).

Hello and thank you for the reply.

The device on which I've flashed the firmware is the same, a D-Link DSL2750B ver.B1 -the infostrada one- (I don't have others).. so I really don't understand what it could happened.
Reading on the internet I found a guy that had used the firmware openwrt-19.07.7-brcm63xx-generic-DSL274XB-F1-squashfs-cfe-EU.bin so I wanted to try and at the first everything had working well (ethernets and wifi); then trying to flash another firmware and the wireless stopped working.
I thought that using again the first fw (openwrt-19.07.7-brcm63xx-generic-DSL274XB-F1-squashfs-cfe-EU.bin) the wifi would have returned to work well instead it doesn't happened and now I'm stuck with this issue.

Any ideas about how to recalibrate ART?

Other infos:

root@OpenWrt:~# lspci
00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device 6328
01:00.0 Ethernet controller: Qualcomm Atheros AR5008 Wireless Network Adapter (rev 01)
root@OpenWrt:~# dmesg | grep 01:00.0
[    0.432316] pci 0000:01:00.0: [168c:ff1c] type 00 class 0x020000
[    0.432416] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x0000ffff 64bit]
[    0.432637] pci 0000:01:00.0: supports D1
[    0.432658] pci 0000:01:00.0: PME# supported from D0 D1 D3hot
[    0.440219] pci 0000:01:00.0: BAR 0: assigned [mem 0x10f00000-0x10f0ffff 64bit]
[    0.521304] pci 0000:01:00.0: invalid calibration data

As expected, you did overwrite the device specific calibration with garbage, preventing the wireless card from initializing (which is fatal).

Flashing again the D-Link original firmware could help me fix this?
Otherwise is there any other method?

Try that, although the ART is device specific, so the firmware image might not carry it. It's definitely worth trying but you might need to flash an ART backup from someone else's 2570B B1.

Restoring the original D-Link firmware the wireless works.. Is there a way to "erase/clear" the ART so doing another flash of the openwrt firmware again can write it from scratch?

other infos:

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00010000 00010000 "cfe"
mtd1: 007c0000 00010000 "linux"
mtd2: 0018e510 00010000 "kernel"
mtd3: 006319f0 00010000 "rootfs"
mtd4: 003d0000 00010000 "rootfs_data"
mtd5: 00010000 00010000 "cal_data"
mtd6: 00020000 00010000 "nvram"

Otherway, is it possible to connect a wifi-usb adapter and use it as my new wifi interface?


but same issue as here: Archer C7 AC1750 ver. 5 USB wifi dongle

1 Like

I'll read it, thank you frollic.


it seems that on my device usb port is not enable.. what packages should I install to let it work?

I'd buy a cheap used router, and use as AP.

Would 1st make sure it was supported by openwrt :wink:

Ineed.. my intention was to let my actual old router works :smiley: but it seems to be too complicated for the scope.

depends on what kind of device you're inserting into the usb port.

the dongle: usb 3.0/2.0, 2.4/5ghz, chipset RTL8812BU

the router has a 2.0 usb port but it seems that there is any package installed to let it work.. what packages should I install to enable the usb port on the router?

start with kmod-rtl8812au-ct

OpenWrt does not wipe your ART. You can wipe that yourself if you'd like (and likewise restore it). It will not be regenerated in any way (calibration is done by the manufacturer).

Examples below assume mtd5 (named cal_data) contains your calibration data, but you need to be sure that's what it actually is (although it doesn't hurt to back up the flash layout together with all the partitions on your flash).

# dd if=/dev/mtd5 of=/tmp/mtd5-caldata.mtd


# opkg update && opkg install kmod-mtd-rw
# insmod /lib/modules/$(uname -r)/mtd-rw.ko
# dd if=/tmp/mtd5-caldata.mtd of=/dev/mtd5
1 Like

package installed but it seems it is not recognized because I don't see any usb adapter or interface available, what Am I missing?

root@OpenWrt:~# dmesg  | grep usb
[   15.783743] usbcore: registered new interface driver usbfs
[   15.789703] usbcore: registered new interface driver hub
[   15.795420] usbcore: registered new device driver usb
[   17.703303] usbcore: registered new interface driver rtl8812au
root@OpenWrt:~# lsusb
unable to initialize libusb: -99

If your internal Atheros wireless still works well enough by any means please use that. USB dongles are hit and miss and Realtek makes that even worse, their drivers are shitty and little more than dumps of code often.