Asus RT-N66U

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3 ... 57, 58, 59 ... 167, 168, 169  Next
Author Message
GH0
DD-WRT User


Joined: 05 Dec 2008
Posts: 249

PostPosted: Wed Jul 25, 2012 2:07    Post subject: Reply with quote
Fractal,
(or anyone else that has a serial connector)

If you could do something for me so I can try to figure out the USB Drives.

I need jtag output of the device when this happens.

Right now, when trying to do: echo "words here" > testing

It crashes the router, however, a touch echotest doesn't crash the router.

To figure out what is going on, you need to insert a USB drive, and then power on your router. Otherwise, it won't mount for some reason.

After it is completely powered on

I mounted the USB with (in my case it was on host2):
Code:
 mount -o noatime /dev/scsi/host2/bus0/target0/lun0/part1 /opt


(If it doesn't mount check to see if the following files are present:
Code:

root@Dark-Knight:/# find . | grep ext2
./lib/libext2fs.so
./lib/libext2fs.so.2
./lib/libext2fs.so.2.4
./lib/modules/2.6.24.111/kernel/fs/ext2
./lib/modules/2.6.24.111/kernel/fs/ext2/ext2.ko
./sbin/mkfs.ext2
./sys/module/ext2
./sys/module/ext2/refcnt
./sys/module/ext2/initstate
./sys/module/ext2/holders

If the /sys/ files aren't present for some reason it won't mount)


Which resulted mount displaying:
Code:

/dev/scsi/host2/bus0/target0/lun0/part1 on /opt type ext3 (rw,noatime,data=ordered)


Afterwards it does the following:
Code:

root@Dark-Knight:/# cd opt
root@Dark-Knight:/opt# touch echo
root@Dark-Knight:/opt# ls
echo        lost+found
root@Dark-Knight:/opt# echo "The little birdy is loosing the race" > test file
root@Dark-Knight:/opt#


The router crashes.

There is a log of syslog, as well as my entire 4 sessions of testing this and repeatedly happening.

http://svn.dd-wrt.com:8000/ticket/2580
Sponsor
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Wed Jul 25, 2012 2:11    Post subject: Reply with quote
p_shep wrote:
Fractal wrote:
p_shep wrote:
So state of the are is: AC no worky, U kinda worky if you tilt your head to the side and squint a bit.


I have not picked up one of these devices, however if someone has and can post serial output that would let us know if they fixed the cfe in the ac device. my n66u came with serial pins already attached to the board so no soldering was necessary.

I noticed new egg put it up again today,

maybe someone from the asus camp can comment.

-Fractal


I could probably do that. The serial pins 3.3v? I have stuff at work I can do that with.

...still hovering over the buy button!


I too am undecided .... there is the ea6500 cisco suppose to be out in august and the d1800h buffalo has support.....

The big hurdle here is finding a laptop minipci card that will use the 1300mb 5.8 gig wifi....

-Fractal
Magnetron1.1
DD-WRT User


Joined: 21 Nov 2010
Posts: 278
Location: North America

PostPosted: Wed Jul 25, 2012 7:08    Post subject: Asus RT-AC66U Uses 64KB NVRAM Reply with quote
@All

Asus RT-AC66U running 3.0.0.4.164 stock firmware:

Telnet Session with 192.168.5.1:

admin@RT-AC66U:/tmp/home/root# nvram show|grep size:
size: 30104 bytes (35432 left)

admin@RT-AC66U:/tmp/home/root# dmesg|grep -E "\-0x0|MTD|NAND| ST "
Found an ST compatible serial flash with 32 64KB blocks; total size 2MB
Creating 2 MTD partitions on "sflash":
0x00000000-0x00040000 : "pmon"
0x001f0000-0x00200000 : "nvram"
Found a Samsung NAND flash with 2048B pages or 128KB blocks; total size 128MB
Creating 2 MTD partitions on "nflash":
0x00000000-0x02000000 : "linux"
0x001313e8-0x02000000 : "rootfs"
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Creating 2 MTD partitions on "brcmnand":
0x00000000-0x02000000 : "trx"
0x02000000-0x07f00000 : "brcmnand"

admin@RT-AC66U:/tmp/home/root# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00010000 "pmon"
mtd1: 00010000 00010000 "nvram"
mtd2: 02000000 00020000 "linux"
mtd3: 01ecec18 00020000 "rootfs"
mtd4: 02000000 00020000 "trx"
mtd5: 05f00000 00020000 "brcmnand"

admin@RT-AC66U:/tmp/home/root# dmesg|grep -E "Broadcom BCM"
eth0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 6.30.39.29 (r338244)
eth1: Broadcom BCM4331 802.11 Wireless Controller 6.30.39.29 (r338244)
eth2: Broadcom BCM4360 802.11 Wireless Controller 6.30.39.29 (r338244) <== 802.11ac
eth1: Broadcom BCM4331 802.11 Wireless Controller 6.30.39.29 (r338244)
eth2: Broadcom BCM4360 802.11 Wireless Controller 6.30.39.29 (r338244)

admin@RT-AC66U:/tmp/home/root# uname -a
Linux RT-AC66U 2.6.22.19 #1 Mon Jul 23 18:27:45 CST 2012 mips GNU/Linux

Screenshots of CFE Session Using Serial Console:

- Magnetron1.1



Cfescreen1.png
 Description:
CFE Screenshot1
 Filesize:  120.64 KB
 Viewed:  34894 Time(s)

Cfescreen1.png



Cfescreen2.png
 Description:
CFE Screenshot2
 Filesize:  148.62 KB
 Viewed:  34894 Time(s)

Cfescreen2.png




Last edited by Magnetron1.1 on Wed Jul 25, 2012 11:51; edited 4 times in total
Gingernut
DD-WRT User


Joined: 29 Jul 2007
Posts: 229

PostPosted: Wed Jul 25, 2012 7:18    Post subject: Reply with quote
FWIW latest .162 firmware source for the RT-N66U has dropped and also contains CFE source.

http://dlcdnet.asus.com/pub/ASUS/wireless/RT-N66U_B1/GPL_RT_N66U_B1_3003162.zip
barryware
DD-WRT Guru


Joined: 26 Jan 2008
Posts: 13049
Location: Behind The Reset Button

PostPosted: Wed Jul 25, 2012 14:37    Post subject: Re: Asus RT-AC66U Uses 64KB NVRAM Reply with quote
Magnetron1.1 wrote:
@All

Asus RT-AC66U running 3.0.0.4.164 stock firmware:

nice.. you should start a new thread.. this is a diff router.

nand flash.. I am under the impression that is a problem for dd-wrt.. (WNDR4500)

_________________
[Moderator Deleted] Shocked
Magnetron1.1
DD-WRT User


Joined: 21 Nov 2010
Posts: 278
Location: North America

PostPosted: Wed Jul 25, 2012 15:08    Post subject: Re: Asus RT-AC66U Uses 64KB NVRAM Reply with quote
barryware wrote:

nice.. you should start a new thread.. this is a diff router.

nand flash.. I am under the impression that is a problem for dd-wrt.. (WNDR4500)


The reason for posting it in this thread was in response to questions others had about this router's nvram size. I will start another thread when I'm ready to request DD-WRT firmware for it. (LOL)

I have 5 Buffalo WZR-D1800H routers (802.11ac) running DD-WRT that also use the same Samsung nand flash memory and so far haven't had any problems.

- Magnetron1.1
ryzhov_al
DD-WRT Novice


Joined: 17 Jul 2012
Posts: 48
Location: Smolensk, Russia

PostPosted: Wed Jul 25, 2012 15:30    Post subject: Re: Asus RT-AC66U Uses 64KB NVRAM Reply with quote
barryware wrote:
nice.. you should start a new thread.. this is a diff router.

No, it's not different. Asus uses one source code for all firmwares: from all N series routers to all Dual-Band N series routers.

For example, you may unpack RT-AC66U GPL'ed sources and make a firmware for RT-N16 Router.

_________________
Entware team
Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2448
Location: Third Rock from the Sun

PostPosted: Wed Jul 25, 2012 15:36    Post subject: Re: Asus RT-AC66U Uses 64KB NVRAM Reply with quote
ryzhov_al wrote:
barryware wrote:
nice.. you should start a new thread.. this is a diff router.

No, it's not different. Asus uses one source code for all firmwares: from all N series routers to all Dual-Band N series routers.

For example, you may unpack RT-AC66U GPL'ed sources and make a firmware for RT-N16 Router.
Source code may be the same but the hardware is different = different router.
_________________
Peacock Thread-FAQ -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
ryzhov_al
DD-WRT Novice


Joined: 17 Jul 2012
Posts: 48
Location: Smolensk, Russia

PostPosted: Wed Jul 25, 2012 15:40    Post subject: Re: Asus RT-AC66U Uses 64KB NVRAM Reply with quote
Dark_Shadow wrote:
Source code may be the same but the hardware is different = different router.
Agreed.
_________________
Entware team
lkbrow1
DD-WRT Novice


Joined: 10 Aug 2009
Posts: 12

PostPosted: Wed Jul 25, 2012 16:46    Post subject: Reply with quote
Since they have released the source code to the CFE, would it not be possible to patch the CFE, then flash a new CFE in place ?
lkbrow1
DD-WRT Novice


Joined: 10 Aug 2009
Posts: 12

PostPosted: Wed Jul 25, 2012 18:39    Post subject: Reply with quote
In file asuswrt\release\src-rt\include\bcmnvram.h
I found the following:

#if (defined(RTCONFIG_NVRAM_64K) || defined(CONFIG_NVRAM_64K))
#define NVRAM_SPACE 0x10000
#else
#define NVRAM_SPACE 0x8000
#endif

Then I went looking for RTCONFIG_NVRAM_64K and found:
in file asuswrt\release\src\router\config_base
# RTCONFIG_NVRAM_64K is not set

and CONFIG_NVRAM_64K in file asuswrt\release\src-rt\linux\linux-2.6\config_base
# CONFIG_NVRAM_64K is not set

In looking at the CFE code, it seems that CFE blindly allocates the last block of Flash for NVRAM. The block sizes are defined in hardware as the unit size that the flash is erased in, except for an erase entire flash command. So while the linker may allocate 128K for NVRAM, the CFE only does 1 block. Not sure how the router software gets around this.
GH0
DD-WRT User


Joined: 05 Dec 2008
Posts: 249

PostPosted: Thu Jul 26, 2012 1:45    Post subject: Re: Asus RT-AC66U Uses 64KB NVRAM Reply with quote
Magnetron1.1 wrote:
barryware wrote:

nice.. you should start a new thread.. this is a diff router.

nand flash.. I am under the impression that is a problem for dd-wrt.. (WNDR4500)


The reason for posting it in this thread was in response to questions others had about this router's nvram size. I will start another thread when I'm ready to request DD-WRT firmware for it. (LOL)

I have 5 Buffalo WZR-D1800H routers (802.11ac) running DD-WRT that also use the same Samsung nand flash memory and so far haven't had any problems.

- Magnetron1.1


So am I correct in stating that the router has a CFE that allows for 128 MB of NVRAM?
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Thu Jul 26, 2012 1:56    Post subject: Re: Asus RT-AC66U Uses 64KB NVRAM Reply with quote
GH0 wrote:


So am I correct in stating that the router has a CFE that allows for 128 MB of NVRAM?


No, that sounds like an awful lot of nvram.

_________________
Kernel panic: Aiee, killing interrupt handler!
lkbrow1
DD-WRT Novice


Joined: 10 Aug 2009
Posts: 12

PostPosted: Thu Jul 26, 2012 2:07    Post subject: Reply with quote
128KB not 128MB, but that assumes the software supports buffering 4 sectors of flash instead of 1. Since a complete sector must be erased each time data is changed and if there is a checksum in the last sector, that sector must also be read, erased, modified, and rewritten.
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Thu Jul 26, 2012 4:25    Post subject: Reply with quote
lkbrow1 wrote:
128KB not 128MB, but that assumes the software supports buffering 4 sectors of flash instead of 1. Since a complete sector must be erased each time data is changed and if there is a checksum in the last sector, that sector must also be read, erased, modified, and rewritten.


Flash sectors forms sector groups (blocks) and that is what we usually work with, the flash driver takes care of the translation of a memory address into a flash block and knows how to handle individual sectors within the block.

With a block size of 64KB it is possible for the flash driver to address up to 16MB in parallel flashes but there are a few 8MB chips that have a block size of 128KB without actually needing to have them that big.
Serial flash chips do all have a block size of 64KB.

The nvram routines do not know anything about this, they are made for a certain size of nvram which may be an efficient size which uses all of the flash block or may be inefficient and waste a bit of the block.
64KB of nvram as seen in the latest Netgear and Cisco routers is in most cases efficient use of a flash block, it uses only one flash block and it uses all of it.

For routers with a flash block size of 128KB, well you don't need more than 64KB nvram so the wasted 64KB would be unused (ie wasted) anyway.
Having some kind of standard is always advantageous instead of making "specials".

_________________
Kernel panic: Aiee, killing interrupt handler!
Goto page Previous  1, 2, 3 ... 57, 58, 59 ... 167, 168, 169  Next Display posts from previous:    Page 58 of 169
Post new topic   This topic is locked: you cannot edit posts or make replies.    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