OpenWrt Forum Archive

Topic: need help with connections TTL serial console

The content of this topic has been archived on 1 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
my linksys wrt160nl router  bricked after recent attemt to upgrade openwrt so i had to buy a serial interface which i couldnt find in my neighborhood (no creditcard = no paypall = no ebay)
so instead i bought this: http://www.produktinfo.conrad.com/daten … _de_en.pdf
(after first having build this http://sodoityourself.com/wp-content/up … it_232.jpg but that resulted in a lot of unusable garbage on my putty, even with magnetic adapter and <5cm wires;) )
http://wiki.openwrt.org/toh/linksys/wrt160nl#serial

i have 2 questions.
i understand where to connect the usb (which is ofc obvious), i think i understand that TX and RX needs to be connected to TXD and RXD, but what i do not understand is where to connect the 3.3v to. (pin 11- 20 all have 3.3v when only connected to usb and no data going through)

the 2nd question is, pin 4 on the router sais NC .. i can skip that right? it does not need connecting?

NC means not connected

reason to get garbage on serial is wrong speed, parity, etc.

did you try several values?

you will get the exact same thing with the serial to usb to serial thing. only more layers to deal with. May help you only if the serial line build was the problem.

(Last edited by gcbwrt on 11 May 2012, 23:59)

thank you for clearing that up gcbwrt.
As for the garbage i received earlier,
- cable length serial and ttc where < 5 cm
- i tested it on a older pc with a serial interface in the back, and with my new pc on a usb-serial converter, and on a laptop with the usb-serial converter
- i tested on main adapter, on magnetic adapter and on lipo battery
- i tested several speeds. slower then 9600 resulted in no data, higher untill 115200 resulted in same garbage as at 9600.
i think there is nothing more i can test besides rebuilding it from scratch, but i measured every connection so that is also an unlikely solution.

the 3.3v connection on the router.. can i provide this voltage from external source to bypass the fact that i cant identify the pin i should use on the conrad thingy i bought?


@beamont: i bet you had a nice party last night \o/

(Last edited by trendpoinder2 on 12 May 2012, 06:14)

thanks sagemol, for pointing me in that direction.
there was indeed a partial solution to be found.
In my case i still had to have connected both tx and rx, however, it appears that my router does not like slow speeds and only accepts the fastest option, 115200.

i was not able to interrupt the booting process though, it did not accept input at all, however, in the serial console i found that tftp was available so i placed a new code.bin there [You can download 10.03 build called openwrt-ar71xx-wrt160nl-squashfs.bin.. tftp -i 192.168.1.1 put code.bin ]

After which it got totally bricked and no tftp is started anymore.

So now i do really seem to need to get write acces going in uboot.

2 small things though, in all speeds it gives gibrish info, except for 115200 baud, however ,this is not completely the case. It still starts with 1 gibrish letter before showing the bootinfo

ÿ

U-Boot 1.1.6 (Apr 14 2010 - 14:02:36)

Should i interpret this as my router not liking this speed either and it being the cause of that i cant type ?(i basically tried this list: http://www.finseth.com/parts/serial.php )
My complete boot screen reads this:

ÿ

U-Boot 1.1.6 (Apr 14 2010 - 14:02:36)

DRAM:  ar7100_ddr_initial_config(237) enter!
ar7100_ddr_initial_config(269) exit!


U-Boot 1.1.6 (Apr 14 2010 - 14:02:36)

AP81 (ar7100) U-boot
sri
32 MB
WRT160NL u-boot version: 1.0.0
Top of RAM usable for U-Boot at: 82000000
Reserving 279k for U-Boot at: 81fb8000
Reserving 192k for malloc() at: 81f88000
Reserving 44 Bytes for Board Info at: 81f87fd4
Reserving 36 Bytes for Global Data at: 81f87fb0
Reserving 128k for boot params() at: 81f67fb0
Stack Pointer at: 81f67f98
Now running in RAM - U-Boot at: 81fb8000
id read 0x100000ff
flash size 8MB, sector count = 128
Flash:  8 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
ag7100 get ethaddr for device eth0
Fetching MAC Address from 0x81feb1e0

 --------***** Get the RTL8306SD Manufactory ID=379c *****-------
 Reg6: speed=0 nway=1 duplex=0
 Reg5: speed=0 nway=0 duplex=0
 Reg1: a1=7fd9 a2=30e0 a3=15ac a4=30e0 a5=0
 Reg1: a1=7fd9 a2=30e0 a3=15ac a4=30e0
 Reg1: a1=7fd9 a2=30e0 a3=15ac a4=30e0
 Reg1: a1=7fd9 a2=30e0 a3=15ac a4=30e0
 Reg1: a1=7fd9 a2=30e0 a3=15ac a4=30e0
eth0: 58:6d:8f:89:b1:c8
eth0 up
eth0
### main_loop entered: bootdelay=1

Hit any key to stop autoboot:  0
## Booting WRT160NL ...
Application code length 0x00280000
CRC OK
## Booting image at bf04003c ...
   Image Name:   MIPS OpenWrt Linux-2.6.32.10
   Created:      2010-04-06  13:03:41 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    1227486 Bytes =  1.2 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
kernel: org len = 1227486, new len = 1245184
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

Linux version 2.6.32.10 (openwrt@wrt1.marcant.net) (gcc version 4.3.3 (GCC) ) #20 Tue Apr 6 15:01:26 CEST 2010
bootconsole [early0] enabled
CPU revision is: 00019374 (MIPS 24Kc)
Atheros AR9130 rev 2, CPU:400.000 MHz, AHB:200.000 MHz, DDR:400.000 MHz
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 board=WRT160NL
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 29332k/32768k available (2101k kernel code, 3436k reserved, 397k data, 152k init, 0k highmem)
SLUB: Genslabs=7, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:56
Calibrating delay loop... 266.24 BogoMIPS (lpj=1331200)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
MIPS: machine is Linksys WRT160NL
bio: create slab <bio-0> at 0
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
yaffs Mar 28 2010 17:53:41 Installing.
msgmni has been set to 57
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
Atheros AR71xx SPI Controller driver version 0.2.4
m25p80 spi0.0: unrecognized JEDEC id ef4017
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xb9000000, irq 4
Registering RTL8306SDM switch with Chip ID: 0x5988, version: 0x0000
eth1: Atheros AG71xx at 0xba000000, irq 5
Atheros AR71xx hardware watchdog driver version 0.1.0
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Cannot open root device "<NULL>" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

i hope someone can help me out again big_smile

Obviously Your router will not "like" any other speed than 115200.
This is normal as the serial port of many routers is set fixed to 115200.
If You cannot "type" at 115200, it is probably due to a serial cable,
that has problems at 115200 (as posted in the link i provided),
or You have wrong terminal settings regarding the serial flow control,
which should be set to "none".

Regards,
Ralph

The discussion might have continued from here.