Click to See Complete Forum and Search --> : direct the Linux console the USB port


iikent
01-17-2004, 10:46 PM
Hello,

I am working on a target board running Linux with USB
only and without serial port.
I want to direct the Linux console the USB port, so
that i can remote control it on PC.
Now, i can send the shell output to PC side by running
following command on target board:
sh -i > /dev/myUSB

However, would you share with me some ideas on how to
replace serial port by USB port in a more complete
way? e.g. seeing bootup message, input/output console
thru USB port...


Kent

mdwatts
01-18-2004, 07:19 AM
I have no idea how that could be done.

See if these G4L search results for 'console on usb' (http://www.google.com/linux?hl=en&lr=&ie=ISO-8859-1&q=console+on+usb&btnG=Google+Search) help. The first one looks promising.

It could be you need to compile a new kernel with a kernel option enabled. Also have a look at /etc/inittab (mingetty lines).

bwkaz
01-18-2004, 02:58 PM
Also see this post to the kernel mailing list:

http://www.ussg.iu.edu/hypermail/linux/kernel/0308.2/1076.html

(Some of the initial comments here bogus according to later posts, but the last three sentences are all that's important.)

Basically, it sounds like you may be asking for trouble, since USB requires that interrupts are on for it to work.

iikent
01-18-2004, 09:35 PM
Thanks guys.

I think it's not possible to see the bootup message from USB.

How about start a shell to get input and print out thru USB?
sh -i >/dev/myUSB can direct the output, but can't receive input, this is the problem.

bwkaz
01-18-2004, 11:43 PM
sh -i <>/dev/ttyUSB0

maybe? If that doesn't work, then maybe:

( /bin/sh -i 1>&3 2>&3 0<&3 ) 3<>/dev/ttyUSB0

which will run the shell in a subshell, redirecting the subshell's file descriptor 3 (which is normally unused) to ttyUSB0 for both reading and writing, then sending all output to that and getting all input from it.