Close

We got UART!

A project log for Playing with the Starbridge Lynx 210

A research project on a 3.74$ router I got from Goodwill

jose-ricardoJose Ricardo 06/09/2020 at 02:500 Comments

I did this as soon as I got the router. I first took a look at the board and tried to find a serial port of some kind following devttys0's excellent guide. I took me a while to realize that the port wasn't any of the empty slots I so much tried to use, but rather the very obvious but horribly placed header right next to them. 

By the way, I may have messed up the channels on the drawing, but the ground is good... I hope. As for the baudrate, I spent a bit of time trying to get devtty0's baudrate.py working (Python2 man...), but I just ended up testing different standard baudrates. At the end it turned out it uses 38400 bauds, which is a bit unusual, at least as far as I know, but other than that it works just fine.


I also added a RS232 interface on it. It doesn't do anything (I don't even know if it would work if I where to connect it to a computer), but I figured it would be cool to see a router with a serial port sicking off the side. And I was right.


Here are the dumps I got from playing around with the serial port a bit:

ADAM2
ADAM2 Revision 0.22.03
(C) Copyright 1996-2003 Texas Instruments Inc. All Rights Reserved.
(C) Copyright 2003 Telogy Networks, Inc.
Usage: setmfreq [-d] [-s sys_freq, in MHz] [cpu_freq, in MHz]
Memory optimization Complete!

Adam2_AR7RD > 
Press any key to abort OS load, or wait 5 seconds for OS to boot...
help
	 Commands		Description
	 --------		-----------
         h/help Displays the commands supported
           info Displays board information
          memop Memory Optimization
       setmfreq configures/dumps the system and cpu frequencies
          erase Erase Flash except Adam2 Kernel and Env space
       printenv Displays Env. Variables
         setenv Sets Env. variable <var> with a value <val>
       unsetenv Unsets the Env. variable <var>
         fixenv Defragment for Env. space
             go Loads the image starting at address <mtd1>
Adam2_AR7RD > 
Adam2_AR7RD > info
Monitor Revision              0.22.03
Monitor Compilation time      Apr  1 2005, 18:45:39
Endianness                    Little
External Memory rate          Full, 16 bit wide
CPU Frequency                 150 MHz
Adam2_AR7RD > 
Adam2_AR7RD > printenv
memsize               0x00800000
flashsize             0x00200000
modetty0              38400,n,8,1,hw
modetty1              38400,n,8,1,hw
bootserport           tty0
cpufrequency          150000000
sysfrequency          125000000
bootloaderVersion     0.22.03
ProductID             AR7RD
HWRevision            Unknown
SerialNumber          none
my_ipaddress          192.168.1.1
prompt                Adam2_AR7RD
firstfreeaddress      0x9401d328
req_fullrate_freq     125000000
maca                  00:30:0A:5F:2D:0B
mtd0                  0x90090000,0x901f0000
mtd1                  0x90010000,0x90090000
mtd2                  0x90000000,0x90010000
mtd3                  0x901f0000,0x90200000
mtd4                  0x90010000,0x901f0000
autoload              1
azcpmac_config        1
usb_vid               0x0451
usb_pid               0x6060
HWA_RNDIS             00:30:0A:5F:2D:0C
HWA_HRNDIS            00:30:0A:5F:2D:0E
usb_flag              1
modulation            MMODE
usb_board_mac         00:30:0A:5F:2D:0C
usb_rndis_mac         00:30:0A:5F:2D:0E
macc                  00:30:0A:5F:2D:0D
vcc_encaps0           0.0
vcc_encaps1           0.0
vcc_encaps2           0.0
vcc_encaps3           0.0
vcc_encaps4           0.0
vcc_encaps5           0.0
vcc_encaps6           0.0
vcc_encaps7           0.0
connection0           0
Adam2_AR7RD > 
Adam2_AR7RD > 
--- exit ---

BOOT 

Press any key to abort OS load, or wait 5 seconds for OS to boot...
Launching kernel decompressor.
Starting LZMA Uncompression Algorithm.
Copyright (C) 2003 Texas Instruments Incorporated; Copyright (C) 1999-2003 Igor Pavlov.
Compressed file is LZMA format.
Kernel decompressor was successful ... launching kernel.

LINUX started...
Config serial console: ttyS0,38400
CPU revision is: 00018448
Primary instruction cache 16kb, linesize 16 bytes (4 ways)
Primary data cache 16kb, linesize 16 bytes (4 ways)
Number of TLB entries 16.
Linux version 2.4.17_mvl21-malta-mips_fp_le (khcheng@atmos2) (gcc version 2.95.3 20010315 (release/MontaVista)) #12 Tue Aug 31 18:43:49 SGT 2004
Determined physical RAM map:
 memory: 14000000 @ 00000000 (reserved)
 memory: 00020000 @ 14000000 (ROM data)
 memory: 007e0000 @ 14020000 (usable)
On node 0 totalpages: 2048
zone(0): 2048 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: 
the pacing pre-scalar has been set as 600.
calculating r4koff... 000b71b0(750000)
CPU frequency 150.00 MHz
Calibrating delay loop... 149.91 BogoMIPS
Freeing Adam2 reserved memory [0x14001000,0x0001f000]
Memory: 6312k/8192k available (1477k kernel code, 1880k reserved, 119k data, 60k init)
Dentry-cache hash table entries: 1024 (order: 1, 8192 bytes)
Inode-cache hash table entries: 512 (order: 0, 4096 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 2048 (order: 1, 8192 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Disabling the Out Of Memory Killer
devfs: v1.7 (20011216) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
pty: 32 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0xa8610e00 (irq = 15) is a 16550A
ttyS01 at 0xa8610f00 (irq = 16) is a 16550A
block: 64 slots per queue, batch=16
Using the MAC with internal PHY
PPP generic driver version 2.4.1
avalanche flash device: 0x400000 at 0x10000000.
 Amd/Fujitsu Extended Query Table v1.0 at 0x0040
number of CFI chips: 1
Looking for mtd device :mtd0:
Found a mtd0 image (0x90000), with size (0x160000).
Looking for mtd device :mtd1:
Found a mtd1 image (0x10000), with size (0x80000).
Looking for mtd device :mtd2:
Found a mtd2 image (0x0), with size (0x10000).
Looking for mtd device :mtd3:
Found a mtd3 image (0x1f0000), with size (0x10000).
Looking for mtd device :mtd4:
Found a mtd4 image (0x10000), with size (0x1e0000).
Creating 5 MTD partitions on "Physically mapped flash":
0x00090000-0x001f0000 : "mtd0"
0x00010000-0x00090000 : "mtd1"
0x00000000-0x00010000 : "mtd2"
0x001f0000-0x00200000 : "mtd3"
0x00010000-0x001f0000 : "mtd4"
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 512 bind 512)
Linux IP multicast router 0.06 plus PIM-SM
ip_conntrack version 2.0 (64 buckets, 512 max) - 364 bytes per conntrack
ip_tables: (c)2000 Netfilter core team
netfilter PSD loaded - (c) astaro AG
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NET4: Ethernet Bridge 008 for NET4.0
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 60k freed
serial console detected.  Disabling virtual terminals.
console=/dev/tts/0
init started:  BusyBox v0.61.pre (2004.03.30-19:34+0000) multi-call binary
Starting pid 9, console /dev/tts/0: '/etc/init.d/rcS'
 Standard Configuration File
proc write:Calling Configuration
Number of State module =  1
STATE =  1
STATE =  2
STATE =  3
module =  2
STATE =  1
STATE =  2
module =  3
STATE =  1
STATE =  2
STATE =  3
module =  5
STATE =  1
STATE =  2
STATE =  3
module =  6
STATE =  1
STATE =  2
STATE =  3
Elements = 14
Total Length = 116
Using /lib/modules/2.4.17_mvl21-malta-mips_fp_le/kernel/drivers/net/avalanche_usb.o
USB: Entering USB_init_module.
vid = 0x451
pid = 0x6060
No Serial Number String present.
man = Texas Instruments
prod = TI RNDIS Network Adapter
USB: Entering USB_Init.
USB: Leaving USB_Init.
USB: Leaving USB_init_module.
Using /lib/modules/2.4.17_mvl21-malta-mips_fp_le/kernel/drivers/atm/tiatm.o
registered device TI Avalanche SAR
Initializing DSL interface
size=10120
size=38720
size=46432
size=45312
dsl modulation = MMODE
Texas Instruments ATM driver: version:[4.02.04.00]
Waiting for enter to start '/bin/sh' (pid 34, terminal /dev/tts/0)

Please press Enter to activate this console. Sep  8 12:00:06 cm_monitor: Monitor Starting
Sep  8 12:00:07 cfgmgr(pppoe-102): Valid Configuration Tree
SIOCGIFFLAGS: No such device
Sep  8 12:00:07 cfgmgr(fdb): Firewall NAT service started
create:0
text2atm:0
Communicating over ATM 0.0.35
setsockopt SO_SNDBUF: (0) Success
assign:0
SIOCGIFFLAGS:0
SIOCGIFFLAGS:0
Sep  8 12:00:08 cfgmgr(bridge): Bridge Created: br0
device usbrndis entered promiscuous mode
Sep  8 12:00:09 cfgmgr(bridge): Bridge Interface Added: usbrndis
br0: port 1(usbrndis) entering learning state
device eth0 entered promiscuous mode
Sep  8 12:00:09 cfgmgr(bridge): Bridge Interface Added: eth0
br0: port 2(eth0) entering learning state
br0: port 1(usbrndis) entering forwarding state
br0: topology change detected, propagating
br0: port 2(eth0) entering forwarding state
br0: topology change detected, propagating
Sep  8 12:00:16 cfgmgr(sar): DSL Carrier is down


Starting pid 34, console /dev/tts/0: '/bin/sh'


BusyBox v0.61.pre (2004.03.30-19:34+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# 

Discussions