Debricking a Linksys WRT3200ACM through its serial port

balanga

Son of Beastie

Reaction score: 140
Messages: 3,059

I'd just add that kwboot does not replace any existing UBoot, it simply boots an alternative UBoot. That's my understanding anyway.

I'd suggest trying kwboot anyway to see if your router is bricked. You have nothing to lose.
 

tingo

Daemon

Reaction score: 402
Messages: 2,064

FWIW, software flow control (Xon/Xoff) might need to be tweaked. Hardware flow control (RTS/CTS) is default off for cu, bot software flow control is not. Check the stty(1) man page. Note: stty parameters are (re)set when a port is opened or closed, so you will probably need to run [PMAN=]stty[/PMAN] after cu has opened the port.
 

balanga

Son of Beastie

Reaction score: 140
Messages: 3,059

FWIW, software flow control (Xon/Xoff) might need to be tweaked. Hardware flow control (RTS/CTS) is default off for cu, bot software flow control is not. Check the stty(1) man page. Note: stty parameters are (re)set when a port is opened or closed, so you will probably need to run [PMAN=]stty[/PMAN] after cu has opened the port.
This is what I get when running stty -e -f /dev/cuaU0:-
speed 115200 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo echoe -echok echoke -echonl echoctl
-echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
-extproc
iflags: -istrip -icrnl -inlcr -igncr ixon ixoff ixany imaxbel -ignbrk
brkint -inpck -ignpar -parmrk
oflags: -opost onlcr -ocrnl tab0 -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf
discard dsusp eof eol eol2 erase erase2 intr kill
^O ^Y ^D <undef> <undef> ^? ^H ^C ^U
lnext min quit reprint start status stop susp time
^V 1 ^\ ^R ^Q ^T ^S ^Z 0
werase
^W
Not sure what any of this means, but could it be that flow control is not set correctly for kwboot to work? And can I set it correctly within the program?
 

tingo

Daemon

Reaction score: 402
Messages: 2,064

There is a man page for stty(1). If you want to turn off xon / xoff (to test if that helps in your situation), you want something like stty -f /dev/cuaU0 -ixon -ixoff.
 

balanga

Son of Beastie

Reaction score: 140
Messages: 3,059

There is a man page for stty(1). If you want to turn off xon / xoff (to test if that helps in your situation), you want something like stty -f /dev/cuaU0 -ixon -ixoff.
Do you know if there is a Linux equivalent for showing the default settings of the comport? It may well be that they are different under Linux, which may explain why the program works under Linux but doesn't under FreeBSD...

Also if running stty to turn off xon / xoff is this setting in effect for the duration of the comport being open? ie on reboot I presume it would revert to its original state.
 

balanga

Son of Beastie

Reaction score: 140
Messages: 3,059

Linux have man pages too. And yes, the command is called stty there as well.
Running stty -a -F /dev/ttyUSB0 gives me:-
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke -flusho -extproc
Am I correct in thinking that this means ixon is on and ixoff is off?

Sorry for the newbie type question. Would these settings account for an xmodem transfer working on Linux and not working on FreeBSD?
 

tingo

Daemon

Reaction score: 402
Messages: 2,064

Am I correct in thinking that this means ixon is on and ixoff is off?
Yes.

balanga said:
Sorry for the newbie type question. Would these settings account for an xmodem transfer working on Linux and not working on FreeBSD?
Not sure. xmodem is an old protocol and have many extensions. So a failure could also be caused by sender and reciver using incompatible extensions.
However, if the sender and the receiver have different settings for ixon and / or ixoff, you will have problems.
 
Top