* Custom serial keyboard: playing dirty with the serial console
@ 2000-09-21 6:44 Paolo Scaffardi
2000-09-21 14:08 ` Geert Uytterhoeven
2000-09-21 14:18 ` Michael Schmitz
0 siblings, 2 replies; 4+ messages in thread
From: Paolo Scaffardi @ 2000-09-21 6:44 UTC (permalink / raw)
To: linuxppc-dev
We have a custom IR keyboard & mouse, that i have attached to the serial
port of my board (i have an embedded powerpc). Its protocol is called 4PPM,
and i had to write a driver that intercepts these serial characters, decodes
and convert them to standard XT scancodes.
Serial routines were implemented, yet, and i decided to 'insert' my 4PPM
layer inside of the serial console driver.
Everything is now ok: i receive correct packets, convert them to XT
scancodes and call 'handle_scancode' to process them.
But 'handle_scancode' only prints characters to the console, without
apparently processing them. I see everything i write, but when i press enter
(scancode 0x1c), i only see a new line in the console, not any new bash
prompt.
Why this? Is it correct to intercept the serial console and not returning
single characters from inside it but from 'handle_scancode' mode?
Who know that?
THANX!
- may the pinguin b with u -
Have a nice day,
Paolo Scaffardi.
AIRVENT SAM s.p.a. - RIMINI - ITALY
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Custom serial keyboard: playing dirty with the serial console
2000-09-21 6:44 Custom serial keyboard: playing dirty with the serial console Paolo Scaffardi
@ 2000-09-21 14:08 ` Geert Uytterhoeven
2000-09-21 14:18 ` Michael Schmitz
1 sibling, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2000-09-21 14:08 UTC (permalink / raw)
To: Paolo Scaffardi; +Cc: linuxppc-dev
On Thu, 21 Sep 2000, Paolo Scaffardi wrote:
> We have a custom IR keyboard & mouse, that i have attached to the serial
> port of my board (i have an embedded powerpc). Its protocol is called 4PPM,
> and i had to write a driver that intercepts these serial characters, decodes
> and convert them to standard XT scancodes.
>
> Serial routines were implemented, yet, and i decided to 'insert' my 4PPM
> layer inside of the serial console driver.
>
> Everything is now ok: i receive correct packets, convert them to XT
> scancodes and call 'handle_scancode' to process them.
handle_scancode() is indeed the correct routine to feed scancodes into the
system.
> But 'handle_scancode' only prints characters to the console, without
> apparently processing them. I see everything i write, but when i press enter
> (scancode 0x1c), i only see a new line in the console, not any new bash
> prompt.
>
> Why this? Is it correct to intercept the serial console and not returning
> single characters from inside it but from 'handle_scancode' mode?
Are you in serial console mode, or in normal console mode?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Custom serial keyboard: playing dirty with the serial console
2000-09-21 6:44 Custom serial keyboard: playing dirty with the serial console Paolo Scaffardi
2000-09-21 14:08 ` Geert Uytterhoeven
@ 2000-09-21 14:18 ` Michael Schmitz
1 sibling, 0 replies; 4+ messages in thread
From: Michael Schmitz @ 2000-09-21 14:18 UTC (permalink / raw)
To: Paolo Scaffardi; +Cc: linuxppc-dev
>From schmitz@opal.biophys.uni-duesseldorf.de Thu Sep 21 16:18:37 2000
Newsgroups:
Date: Thu, 21 Sep 2000 16:18:37 +0200 (CEST)
From: Michael Schmitz <schmitz@opal.biophys.uni-duesseldorf.de>
To: Paolo Scaffardi <arsenio@tin.it>
cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: Custom serial keyboard: playing dirty with the serial console
Fcc: sent-mail
In-Reply-To: <003601c02397$670ccd60$0a00010a@paoloweb>
Message-ID: <Pine.LNX.4.10.10009211614300.28518@opal.biophys.uni-duesseldorf.de>
X-Reply-UID: (2 > )(1 940426103 5996)/home/opal/schmitz/mail/linuxppc-dev
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
> Everything is now ok: i receive correct packets, convert them to XT
> scancodes and call 'handle_scancode' to process them.
>
> But 'handle_scancode' only prints characters to the console, without
> apparently processing them. I see everything i write, but when i press enter
> (scancode 0x1c), i only see a new line in the console, not any new bash
> prompt.
>
> Why this? Is it correct to intercept the serial console and not returning
> single characters from inside it but from 'handle_scancode' mode?
I don't think so - serial console is supposed to be used with terminals or
terminal emulators which send ASCII codes not scancodes. Try to directly
call handle_scancode (possibly via some glue code like keyboard_input for
ADB) from the serial interrupt without going over the tty line discpline.
Michael
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Custom serial keyboard: playing dirty with the serial console
[not found] <002801c02314$eb3c75a0$0a00010a@paoloweb>
@ 2000-09-21 23:52 ` James Simmons
0 siblings, 0 replies; 4+ messages in thread
From: James Simmons @ 2000-09-21 23:52 UTC (permalink / raw)
To: Paolo Scaffardi; +Cc: linuxcon, Linux/PPC Development
> But 'handle_scancode' only prints characters to the console, without
> apparently processing them. I see everything i write, but when i press
> enter (scancode 0x1c), i only see a new line in the console, not any new
> bash prompt.
Hum? Try running the program showkey. It prints out the key codes for the
keys you press. Can you post the results. If you are translating the codes
into XT scancodes then it shpould make what I get with showkey. BTW make
sure you tell me what keys you pressed.
P.S.
As I move to californis these next 2 weeks my email service will be
switching. This means I will not be able to read my email from Friday
until October 2.
MS: (n) 1. A debilitating and surprisingly widespread affliction that
renders the sufferer barely able to perform the simplest task. 2. A disease.
James Simmons [jsimmons@linux-fbdev.org] ____/|
fbdev/console/gfx developer \ o.O|
http://www.linux-fbdev.org =(_)=
http://linuxgfx.sourceforge.net U
http://linuxconsole.sourceforge.net
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-09-21 23:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-09-21 6:44 Custom serial keyboard: playing dirty with the serial console Paolo Scaffardi
2000-09-21 14:08 ` Geert Uytterhoeven
2000-09-21 14:18 ` Michael Schmitz
[not found] <002801c02314$eb3c75a0$0a00010a@paoloweb>
2000-09-21 23:52 ` James Simmons
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).