* [U-Boot] usbkbd input double echoed
@ 2014-11-23 15:07 Nikita Kiryanov
2014-11-23 15:18 ` Hans de Goede
0 siblings, 1 reply; 3+ messages in thread
From: Nikita Kiryanov @ 2014-11-23 15:07 UTC (permalink / raw)
To: u-boot
Hi all,
I've enabled USB keyboard for cm_fx6 using these three defines:
#define CONFIG_USB_KEYBOARD
#define CONFIG_SYS_USB_EVENT_POLL
#define CONFIG_SYS_STDIO_DEREGISTER
I am able to probe it with `usb start`, and set it as input using
`setenv stdin usbkbd`.
It works, save for one problem: all key presses are echoed twice.
The double echo happens both on serial and vga stdout.
It is not dependant on the keyboard (tried different ones).
Output from commands looks normal.
Switching to CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP did not help.
Shell still understands each key press as one key press, so
even though "pprriinntteennvv" is displayed, the shell still sees
"printenv".
Any idea what the cause may be?
--
Regards,
Nikita Kiryanov
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] usbkbd input double echoed
2014-11-23 15:07 [U-Boot] usbkbd input double echoed Nikita Kiryanov
@ 2014-11-23 15:18 ` Hans de Goede
2014-11-24 14:41 ` Nikita Kiryanov
0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2014-11-23 15:18 UTC (permalink / raw)
To: u-boot
Hi,
On 11/23/2014 04:07 PM, Nikita Kiryanov wrote:
> Hi all,
>
> I've enabled USB keyboard for cm_fx6 using these three defines:
>
> #define CONFIG_USB_KEYBOARD
> #define CONFIG_SYS_USB_EVENT_POLL
> #define CONFIG_SYS_STDIO_DEREGISTER
>
> I am able to probe it with `usb start`, and set it as input using
> `setenv stdin usbkbd`.
>
> It works, save for one problem: all key presses are echoed twice.
> The double echo happens both on serial and vga stdout.
> It is not dependant on the keyboard (tried different ones).
> Output from commands looks normal.
> Switching to CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP did not help.
> Shell still understands each key press as one key press, so
> even though "pprriinntteennvv" is displayed, the shell still sees
> "printenv".
>
> Any idea what the cause may be?
In my experience both polling methods are sub-optimal, if your board
has an ehci controller, try using CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
Also I use CONFIG_CONSOLE_MUX, then you can do:
setenv stdin serial,usbkbd
And get both, using this usb-kbd support works fine for me, without the
double echo, both on the serial console and on the sunxi-cfb console over
hdmi.
Regards,
Hans
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] usbkbd input double echoed
2014-11-23 15:18 ` Hans de Goede
@ 2014-11-24 14:41 ` Nikita Kiryanov
0 siblings, 0 replies; 3+ messages in thread
From: Nikita Kiryanov @ 2014-11-24 14:41 UTC (permalink / raw)
To: u-boot
Hi Hans,
On 11/23/2014 05:18 PM, Hans de Goede wrote:
> Hi,
>
> On 11/23/2014 04:07 PM, Nikita Kiryanov wrote:
>> Hi all,
>>
>> I've enabled USB keyboard for cm_fx6 using these three defines:
>>
>> #define CONFIG_USB_KEYBOARD
>> #define CONFIG_SYS_USB_EVENT_POLL
>> #define CONFIG_SYS_STDIO_DEREGISTER
>>
>> I am able to probe it with `usb start`, and set it as input using
>> `setenv stdin usbkbd`.
>>
>> It works, save for one problem: all key presses are echoed twice.
>> The double echo happens both on serial and vga stdout.
>> It is not dependant on the keyboard (tried different ones).
>> Output from commands looks normal.
>> Switching to CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP did not help.
>> Shell still understands each key press as one key press, so
>> even though "pprriinntteennvv" is displayed, the shell still sees
>> "printenv".
>>
>> Any idea what the cause may be?
>
> In my experience both polling methods are sub-optimal, if your board
> has an ehci controller, try using CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
>
> Also I use CONFIG_CONSOLE_MUX, then you can do:
>
> setenv stdin serial,usbkbd
>
> And get both, using this usb-kbd support works fine for me, without the
> double echo, both on the serial console and on the sunxi-cfb console over
> hdmi.
>
> Regards,
>
> Hans
>
I think I must have encountered some toolchain bug. After switching to
another branch to work on something else I came back to my dev branch
and the compiled images no longer have this bug.
Thanks for the help though..
--
Regards,
Nikita Kiryanov
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-24 14:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-23 15:07 [U-Boot] usbkbd input double echoed Nikita Kiryanov
2014-11-23 15:18 ` Hans de Goede
2014-11-24 14:41 ` Nikita Kiryanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox