Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have an old router which runs Linux and I'd like to have a serial console on. This used to work fine, but after a firmware update, I can now only get output on the console and cannot give any input back to the device. During boot there is a line that says "Console input is disabled" that wasn't there before.

Without changing the firmware, how do I re-enable input on the serial console?

... my attempts so far ...

I can log in over the LAN and load any files (and cross compile tools if need be), and there is a small non-volatile user flash partition, so any solution requiring me to write a quick program using ioctl or whatnot is fine. The embedded Linux has the system files like /sys/bus and /sys/devices/platform/serial8250.0 and so on in case that is useful. The files /dev/console, /dev/ttyS0, /dev/tty all have read and write permissions. Running getty -L 115200 ttyS0 makes a login prompt appear on the serial console, but I can't get it to accept any input. Adding the line

::respawn:-/bin/sh

to inittab makes busybox give a shell prompt ... but again, the serial console won't take input.

dmesg reports

Kernel command line: root=/dev/ram rw init=/init console=ttyS0,115200

and stty gives

speed 38400 baud; line=0;  

along with a bunch of unimportant looking settings, stty -a -F /dev/ttyS0 gives

speed 115200 baud; stty: /dev/ttyS0  
line = 0;  

(and a whole bunch of settings that don't look important, but I'll type them up if people need them.)

I'm at a loss here, so I'm not sure what information is needed.
Any ideas for solving this puzzle? I have a feeling there is something simple I forgot to try.

share|improve this question
    
So this is special-purpose hardware that runs Linux as its firmware? They may have changed a hardware setting to prevent reading the input. Would a stty -a (lists all stty settings) give us more clues? Perhaps the kernel boot string specifies some different options now? –  kurtm Oct 10 '13 at 15:47

2 Answers 2

The busybox example inittab looks a little different,

# Example of how to put a getty on a serial line (for a terminal)
#
#::respawn:/sbin/getty -L ttyS0 9600 vt100
#::respawn:/sbin/getty -L ttyS1 9600 vt100

could you give this a try?

share|improve this answer
    
Same as before, it makes a login prompt appear on the serial console, but I can't give it any input. I need to somehow enable input on /dev/console or something. –  CuriousPuzzleSolver Jan 26 '12 at 16:44

I see this is a very old post, but I recall having seen some similar problem after updating a Samsung TV. Probably the router model you have, belong to some company who doesn't allow external modifications like OpenWRT etc. For example, a common way to disable terminal shell access is to disable it in the kernel sources /linux-2.6.35.11/drivers/char/n_tty.c or compile kernel with: CONFIG_SERIAL_INPUT_DISABLE_STRING...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.