OpenWrt Forum Archive

Topic: serial port login

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

I try to login to my ASUS wl500g premium via serial line. the serial connection works, for example this works:

# stty -F /dev/usb/tts/0 9600
# echo test > /dev/usb/tts/0

so i can see "test" on the serial line. however a

# getty -L 9600 -l /bin/login2 -L /dev/usb/tts/0 vt100
prints the login promt to the serial line, i enter root then getty closes:

output of the serial client:
OpenFoensi login: root
  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
WHITE RUSSIAN (0.9) -------------------------------
  * 2 oz Vodka   Mix the Vodka and Kahlua together
  * 1 oz Kahlua  over ice, then float the cream or
  * 1/2oz cream  milk on the top.
---------------------------------------------------


content of /bin/login2:
#!/bin/ash --login

any hints how to login via serial line?

it looks like "screen /dev/..." should do the trick!

michu wrote:

it looks like "screen /dev/..." should do the trick!

WRONG! ..

root@OpenFoensi:~# dmesg | grep ftdi
ftdi_sio.c: v1.3.5:USB FTDI Serial Converters Driver
ftdi_sio.c: write request of 0 bytes
ftdi_sio.c: write request of 0 bytes
ftdi_sio.c: write request of 0 bytes
ftdi_sio.c: write request of 0 bytes
ftdi_sio.c: write request of 0 bytes
ftdi_sio.c: write request of 0 bytes
ftdi_sio.c: write request of 0 bytes
ftdi_sio.c: write request of 0 bytes
ftdi_sio.c: write request of 0 bytes
root@OpenFoensi:~# dmesg | grep FTDI
usbserial.c: USB Serial support registered for FTDI SIO
usbserial.c: USB Serial support registered for FTDI 8U232AM Compatible
usbserial.c: USB Serial support registered for FTDI FT232BM Compatible
ftdi_sio.c: v1.3.5:USB FTDI Serial Converters Driver
usbserial.c: FTDI 8U232AM Compatible converter detected
usbserial.c: FTDI 8U232AM Compatible converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
usbserial.c: FTDI 8U232AM Compatible converter now disconnected from ttyUSB0
usbserial.c: FTDI 8U232AM Compatible converter detected
usbserial.c: FTDI 8U232AM Compatible converter now attached to ttyUSB0 (or usb/tts/0 for devfs)

does someone use this serial-rs232 converter? a simple echo blahbla > /dev/usb/tts/0 works, however a dmesg > /dev/usb/tts/0 does not really... it display about 10 lines then it just "hangs"... then when i reboot the router he writes about 5 lines more...

when the serial port hangs, this message get logged:
Jan  1 00:26:38 (none) kern.err kernel: ftdi_sio.c: write request of 0 bytes

i guess it is something about flow control.. but i think i set it right, i use this command:

stty -F /dev/usb/tts/0 9600 cs8 cstopb -parity -crtscts

before i started getty

/sbin/getty -n -L /dev/usb/tts/0 9600 vt100 -n -l /bin/sh

any hints?

cheers

(Last edited by michu on 4 Apr 2007, 22:44)

Hi Michu,

Quite long ago, but:
Did you get it working?

I got a "Asus WL-500g Premium" with "KAMIKAZE (7.09)", a "FTDI USB Serial Device converter (FT232BM)" and an old serial VT220 Terminal which i want to use to login without having to boot up any PC and connect via ssh to openwrt..

The discussion might have continued from here.