OpenWrt Forum Archive

Topic: Linksys WAG160N - firmware

The content of this topic has been archived on 28 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

I have a Linksys WAG160N v2 and I managed to access console and to save "ath_data" information as explained at:
http://wiki.openwrt.org/toh/linksys/wag160n

Now the questions for you are:

-which openwrt should I use for this device ?
  Since there was not a direct link, I looked at following URL:
  http://downloads.openwrt.org/backfire/10.03/brcm63xx/
  but I've no idea which could be the right image

- the openwrt wag160n webpage says:
  "Before flashing OpenWrt make sure to backup "ath_data" (/dev/mtdblock4). It's calibration data for
  wireless device. You have to include this data into OpenWrt, and modify ath9k driver to read it durning
  device initialisation."
  unfortunately it does not provide any instruction on restore back the saved information once the firmware get flashed...
  Any suggestion ?

Thx,
Andrea

(Last edited by sezb51 on 14 Apr 2011, 20:43)

Hello,

anyone has any suggestion on which openwrt firmware to be used on WAG160N and how to restore the wireless calibration data ?

Please help !!!!

Thx,
Andrea

still no answers....

Since this is supposed to be a supported device then I wonder if this is a wrong place to ask this specific question.

Thx,
Andrea

I think it's an error in the device list page. I have a WAG160N v1 and it does not seem to be supported.
I'm hacking a little with the trunk and trying to support the device, for now I have correct handling of the ath_data partition
(I mean I can see it after flashing even if I have to restore it from backup).

If you want to return to original firmware you can flash it from CFE (you need serial).
I did it and restore the ath_data partition correctly.
I summarize what I did,

downloaded original firmware and removed the first 64K of data (the original  firmware is CFE+Firmware, I didn't want to risk to overwrite my CFE)

I flashed it from CFE with the command: flashimage 192.168.1.3:/image.bin
(this mean I have a tftp server on 192.168.1.3)

then to restore the ath_data partition I made a very ugly cut/paste on the serial terminal since I didn't find any command to pull data from network
in the original firmware.

I created a script like this:
#!/bin/bash
hexdump -v -e '64/1 "---%03o"' -e '"\n"' ath_data.backup | sed -e
's/---/\\0/g' -e 's/^/echo -ne "/' -e 's/$/" >> prova.dump/'

then on the firmware console via serial I give a "cd /tmp; cat > regenerate.sh"

then I copied via terminal all the output of the first script that looks like this:
echo -ne "\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0055\0013\0013\0013\0013\0013\0013\0340\0270\0016\0016\0016\0000\0000\0016\0000\0253\0253\0253\0011\0001\0000\0000\0000\0000\0000\0000\0006\0002\0002\0000\0000\0000\0000\0000\0002\0000\0000\0000\0000\0000\0000\0000\0000\0000"
>> prova.dump
echo -ne "\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0200\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0001\0055\0200\0000\0001\0055\0200\0000\0001\0055\0200\0000\0000\0021\0040\0000\0000\0000\0055\0027\0027\0027\0012"
>> prova.dump
....

after that i run regenerate.sh that generate the prova.dump file.
if you see a file prova.dump of exactly 64K you can try to restore it with: cat prova.dump > /dev/mtdblock4


I hope you can find those infos useful.

bye bye
Luigi

1up wrote:

downloaded original firmware and removed the first 64K of data (the original  firmware is CFE+Firmware, I didn't want to risk to overwrite my CFE)

How did you removed the first 64K of data from original firmware?
Thanks!

dd bs=65536 skip=1 if=input-file.bin of=output-file.bin
jow wrote:
dd bs=65536 skip=1 if=input-file.bin of=output-file.bin

Thanks a lot JOW!

The discussion might have continued from here.