R6400 v1 corrupt CFE variables

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
jamesad
DD-WRT Novice


Joined: 03 Aug 2018
Posts: 12

PostPosted: Fri Aug 03, 2018 21:51    Post subject: R6400 v1 corrupt CFE variables Reply with quote
Can anyone tell me anything about the cfe variables relating to wifi for the r6400? To cut a long story short, I somehow managed to corrupt the board id, mac addresses etc. when flashing my R6400v1 back to stock. I've managed to apply all the /sbin/burn* commands except for "burnrf" as I don't know anything about the parameters.
Googling throws up very little apart from a few discussions that give the impression there are many radio related variables that need restoring. Is this information available and is restoration practical? I've reflashed the router several times since without issue and it seems to be working fine apart from the wifi range being degraded and the authentication being hit and miss which are presumably the consequences. Any pointers gratefully received.
Sponsor
<Kong>
DD-WRT Guru


Joined: 15 Dec 2010
Posts: 4339
Location: Germany

PostPosted: Sat Aug 04, 2018 0:05    Post subject: Re: R6400 v1 corrupt CFE variables Reply with quote
jamesad wrote:
Can anyone tell me anything about the cfe variables relating to wifi for the r6400? To cut a long story short, I somehow managed to corrupt the board id, mac addresses etc. when flashing my R6400v1 back to stock. I've managed to apply all the /sbin/burn* commands except for "burnrf" as I don't know anything about the parameters.
Googling throws up very little apart from a few discussions that give the impression there are many radio related variables that need restoring. Is this information available and is restoration practical? I've reflashed the router several times since without issue and it seems to be working fine apart from the wifi range being degraded and the authentication being hit and miss which are presumably the consequences. Any pointers gratefully received.


DD-WRT and Factory do not destroy your board_data, you must have flashed tomato to it at some point. Unless you have a backup of your board_data you cannot restore all vars, e.g. radio calibration data.

_________________
KONG PB's: http://www.desipro.de/ddwrt/
KONG Info: http://tips.desipro.de/
deslatha
DD-WRT User


Joined: 12 Jul 2016
Posts: 186

PostPosted: Sat Aug 04, 2018 0:29    Post subject: Re: R6400 v1 corrupt CFE variables Reply with quote
[quote="<Kong>"

DD-WRT and Factory do not destroy your board_data, you must have flashed tomato to it at some point. Unless you have a backup of your board_data you cannot restore all vars, e.g. radio calibration data.[/quote].

Kong is right. how ever you can ask some one, but r6400v1 so few, but r6300v2 so identical everything that you can clone on. Or last resort Xvortex r7000s are able to replace with your owner mader. after all, only wifi radio should correct the check your router by: wl revinfo
jamesad
DD-WRT Novice


Joined: 03 Aug 2018
Posts: 12

PostPosted: Sat Aug 04, 2018 8:13    Post subject: Reply with quote
Many thanks for the replies, it is much as I suspected. Yes, it was flashed with Tomato initially. Is the radio calibration data particular to each individual unit, or could it be cloned from another of the same or similar model? Deslatha, this seems to be what you are saying but I'm afraid I don't quite understand your last sentence perhaps you would be be kind enough to explain a bit more?
I am no expert in this stuff, but always happy to learn (Which I have been doing fast over the last few days!).
<Kong>
DD-WRT Guru


Joined: 15 Dec 2010
Posts: 4339
Location: Germany

PostPosted: Sat Aug 04, 2018 8:29    Post subject: Reply with quote
jamesad wrote:
Many thanks for the replies, it is much as I suspected. Yes, it was flashed with Tomato initially. Is the radio calibration data particular to each individual unit, or could it be cloned from another of the same or similar model? Deslatha, this seems to be what you are saying but I'm afraid I don't quite understand your last sentence perhaps you would be be kind enough to explain a bit more?
I am no expert in this stuff, but always happy to learn (Which I have been doing fast over the last few days!).


Calibration data is specific to your unit, using data from a different unit can make it even worse.

_________________
KONG PB's: http://www.desipro.de/ddwrt/
KONG Info: http://tips.desipro.de/
deslatha
DD-WRT User


Joined: 12 Jul 2016
Posts: 186

PostPosted: Sat Aug 04, 2018 10:15    Post subject: Reply with quote
jamesad wrote:
Many thanks for the replies, it is much as I suspected. Yes, it was flashed with Tomato initially. Is the radio calibration data particular to each individual unit, or could it be cloned from another of the same or similar model? Deslatha, this seems to be what you are saying but I'm afraid I don't quite understand your last sentence perhaps you would be be kind enough to explain a bit more?
I am no expert in this stuff, but always happy to learn (Which I have been doing fast over the last few days!).


You need post data log on telnet.
display router layout: cat /proc/mtd
or cd /proc then ls -s

check board data (may be OEM lockup due no ID or serial number if you run on stock): dd if=/dev/mtdX | hexdump -C (X=board_data) or cp /dev/mtdX /tmp/sda (usage: df -h).

check wl radio rev version: wl -a eth1 revinfo
also eeprom: wl -a eth1 srdump

if no back board_data up then ask some one. open in hex edit(android is free).
put them in usb card(ntfs) then update to mtd of router.
if you want to used ddwrt FW then you only need nvram set "abc" where "abc" is parameter of wl radio then nvram commit. it will be erase if you reset router. (back up if you like).
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12889
Location: Netherlands

PostPosted: Sat Aug 04, 2018 12:36    Post subject: Reply with quote
I am running Kong's builds on my R6400 (V1)
If you need any data I can provide it, I do have serial access also.
But as Kong pointed out calibration data could be different

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
jamesad
DD-WRT Novice


Joined: 03 Aug 2018
Posts: 12

PostPosted: Sat Aug 04, 2018 14:55    Post subject: Reply with quote
Thanks all.
Ok, if the parameters are particular to my board then I'm probably screwed as I don't have a backup. On the plus side, although I appreciate Kong's warning, it's hard to see how I could make things worse as the wifi is only really usable in the same room at the moment, making it pretty useless to me. At the very least, trying will be useful experience so I'll get something out of it.
I'm going to set up a spare router so I can play as much as I like with the R6400 and go through Deslatha's instructions. Hopefully I will learn enough to be able to take up egc's kind offer, once I know what I need and what to do with it!
jamesad
DD-WRT Novice


Joined: 03 Aug 2018
Posts: 12

PostPosted: Tue Aug 07, 2018 8:32    Post subject: Reply with quote
Ok, all set up. Starting with the easy ones:

cat /proc/mtd
mtd0: 00080000 00020000 "boot"
mtd1: 00180000 00020000 "nvram"
mtd2: 01e00000 00020000 "linux"
mtd3: 01c60000 00020000 "rootfs"
mtd4: 05000000 00020000 "ddwrt"

wl -a eth1 revinfo
vendorid 0x14e4
deviceid 0x4332
radiorev 0x2059000
chipnum 0x4331
chiprev 0x2
chippackage 0x8
corerev 0x1d
boardid 0x646
boardvendor 0x14e4
boardrev P601
driverrev 0x70e5915
ucoderev 0x3a02716
bus 0x1
phytype 0x7
phyrev 0x1
anarev 0x0
nvramrev 0

That much I can follow, but then it gets trickier.

wl -a eth1 srdump is all zeroes. I'm guessing that isn't right.

and I'm a bit stuck with this:

Quote:
check board data (may be OEM lockup due no ID or serial number if you run on stock): dd if=/dev/mtdX | hexdump -C (X=board_data) or cp /dev/mtdX /tmp/sda (usage: df -h).


Which is the board_data (X)?

I know basic linux and hex editing, but little about embedded systems so simple instructions appreciated.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12889
Location: Netherlands

PostPosted: Tue Aug 07, 2018 8:59    Post subject: Reply with quote
The X is the partition number where the board data could be found, so my guess would be on the boot partition and that makes it mtd0:

dd if=/dev/mtd0 | hexdump -C

If you have and USB stick attached (with /opt directory) you can write it to the stick with:

dd if=/dev/mtd0 | hexdump -C > /opt/boardata.txt

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
jamesad
DD-WRT Novice


Joined: 03 Aug 2018
Posts: 12

PostPosted: Tue Aug 07, 2018 9:54    Post subject: Reply with quote
Thanks for the super quick reply.
The dump of /dev/mtd0 is attached. Hope it means something to someone!



boarddata.txt
 Description:

Download
 Filename:  boarddata.txt
 Filesize:  832.69 KB
 Downloaded:  287 Time(s)

deslatha
DD-WRT User


Joined: 12 Jul 2016
Posts: 186

PostPosted: Tue Aug 07, 2018 11:52    Post subject: Reply with quote
=========================================================



___ ___ _ _____ ______ ____ ___

/ _ \/ _ \___| | /| / / _ \/_ __/ _ __|_ / / _ \

/ // / // /___/ |/ |/ / , _/ / / | |/ //_ <_/ // /

/____/____/ |__/|__/_/|_| /_/ |___/____(_)___/



DD-WRT v3.0

http://www.dd-wrt.com



==========================================================





BusyBox v1.24.2 (2016-07-25 09:11:13 CEST) built-in shell (ash)



root@DD-WRT:~# cat /proc/mtd

dev: size erasesize name

mtd0: 00200000 00010000 "cfe"

mtd1: 00010000 00010000 "nvram"

mtd2: 02000000 00020000 "linux"

mtd3: 05f00000 00020000 "ddwrt"

mtd4: 02000000 00020000 "nandimage"

mtd5: 01e99000 00020000 "rootfs"

mtd6: 00010000 00010000 "board_data"

root@DD-WRT:~# cat /proc/partition

cat: can't open '/proc/partition': No such file or directory

root@DD-WRT:~# cat /proc/partitions

major minor #blocks name



31 0 2048 mtdblock0

31 1 64 mtdblock1

31 2 32768 mtdblock2

31 3 97280 mtdblock3

31 4 32768 mtdblock4

31 5 31332 mtdblock5

31 6 64 mtdblock6

root@DD-WRT:~# dd if=/dev/mtd6 | hexdump -C

00000000 55 31 32 48 32 31 38 54 30 30 5f 4e 45 54 47 45 |U12H218T00_NETGE|

00000010 41 52 00 ff ff ff ff ff ff ff ff ff ff ff ff ff |AR..............|

00000020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|

*

00000040 84 1b 5e da ec 96 84 1b 5e da ec 97 33 32 50 34 |..^.....^...32P4|

00000050 32 37 37 50 3X 3X 3X 3X 3X 00 00 00 00 00 00 00 |277PXXXXX.......|

00000060 00 00 00 00 00 00 00 00 00 00 00 00 38 38 33 39 |............8839|

00000070 33 30 31 38 01 00 ff ff ff ff ff ff ff ff ff ff |3018............|

00000080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|

*

00008000 bd 0b 0d bd 01 00 0a 00 4e 45 54 47 45 41 52 37 |........NETGEAR7|

00008010 39 00 bd 0b 0d bd 02 00 0e 00 63 6c 6f 75 64 79 |9.........cloudy|

00008020 62 6f 61 74 31 33 39 00 bd 0b 0d bd 03 00 0d 00 |boat139.........|

00008030 4e 45 54 47 45 41 52 37 39 2d 35 47 00 bd 0b 0d |NETGEAR79-5G....|

00008040 bd 04 00 0e 00 63 6c 6f 75 64 79 62 6f 61 74 31 |.....cloudyboat1|

00008050 33 39 00 bd 0b 0d bd 00 00 00 00 ff ff ff ff ff |39..............|

00008060 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|

*

128+0 records in

128+0 records out

00010000

root@DD-WRT:~#

As you see, it is router ID,serial# and so on that pull from r6300. also you need post 2 wl (5ghz) rev info. It should be 4360. Only radio rev 0x2059000 chipnum 0x4331 chip rev 0x2 is preset. I think you flash wrong FW which have no mtd of netgear router. nvram of net gear only 64:2=32kB but on your it is 1.5MB. it surely is link sys router.(devinfo+nvram from ddwrt, OEM layout mtds separated). eeprom of wl is ommited(all zero and be controlled from FW).

If you want rolling back to OEM then it takes little hardwork. you need connect to serial uart port to cp and edit. first flash stock net gear FW then it automatically creating blank board_data mtd which totally 17 mtds. From there you can cp and edit data which it already on your router printing label. if you willing then i can provided more detail.

Or you can upgrade and porting your router into R7000 if you like. let’s me know. kind not plus and play.
jamesad
DD-WRT Novice


Joined: 03 Aug 2018
Posts: 12

PostPosted: Tue Aug 07, 2018 19:45    Post subject: Reply with quote
I see what you mean. I have no idea how or when that might have happened. I have reviewed all the flash files I have downloaded and all are for the R6400.

All I did was flash from Tomato (which it had been running happily for nearly a year) to dd-wrt to stock, using dd-wrt.v24-K3_AC_ARM_STD_128K.bin and R6400-V1.0.0.26_1.0.14.chk, both from the R6400 "back-to-genie" zip. All went well except I couldn't then reflash it as (it turned out) the board ID was corrupt. Having fixed that, I have since tried flashing it half a dozen times with Tomato, dd-wrt and stock files and it has been absolutely fine apart from the degraded wifi.

What I don't understand is, if the MTD's are so messed up, would you expect the router to still work perfectly (apart from the wifi) and to still be easily flashable? Also, if reverting it to stock will fix the MTD structure, why didn't it do so the first time?
I am of course, not arguing with you as it's clear you know way more than I do about this - I am just puzzled.
But yes, I am willing to try and would greatly appreciate it if you did provide me with more detail. I will flash it back to stock and see what happens.
deslatha
DD-WRT User


Joined: 12 Jul 2016
Posts: 186

PostPosted: Wed Aug 08, 2018 1:31    Post subject: Reply with quote
Open R6400-V1.0.0.26_1.0.14.chk by hex edit (android is free). delete 57 header's bytes until you see HDR0 start; save it in .bin file. connect to pc and tftp server, from cfe flash this new edit fw. also erase nvram too.
flash -erase nflash0.nvram
flash -noheader 192.168.1.2:fw_edit.bin nflash0.trx
after that reboot and the fw should created 17mtds. At this time you no longer telnet or ssh. only uart serial port.
from there you can back up all router's mtd to usb storage. you may ask some r6400 back up mtds to clone or edit back to your router.
hope can help.
notes: support that your router still used original cfe.
if you dont know how to flash fw through cfe cli then ask some one with more your detail, support that you already connect serial port of router; other wise discard and nothing you can do.
jamesad
DD-WRT Novice


Joined: 03 Aug 2018
Posts: 12

PostPosted: Wed Aug 08, 2018 8:35    Post subject: Reply with quote
It's very kind of you to take the trouble to help. Thanks.

As I understand it, the general idea is that I recreate the MTD structure, get copies of all 17 mtds from another R6400, edit the board_id mtd for my particular router's bottom label stuff, then write them all back? Is that right?

Sounds just about within my capabilities. Serial port and cli flashing I can do. I'm not sure of the commands for backing up and restoring the mtds to USB though, so an example would be useful.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum