Hi! On Fri, 2010-01-15 at 14:18 +0100, Bernd Petrovitsch wrote: > Hi! > > On Fre, 2010-01-15 at 03:47 +1100, Microbit_Ubuntu wrote: > [...] > > Having dug around more, I am now getting the impression that my problem > > is actually NOT getting console tty1 output to my serial ttyS0... > > > > Eg. after boot, I login on ttyS0, ok, I get prompt. > > If I then login from tty1 (the USB HID keyboard), I don't get any output > > on serial (ttyS0). > Well, I would expect output on tty1 if the input came from tty1. > And for ttyS0 the same. > > > BUT if I type in a valid command from USB HID, eg. 'reboot', my embedded > > system indeed reboots. > > Ah, you want to have an USB-keyboard on tty1 as input and the output > should appear on ttyS0? > Is that easier than using the serial line as input from `minicom`? > > Hmm, perhaps it's easier to fiddle with HID/USB/... stuff so that the > input from tty1 is actually copied/transferred/injected/... into ttyS0 > as if it was typed over the serial line. > Sorry, but I'm no USB guru (or udev or ...) to help with that. > > Bernd Thanks for reviewing Bernd. In the meantime I got there so-so. I'm still limping along with ttysnoop, but it works. The biggest problem was that ttysnoop uses the legacy BSD PTYs. Of course my kernel wasn't set for that. Then using ttysnoop v0.12d.k26 (which is supposed to work for kernel 2.6.X), still no proper output. I used the posix_openpt() instead of getpt() call, but still no go. Then I replaced that with using : open("/dev/ptmx", O_RDWR) instead and then it _finally_ fired up. Starting ttys now creates /dev/pts/x properly. (so legacy ptys can be disabled again) BTW, I normally use puTTY for SSH/SSL, so I use that for ttyS0 as well. I tried minicom (IIRC is that supposed to be the one that mimics Telix???), but I couldn't find a way to display more than 80 columns on my Ubuntu host ??? The advantage with the "hard" keyboard is that I can now easily send various control codes that I can't send from my serial terminal. Even simple things like the ctrl-alt-del - I can't invoke a reboot this way with serial. If I really bugger up and crash system (all part of learning :-), then my NAND Flash wasn't sync'd when I press reset on my board. But with USB keyboard I can use 3 finger salute and still have a proper killall so my flash stays clean (I find the JFFS2 CRC warnings/errors quite annoying). But as above, I'm not 100% happy to use ttysnoops/ttysnoop. One reason is that some control codes aren't passed on properly (problem if they are meant for console output and not kernel itself at times). The docs do say that will properly never be the case. I am still not sure, but the point of the exercise was to find out whether some user space app is needed to send ttyx to ttyS0, or if there was a simpler way. If anyone knows of a better way than using ttysnoop, I would still love to hear about it ! PS : One weird thing is that I don't have echo of typed characters on HID until I log in... (ie. I can't see the typing of my user name). But that's only very minor as it's a simple default 'root' username and no password on my development embedded board. I also have a query about monitor/console ouput via USB, but I will post that separately. -- Best regards, Kris -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ