Home - Rubusch/chaos_calmer GitHub Wiki
Welcome to the chaos_calmer wiki!
RESOURCES
http://wiki.openwrt.org/doc/hardware/port.serial
http://wiki.openwrt.org/doc/hardware/port.serial.cables
https://www.youtube.com/watch?v=qqSLwK1DP8Q
ftp://ftp.dlink.de/dir/dir-615/driver_software/
THEORY
usb to rs232 (ttl) converter
Finding an UART on a router is fairly easy since it only needs 3 signals (without modem signaling) to work: GND, TX and RX (often accompanied by VCC). Since your router is very likely to have its I/O pins working at 3.3V (TTL level voltage), you'll need usb.to.rs232.ttl.converter.module or a level shifter such as a Maxim MAX232 to change the level from 3.3V to your computer level which is usually at 12V.
Once found, you can easily check where is the GND, which is connected to the same ground layer than the power connector. The VCC should be fixed at 3.3V and connected to the supply layer ; the TX is also at 3.3V level, but using a multimeter as an ohm-meter, if you find an infinite resistance between the TX and VCC pins, it means they're distinct signals (else, you'll need to find the correct TX or VCC pin). The RX and GND are by default at 0V, so you can check them using the same technique.
Many people get along without a serial console for their device because they're able to flash a working firmware the first time - or are able to apply various recovery methods - and do all their communicating with the device over a network. However, due to characteristics of their bootloaders, or because they aren't yet fully supported, for some devices it can be quite handy to have a compatible serial console available.
It is possible to get useful information about what is happening with only GND and RX, but in order to fix a problem you will usually also need TX. Your computer's TX should be connected to the device's RX, and your computer's RX should be connected to the device's TX. The computer's GND should connect the the device's GND. That way, what you say will get heard by the device and what the device says will get heard by your computer. This is often called a "null-modem" configuration.
If you are using only three wires (GND, TX, and RX) then hardware flow control should be turned off; you aren't using the pins (RTS and CTS) necessary for it to work.
Another possible cause for the garbled output is wrong serial port speed, try different settings, most common ones are 9600, 38400 and 115200 bps.
If you successfully receive router bootup logs but seem unable to send data (e.g. some keyboard input which might be required to intercept bootup, and where you're unable to stop continued kernel bootup), then this may be due to having configured the connection as hardware flow control rather than software (happened on TL-WDR3600 in my case).
WARNING!: Some people reported they fried their router connecting the voltage pins spite it isn't neccesary. NEVER connect voltage pins when using USB adapters unless you know what are you doing
Caution: Do this at your own risk, since the Arduino runs at 5v and the serial sometimes is at a different voltage. Therefore, using the following technique may cause the router, Arduino, or other things, to malfunction or break. That said, this technique worked well for me during for lots of use (hours), with a Linksys E1000 v1 at 3.3v, and an Arduino Uno REV3.
SOLUTION 1
buy and use and FTDI (3.3V USB-2-serial converter cable) and connect at least RX, TX and GND correctly
SOLUTION 2
use Arduino UNO as USB-to-Serial(TTL, 3.3V)-Converter
hardware needed D-Link DIR615 (rev. H2) and Arduino UNO r3, 3 jumper cables and 3 pins, soldering tools
on the DIR615, solder the pins:
3.3V DC
GND
TXD, and
RXD
if the eth ports are 12 o'clock, they are the 4 small pinholes bottem-left, and form a horizontal line parallel to the memory chip); the pins are in the specified order, 3.3V has a small arrow below it printed on the PCB
wire the following pins
Arduino::RESET --- Arduino::GND (to jumper the ATMEL)
Arduino::RX<-0 --- DIR615::RXD
Arduino::TX->1 --- DIR615::TXD
Arduino::GND --- DIR615::GND
USB connection PC to Arduino UNO
on the PC install the arduino package, screen or minicom as well, then run e.g.
$ sudo screen /dev/ttyACM0 57600
in case turn off HW flow control, since CTS/RTS is not wired
or a bit more sophisticated
$ screen /dev/ttyACM0 57600,-parenb,-cstopb,cs8
or connect via minicom, and configure it
$ sudo minicom -c on -w -D /dev/ttyACM0
OPERATION
flash the router
first, do a update of the configuration, and get a firmware update - in order to be able to reflash the router, in case anything went wrong
TODO
in the router menu select load firmware image and let it update.
RECOVERY
Revisions D1 to D4, H1 as well as I1 are pretty much unbrickable as they have a built-in firmware recovery mode. Revision D5 does not have built in recovery.