OpenWrt Forum Archive

Topic: Netgear DG834GT Serial Console Port

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

Added a Serial Console Port to the Netgear DG834GT

In the lower left corner of the router with it facing you is the pads for the serial port, named J503 next to it are also the JTAG header named J201 (I have not tested if it actually works...)

The serial port is a RS422 port so it requires a Maxim MAX232 to get the 3,3v levels of the RS422 port to the 12v levels a PC's RS232 port uses... I wont bother you with the details on this since this is the same type of IC you need for interfacing with for example a Linksys WRT54G(S) and ZyXEL Prestige 645 so enough info about this is already posted on the web ;-)

Here is the Netgear booting, with 115200, No Parity, 1 Stopbit 8 Paritybits and Software flow control:

 
©CFE öersiïn ±.0.3·-5®11 fïr BCM96³48 (³2bét,SP¬BE)
Buéld Dáteº Fri Sep 17 ±5:59º48 CST ²004 (roït@Ruî-P´)
©ïpyright (C) ²00°,200±,2002,2°03 Bòoaäcom Ãorðoratéon.
Énitiálizing Árena®
Énitiálizing Äevicås. 
©bcm6348ånet: inét_emácîternál_ïpen
CPU tùpe 0ø29±07: ²56MHz, Âus: ±28ÍHz, Òef: 32MÈz
©Toôal måmory usåd by CFÅ:  0ø8040100° - 0ø80µ1C91° (11614¸8)
©BSS Areá:                  0ø8041¹2D° - 0ø8041A91° (56¹6) 
                                                           Locál Heap:         
©Stacë Area:                0x8051Á910 ­ 0ø8051Ã910 (81¹2)
Ôexô (coäe) segmånt:       0x¸04°1000 - 0x¸04±8624 (9µ780) 
                                                           Booô aòea (ðhysical©:
      °x005±D000 - °x0055D0°0
©åloãatioî Factorº         I:0°000000 ­ D:0°00°000
Bïard ÉP áddreós                : 1¹2.168.1®1:ffæffæ00   
                                                         Host IÐ addòesó     
         º 1¹2.16¸.1.100  
Gaôewáy IP address              :
©Defaõlt host run æile namå      : vmliîux 
Dåfault hïst fìasè filå name    : bãm9¶3xx_æs_kerneì
Âooô deláy (0-9 óeconäs)        : 1   
                                      Boaòd Éd Naíe                   º 96348G×-
10  
Ðsi séze in KÂ                  : ±6
©Etèerneô PHY Tyðe               : Inôernaì:54:e7:¹2
Íemorù séze iî MB               : ±6
©**ª Press ány kåy ôo stïp auto òun (± såcondó) ***
Áuto òun secoîd ãount downº 1ˆ°
©Closing netwïrk®46c000°, Åntry Addråssº 0x8°01046c
©Total Flash size: 4096K with 71 sectors
Scratch pad is not used for this flash part.
96348GW-10 prom init
CPU revision is: 00029107
Primary instruction cache 16kb, linesize 16 bytes (2 ways)
Primary data cache 8kb, linesize 16 bytes (2 ways)
Linux version 2.4.17 (root@Run-P4) (gcc version 3.1) #356 Mon May 16 13:00:33 CS
T 2005
Determined physical RAM map:
 memory: 00fa0000 @ 00000000 (usable)
On node 0 totalpages: 4000
zone(0): 4000 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/mtdblock0 ro
bcm_console_setup
Calibrating delay loop... 255.59 BogoMIPS
Memory: 13960k/16000k available (1357k kernel code, 2040k reserved, 92k data, 56
k init, 0k highmem)
Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes)
Inode-cache hash table entries: 1024 (order: 1, 8192 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: 4096 (order: 2, 16384 bytes)
Checking for 'wait' instruction...  unavailable.
POSIX conformance testing by UNIFIX
PCI: Fixing up bus 0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
devfs: v1.7 (20011216) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
brcmboard: brcm_board_init entry
Module bcm63xx_cons.c v1.1 May 16 2005 13:01:04
block: 64 slots per queue, batch=16
PPP generic driver version 2.4.1
blaadd: blaa_detect entry
adsl: adsl_init entry
Broadcom BCM6348A2 Ethernet Network Device v0.1 May 16 2005 13:04:32 External PH
Y Reverse MII (SPI Device 1)
eth0: MAC Address: 00:0F:B5:54:E7:92
 Amd/Fujitsu Extended Query Table v1.1 at 0x0040
number of CFI chips: 1
Creating 4 MTD partitions on "Physically mapped flash":
0x00010100-0x00298100 : "fs"
mtd: partition "fs" doesn't start on an erase block boundary -- force read-only
0x00010000-0x003f0000 : "tag+fs+kernel"
0x00000000-0x00010000 : "bootloader"
0x003f0000-0x00400000 : "nvram"
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 1024)
Linux IP multicast router 0.06 plus PIM-SM
ipt_random match loaded
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 (cramfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 56k freed
serial console detected.  Disabling virtual terminals.
console=/dev/console
init started:  BusyBox v0.61.pre (2005.05.16-03:07+0000) multi-call binary
Starting pid 13, console /dev/console: '/usr/etc/rcS'
Algorithmics/MIPS FPU Emulator v1.5
Using /lib/modules/push_button.o
Using /lib/modules/2.4.17/kernel/net/ipv4/netfilter/ipt_REJECT.o
ap_name=wlan action=stop
bridge br0 doesn't exist!
bridge br0 doesn't exist!
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
rmmod: ath_ap_mips: No such file or directory
BcmAdsl_Initialize=0x800AB328, g_pFnNotifyCallback=0x80186980
AdslCoreHwReset: AdslOemDataAddr = 0xA0FF73B0
device eth0 entered promiscuous mode
eth0 Link UP.
ap_name=(null) action=start
br0: port 1(eth0) entering listening state
br0: port 1(eth0) entering learning state
br0: port 1(eth0) entering forwarding state
br0: topology change detected, propagating
killall: syslogd: no process killed
killall: upnpd: no process killed
SIOCADDRT: File exists
Waiting for enter to start '/bin/sh' (pid 108, terminal /dev/console)

Please press Enter to activate this console. UPnP Initialized
Intialized UPnP
        with fullurl=http://192.168.0.1:49152/gateway.xml
                     ipaddress=192.168.0.1 port=49152
             web_dir_path=/usr/upnp/
             desc_doc_url=http://192.168.0.1:49152
Specifying the webserver root directory -- /usr/upnp/
Registering the RootDevice
RootDevice Registered
Initializing State Table
fullurl http://192.168.0.1:49152/gateway.xml
Advertisements Sent

Starting pid 108, console /dev/console: '/bin/sh'


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

# cat /proc/cpuinfo
system type             : 96348GW-10
processor               : 0
cpu model               : BCM6348 V0.7
BogoMIPS                : 255.59
wait instruction        : no
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : no
hardware watchpoint     : no
VCED exceptions         : not available
VCEI exceptions         : not available
# free
              total         used         free       shared      buffers
  Mem:        14016         6080         7936            0          940
 Swap:            0            0            0
Total:        14016         6080         7936
# ls
bin      etc      proc     tmp      var      www.deu  www.fre
dev      lib      sbin     usr      www      www.eng  www.ita
#

I have no idea why the output is garbaged when loading the bootloader, perhaps the serial port has not been setup at that stage of the boot process...

Pin 1 = GND
Pin 2 = TX
Pin 3 = VCC
Pin 4 = RX

The reason I added the serial port was because I was hoping the Netgear would have an OS similar to Zywall or IOS where it is easy to specify and test different connection settings... Unfortunately (for me) it is running Linux so I wont be able to look further into why this ADSL modem will not work together with Ericsson DSLAM equipment... I only get sync, no data is exchanged with the DSLAM thus I get no IP Address... Funny thing is that a DG834G works fine with said DSLAM...

Or perhaps someone knows of a newer "driver" for the Broadcom BCM6348 chip in this router? Would be worth trying....

http://hem.spray.se/hanzzzon/dg834gtserial.jpg

This is what I get in the console when I plugin the phone cable:

RFC1483/2684 bridge: Interface "nas0" created sucessfully

RFC1483/2684 bridge: Communicating over ATM 0.8.35, encapsulation: LLC

RFC1483/2684 bridge: Interface configured
ap_name=wan_basic action=stop
rm: cannot remove `/tmp/wan_uptime': No such file or directory
rm: cannot remove `/tmp/dhcpc.lease': No such file or directory

And this is then the new list of running demons:

# ps
  PID  Uid     VmSize Stat Command
    1 root        876 S    init
    2 root            S    [keventd]
    3 root            S    [ksoftirqd_CPU0]
    4 root            S    [kswapd]
    5 root            S    [bdflush]
    6 root            S    [kupdated]
   11 root            S    [mtdblockd]
   58 root        624 S    /sbin/klogd
   62 root            S    [ath helper]
  104 root            S    [ath hskpng]
  118 root        612 S    /usr/sbin/netgear_ntp -z GMT+0
  119 root        680 S    /usr/sbin/mini_httpd -d /www -r NETGEAR DG834GT  -c
  125 root       2092 S    /usr/sbin/upnpd nas0 br0 30 4
  128 root        620 S    /usr/sbin/crond
  130 root        648 S    /sbin/syslogd -f /etc/syslog.conf
  131 root        612 S    /usr/sbin/scfgmgr
  135 root        604 S    /usr/sbin/cmd_agent_ap
  136 root        604 S    /usr/sbin/pb_ap
  153 root        888 S    -sh
  154 root       2092 S    /usr/sbin/upnpd nas0 br0 30 4
  155 root       2092 S    /usr/sbin/upnpd nas0 br0 30 4
  157 root       2092 S    /usr/sbin/upnpd nas0 br0 30 4
  158 root       2092 S    /usr/sbin/upnpd nas0 br0 30 4
  159 root       2092 S    /usr/sbin/upnpd nas0 br0 30 4
  181 root       1168 S    /usr/sbin/br2684ctl -c 0 -e 0 -a 0.8.35 -b
  187 root        640 S    /usr/sbin/udhcpc -i nas0 -s /etc/udhcpc.script
  284 root        876 R    ps
#

There is a recovery console, however since the output at this stage is garbaged it is not very easy to read it however here is the output of me first pressing enter, then ? and last writing help:

.Auôo ruî second counô dïwn: ± ruî (1 óeconds) ***
.FE> .
.CFÅ> CÆE>
CFE. ?.
       Inváliä comíanä: "?¢
.váiláble .omíaîdso d¬ á, ö, e, r, p¬ c¬ f, é, â, reóet¬ ælaóhimaçe, help.
.*a* .ommaîd ótátuó = -±
.Aváilabìe .ommaîdso
.a                   .síod.d
                           w                   Writå tèe whïle iíagå sôaòt æromè
å                   Eòaóe .n]vrám ïr [a.ll fìasè eØcåpt bootòom.
                                                                ò              .
.i                   Årase peòsistånt sôoráge dáta.                            o
                                                   b                   Chançe âs
òesåt               Råseô ôhe boarä
æláshémaçe          Fìaóheó a cïmpòesseä iíaçe áftår thå booôloádår..
                                                                     hel.      .

.CÆE> .míand ótaôus = 0ouô á cïmmánä, ånter 'hål. cïmmánä-náme'
.CFÅ>  CÆE.
.FÅ> .
      CFE.

There seems to be the possibility of flashing in a new firmware, hopefully via xmodem... So if someone has any pointers on how to fix the output that would be nice for everyone that has bricked their DG834GT... Of course there also is a JTAG header but I have found no mention of how to utialize it...

It looks like some sort of parity is switched on during the boot phase. Try setting your emulation to 7E1 or 7O1.

Did not work, I got no output at all with those settings...

My serial console worked properly for the CFE boot loader on my dg834gt.
I'm using 115200 8N1 and no flow control.

Very strange, those are the exact same settings that I use...

I can recognise enough of the CFE output to be see that we have the same version of CFE.
None of the boot loader parameters that I can set inside CFE look like they affect the serial console.

It is hard to explain why the kernel works and CFE doesn't.
Perhaps your terminal is getting messed up by a control character?

I'm using an FTDI FT232BM on a DLP-TXRX board rather than a max232 but that shouldn't make a difference.

I played a little with my the terminal app I use, Hyperterminal included in Windows 2000...

And when I set the emulation manually to vt52 instead of "identify" the text was somewhat more readable...

What terminal application do you use?

I use minicom, running inside a gnome-terminal on a linux box.

Haha, problem solved...

I tried using minicom on one of my Linux machines, the output was perfect then ;-)

Another bug to add to MS list ;-)

Edit; Anyone know of a decent terminal app for Windows?

SecureCRT smile

Kaloz; I just tried SecureCRT, the problem was the same... I tried with all different emulation modes but it did not work with any of them... On minicom I used VT102 and that worked just fine...

This is a very strange problem....

Tried the thing on another Win2K workstation using Hyperterminal, output was fine... Go figure... Here is the output of the CFE:

CFE version 1.0.37-5.11 for BCM96348 (32bit,SP,BE)
Build Date: Fri Sep 17 15:59:48 CST 2004 (root@Run-P4)
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.

Initializing Arena.
Initializing Devices.
internal_open
bcm6348enet: init_emac
CPU type 0x29107: 256MHz, Bus: 128MHz, Ref: 32MHz

Total memory used by CFE:  0x80401000 - 0x8051C910 (1161488)
Initialized Data:          0x80418630 - 0x804192D0 (3232)
BSS Area:                  0x804192D0 - 0x8041A910 (5696)
Local Heap:                0x8041A910 - 0x8051A910 (1048576)
Stack Area:                0x8051A910 - 0x8051C910 (8192)
Text (code) segment:       0x80401000 - 0x80418624 (95780)
Boot area (physical):      0x0051D000 - 0x0055D000
Relocation Factor:         I:00000000 - D:00000000

Board IP address                : 192.168.1.1:ffffff00
Host IP address                 : 192.168.1.100
Gateway IP address              :
Run from flash/host (f/h)       : f
Default host run file name      : vmlinux
Default host flash file name    : bcm963xx_fs_kernel
Boot delay (0-9 seconds)        : 1
Board Id Name                   : 96348GW-10
Psi size in KB                  : 16
Number of MAC Addresses (1-32)  : 2
Base MAC Address                : 00:0f:b5:54:e7:92
Ethernet PHY Type               : Internal
Memory size in MB               : 16

*** Press any key to stop auto run (1 seconds) ***
Auto run second count down: 1
CFE>
CFE> help
Available commands:

d                   Download
a                   Asmod
w                   Write the whole image start from beginning of the flash
e                   Erase [n]vram or [a]ll flash except bootrom
r                   Run program from flash image or from host depend on [f/h] fl
ag
p                   Print boot line and board parameter info
c                   Change booline parameters
f                   Write image to the flash
i                   Erase persistent storage data
b                   Change board parameters
reset               Reset the board
flashimage          Flashes a compressed image after the bootloader.
help                Obtain help for CFE commands

For more information about a command, enter 'help command-name'
*** command status = 0
CFE> help w

  SUMMARY

     Write the whole image start from beginning of the flash

  USAGE

     eg. w [hostip:]whole_image_file_name

*** command status = 0
CFE>

Just FYI I tried the thing on a friends Win2K machine and it also showed garbaged output...

Finally compiled udhcp v0.9.8, unfortuantley it did not fix the problem. I should have understood that since the DG834G also uses udhcp v0.9.7 but that one does work with ericsson dslam's...

But I did get some interesting output from the console, I did a search on google for "info, unrelated/bogus packet" and found this: http://www.busybox.net/lists/busybox/20 … 14515.html

I tried that patch but it did not help either...

Lastly I tried to compile tcpdump for the big-endian mips CPU in the DG834GT but this far I have been unable to get it working... It would be interesting to run tcpdump on both the DG834G and GT models on the same DSL line and see what the differences are (if any) in the first few packets relating to the DHCP request packets...

RFC1483/2684 bridge: Interface "nas0" created sucessfully

RFC1483/2684 bridge: Communicating over ATM 0.8.35, encapsulation: LLC

RFC1483/2684 bridge: Interface configured
info, udhcp client (v0.9.8) started
info, adapter index 7
info, adapter hardware address 00:0f:b5:54:e7:93
info, execle'ing /etc/udhcpc.script
ap_name=wan_basic action=stop
rm: cannot remove `/tmp/wan_uptime': No such file or directory
rm: cannot remove `/tmp/dhcpc.lease': No such file or directory
info, entering raw listen mode
info, Opening raw socket on ifindex 7

info, adding option 0x35
info, adding option 0x3d
info, adding option 0x3c
debug, Sending discover...
info, Waiting on select...

info, adding option 0x35
info, adding option 0x3d
info, adding option 0x3c
debug, Sending discover...
info, Waiting on select...

info, adding option 0x35
info, adding option 0x3d
info, adding option 0x3c
debug, Sending discover...
info, Waiting on select...

info, Waiting on select...

info, unrelated/bogus packet
info, Waiting on select...

info, unrelated/bogus packet
info, Waiting on select...

info, unrelated/bogus packet
info, Waiting on select...

info, adding option 0x35
info, adding option 0x3d
info, adding option 0x3c
debug, Sending discover...
info, Waiting on select...

info, adding option 0x35
info, adding option 0x3d
info, adding option 0x3c
debug, Sending discover...
info, Waiting on select...

info, adding option 0x35
info, adding option 0x3d
info, adding option 0x3c
debug, Sending discover...
info, Waiting on select...

info, Waiting on select...

The discussion might have continued from here.