Community
cancel
Showing results for 
Search instead for 
Did you mean: 
FTinetti
Honored Contributor I
1,614 Views

usb keyboard, no kernel compile

I've seen several threads on keyboard handling,

and I'm not sure if someone has handled to:

a) Connect some usb keyboard to any of the Intel Galileo usb ports

b) Read the pressed key from either a Linux program or a sketch

c) no kernel (re)compilation, just using one of the standard Linux kernels provided by Intel

If someone has made it, please explain how

TIA,

Fernando.

0 Kudos
8 Replies
idata
Community Manager
73 Views

Hello Fernando,

 

 

Thanks for reaching out!

 

 

I have been able to use a USB keyboard with my Galileo (running 201605251601). If you plug a keyboard to your Galileo, in the board's terminal, you'll notice that the kernel detects it, it sends a few lines of messages letting you know that a new USB HID device has been connected. And if you use the lsusb command you'll notice a new entry, therefore the keyboard is indeed detected by Linux.

 

 

If you want to know how/where your keyboard is identified, you can go to /dev/input/ you'll notice a few files called eventX (the 'X' stands for a number), when you connect the keyboard you'll notice a new event. This is your USB keyboard, in my case it is event2.

 

 

If you want to check how you can use the keyboard, you can use evtest ( http://elinux.org/images/9/93/Evtest.c), this script will let you see everything that happens with your HID devices. Compile it with the command gcc evtest.c -o evtest and then run it with the command ./evtest /dev/input/event2, this will let you see the inputs of your keyboard.

 

 

I have modified this script to work with mraa in the past, if you are interested in learning about this, let me know and I'll post a simple example here.

 

 

I hope this information helps you,

 

Pedro M.
FTinetti
Honored Contributor I
73 Views

Hi Pedro,

Thanks for your reply, I'll try to follow your instructions as soon as possible.

Did you use a USB OTG for plugging in your keyboard?

Which USB port did you use?

TIA,

Fernando.

idata
Community Manager
73 Views

Let me know how your tests go.

I used the full USB port on my Galileo Gen 2. The one marked on the screenshot below:

Pedro M.

FTinetti
Honored Contributor I
73 Views

I see, thanks. I have Intel Galileo, though. I'll follow the same instructions and let you know as soon as possible.

Fernando.

idata
Community Manager
73 Views

Sure, I'm here to help. Let me know how it goes and if you need help using evtest let me know and I'll try to help you.

 

 

Pedro M.
idata
Community Manager
73 Views

Hello Fernando,

 

 

Do you have any updates about this?

 

 

Pedro M.
FTinetti
Honored Contributor I
73 Views

Hi Pedro,

Not yet, I've not had enough time to try.

I'll let you know as soon as possible.

BR,

Fernando.

idata
Community Manager
73 Views

Sure, let me know, I'll be waiting for your response.

 

 

Pedro M.
Reply