Changes between Version 2 and Version 3 of SerialConsole


Ignore:
Timestamp:
Nov 18, 2012, 7:17:48 PM (10 years ago)
Author:
amain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SerialConsole

    v2 v3  
    55With a serial console connection It is possible to:
    66
    7    * Access to [wiki:Bootloader bootloader]
    8    * Re-flash a firmware
     7   * Access the [wiki:Bootloader bootloader]
     8   * Re-flash firmware
    99   * Follow (debug) output of the entire boot process of the device
    10       * loading and executing the kernel,
    11       * init output
    12    * Login to the device
     10      * loading and executing the kernel
     11      * linux init output
     12   * Login to the Linux
    1313
    1414Most router / consumer products will require to solder some wires to the board and connect that to a Level Converter (USB) before it can be connected to a PC. This is due to voltage differences between embedded devices and PC's. There are very check USB TTL converters available. It requires soldering 3 wires (RT, TX and GND) on the board of the device to the USB TTL converter. The USB converter can be directly inserted into a USB port of a PC and will provide a /dev/ttyUSBn serial device.
     
    1818OpenWrt has a very good generic page on this soldering and level conversion: [http://wiki.openwrt.org/doc/hardware/port.serial Serial Console]. And many device specific pages on OpenWrt describe some details for that device on how to connect using a serial console.
    1919
    20 Managing to get a serial console interface to your device is one thing, a second thing is how to connect to it, and more importantly, how to interrupt the bootloader from booting directly into the kernel and flash a new firmware. In the example below I use minicom. There are more terminal programs available, however they will all require to set the serial connections settings as below.
     20Managing to get a serial console interface to your device is one thing, a second thing is how to connect to it, and more importantly, how to interrupt the [wiki:Bootloader bootloader] from booting directly into the kernel and flash a new firmware. In the example below I use minicom. There are more terminal programs available, however they will all require to set the serial connections settings as below.
    2121
    22 == Minicom Configuration ===
     22=== Minicom Configuration ===
    2323
    24 Configure minicom using minicom -s. 
     24Use dmesg to see which device name has been assigned to the serial port connection to your device and next configure minicom using minicom -s.
     25
     26{{{
     27[    8.554670] usb 2-2: cp210x converter now attached to ttyUSB0
     28}}}
    2529
    2630{{{
     
    4650}}}
    4751
    48 ...
     52=== Minicom ===
     53
     54Minicom example on the TP-Link TL-WR1043ND. Start mini com, now without -s. Type "enter" once to see some output, or unplug and plug the power to your router and follow the boot process. See [wiki:Bootloader bootloader] on how to interrupt the bootloader from automatically loading / booting the kernel.
     55
     56{{{
     57
     58Welcome to minicom 2.4
     59
     60OPTIONS: I18n
     61Compiled on Sep  5 2010, 08:31:32.
     62Port /dev/ttyUSB0
     63
     64Press CTRL-A Z for help on special keys
     65
     66                                       
     67                                       
     68U-Boot 1.1.4 (Mar 31 2012 - 10:40:21)   
     69                                       
     70AP83 (ar9100) U-boot 0.0.11             
     71DRAM:                                   
     72sri                                     
     7332 MB                                   
     74id read 0x100000ff                     
     75flash size 8MB, sector count = 128     
     76Flash:  8 MB                           
     77Using default environment
     78
     79In:    serial
     80Out:   serial
     81Err:   serial
     82Net:   ag7100_enet_initialize...
     83No valid address in Flash. Using fixed address
     84: cfg1 0xf cfg2 0x7114
     85eth0: 00:03:7f:09:0b:ad
     86eth0 up
     87eth0
     88Autobooting in 1 secondsar7100>
     89ar7100>
     90
     91
     92 CTRL-A Z for help |115200 8N1 | NOR | Minicom 2.4    | VT102 |      Offline                       
     93
     94}}}