Posted: Thu Oct 16, 2008 9:24 Post subject: How do I disable sys console on ttyS0 for a WRT150n V1.1?
Hi All.
How do I disable the system console output to ttyS0 on DD-WRT? Also the login.
The dmesg output tells me that it is set on the kernel command line, as follows:
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
My google searches lead me to i386 based tutorials where the command line can be edited in grub or lilo. How do I change it in DD-WRT? I was hoping it could be set using an nvram var. That would be great because I could reset it to default easily should I need emergency access to the console output.
I am wanting to use ttyS0 on my WRT150n V1.1 as a regular rs232 (3.3V) serial port. I have constructed a max3237 based interface so I can view the system console output (and login) using minicom (or hyperterm) from a pc. My interface seems to work well.
My ultimate goal is to use the router as an interface between simple "8/16 bit" micros and the internet. Talk about the tail wagging the dog! A router can provide comunication, storage for logging (mmc and/or network), and power. The uC can do the low level interface with the real world. A $40 linux box that I can easily attach to a $1 uC seems a bargain in saved development time for hobby style throwaway apps.
Anyway, I am stuck now because the port is being used and I need a clean serial line for my uC interface. The output from dmesg shows that there is a ttyS1 also, but there is no header on the PCB.
I am using a Linksys WRT150N v1.1 with DD-WRT v24-sp1 (07/27/0 std - build 10011.
Hi, I have the same problem. I am using a Buffalo WHR-G125, which has only one serial port, and that port is attached to the console because of the kernel command line as you point out.
I have found 2 possible approaches. The first involves re-compiling DD-WRT from source. I don't really have the linux experience to be trying this out.
The other involves a busybox app called setconsole. It does not come in the standard binaries with DD-WRT, but if someone can compile it for mips processors then we could us it like this:
$>setconsole /dev/null
and this would redirect kernel output to null.
Can someone out there complie this app or explain how to do so easily?
Apparently on my router (Buffalo WHR-G125) there are 2 serial ports, but only one is brought out to pins on the PCB (ttyS0). So if I can redirect the console there it would hopefully free up ttyS0.
Also, can you please attach the binary for setconsole so I can download it?
The first option, compiling a custom kernel, seems doable, but it also seems that compiling DD-WRT is not automated or for the novice. I will try to compile svn 10011 (v24sp1) again when I can spend more time on it.
Setconsole seems like it should be worth looking at. The port would still be flooded with garbage until setconsole is run, so it is not an ideal solution.
Any luck so far?
Also, by way of friendly advice, it is important to test that your CFE can actually restore an image before messing with custom firmware. My CFE is broken and I can only recover from a bad flash via jtag. I am very glad I took the time to back the thing up prior to playing.