Community
cancel
Showing results for 
Search instead for 
Did you mean: 
PMora5
New Contributor I
1,840 Views

USB keyboard - editing menuconfig

Hi all,

I'm trying to edit my menuconfig file to add usb keyboard support to my Intel Galileo and I'm not getting anywhere.

Here are my modifications on the menuconfig file (I tested it and the changes are being applied to my build):

  1. Device drivers -> Input device support -> <<span style="font-size: 12pt;">*> Event Interface and [*] Keyboards
  2. Device drivers -> [*] USB support -> <<span style="font-size: 12pt;">*> Support for Host-side USB
  3. Device drivers -> HID Support -> USB HID support -> <<span style="font-size: 12pt;">*> USB HID transport layer

That is all the changes that I did to the BSP v.1.2.1.1 image-full kernel.

When I boot this image with my usb keyboard connected, it throws this errors:

My current .config file for keyboard is:

CONFIG_INPUT_KEYBOARD=y

# CONFIG_KEYBOARD_ADP5588 is not set

# CONFIG_KEYBOARD_ADP5589 is not set

CONFIG_KEYBOARD_ATKBD=y

# CONFIG_KEYBOARD_QT1070 is not set

# CONFIG_KEYBOARD_QT2160 is not set

# CONFIG_KEYBOARD_LKKBD is not set

# CONFIG_KEYBOARD_GPIO is not set

# CONFIG_KEYBOARD_GPIO_POLLED is not set

# CONFIG_KEYBOARD_TCA6416 is not set

# CONFIG_KEYBOARD_TCA8418 is not set

# CONFIG_KEYBOARD_MATRIX is not set

# CONFIG_KEYBOARD_LM8323 is not set

# CONFIG_KEYBOARD_LM8333 is not set

# CONFIG_KEYBOARD_MAX7359 is not set

# CONFIG_KEYBOARD_MCS is not set

# CONFIG_KEYBOARD_MPR121 is not set

# CONFIG_KEYBOARD_NEWTON is not set

# CONFIG_KEYBOARD_OPENCORES is not set

# CONFIG_KEYBOARD_SAMSUNG is not set

# CONFIG_KEYBOARD_STOWAWAY is not set

# CONFIG_KEYBOARD_SUNKBD is not set

# CONFIG_KEYBOARD_XTKBD is not set

I've also attached my entire .config file for CONFIG_USB_* and the entire file just in case (allconfig.txt).

Could somebody please help me? (I'm facing the same issue as describe in another thread

Best,

PaulaK

0 Kudos
12 Replies
idata
Community Manager
125 Views

Hi Paula,

 

 

Just to make sure, you say that you're experiencing the same behavior as the user on this case /thread/101913 https://communities.intel.com/thread/101913, so by that you mean that the USB keyboard works only when choosing boot option, right?

 

Also, you're getting those errors when booting with the USB keyboard already connected, but what happens when you connect the USB keyboard after the Galileo has finished booting?

 

You might also want to take a look at this thread: http://cateee.net/lkddb/web-lkddb/USB_KBD.html http://cateee.net/lkddb/web-lkddb/USB_KBD.html.

 

 

Regards,

 

-Pablo
PMora5
New Contributor I
125 Views

Hi Pablo,

Yes, my keyboard works fine until the boot process finishes.(this happpened even before I made those modifications on menuconfig)

If I connect the keyboard after the boot process, I get an output saying that the HID device was found. But when a type nothing happens on the terminal.

Best,

Paula

idata
Community Manager
125 Views

Hi Paula,

 

 

I believe your configuration in the menuconfig is correct because your device is being recognized as an HID. However, it seems like it's necessary to tell Linux how to handle these keyboard inputs by using the event triggered by the keyboard connection.

 

Could you please let me know what files you have under /dev/input?

 

 

Regards,

 

-Pablo
PMora5
New Contributor I
125 Views

Hi Pablo,

I'm not so sure about my menuconfig, because before I changed those files my keyboard was already recognized as an HID device.

My /dev/input before connecting the keyboard

event0 event1

After plugging in the keyboard:

Message:

root@quark:~# [ 295.150233] usb 2-1: new low-speed USB device number 2 using ohci-pci

[ 295.427954] input: USB USB Keyboard as /devices/pci0000:00/0000:00:14.4/usb2/2-1/2-1:1.0/0003:1A2C:0C21.0001/input/input2

[ 295.441914] hid-generic 0003:1A2C:0C21.0001: input: USB HID v1.10 Keyboard [USB USB Keyboard] on usb-0000:00:14.4-1/input0

[ 295.526981] input: USB USB Keyboard as /devices/pci0000:00/0000:00:14.4/usb2/2-1/2-1:1.1/0003:1A2C:0C21.0002/input/input3

[ 295.541135] hid-generic 0003:1A2C:0C21.0002: input: USB HID v1.10 Mouse [USB USB Keyboard] on usb-0000:00:14.4-1/input1

/dev/input

by-id by-path event0 event1 event2 event3

I'm really intrigued by this. :/

idata
Community Manager
125 Views

Hi Paula,

Did you run those commands with your modified image (with the HID changes in menuconfig) or with the standard image?

 

Regarding your configuration, it is strange that your Galileo is still detecting the keyboard as an HID device even without making the changes in the kernel. My guess is that even if recognized it won't work until you change the menuconfig values.

 

Now, I don't know if you have been searching about what I told you in my last reply (that you need to tell Linux how to handle the inputs from your keyboard), I kept doing some research and found this link which explains briefly that information,

 

http://www.open-st.eu/cgi-bin/cblogengine?op=1&skel=../blog-&lang=0&id=7&start=0&num=20 http://www.open-st.eu/cgi-bin/cblogengine?op=1&skel=../blog-&lang=0&id=7&start=0&num=20.

 

They use the keyboard "events" and pass this information to a code that then handles the input. You can check their code snippet.

Regards,

 

-Pablo
PMora5
New Contributor I
125 Views

hi pablo,

I run those commands with my modified image and the original provided by Intel, the results are the same.

I tried editing my menuconfig similar to the suggested on website, but our menuconfig don't provide the following option Device Drivers --> HID Devices –> USB Human Interface Device (full HID) support. So I really don't know which files I have to modify on menuconfig in order to make my USB keyboard working.

Could you get a USB keyboard working on Intel Galileo Gen 2 ?

Thanks and sorry for the late reply.

idata
Community Manager
125 Views

Hi Paula,

 

 

I haven't tried yet, but I could run some tests. I'm not sure if I have access to a USB keyboard that's not being used but I will look for one. I'll let you know if I have updates.

 

 

Regards,

 

-Pablo
idata
Community Manager
125 Views

Hi Paula,

 

 

Using the latest MicroSD* card image found on the Downloads website https://software.intel.com/en-us/iot/hardware/galileo/downloads https://software.intel.com/en-us/iot/hardware/galileo/downloads, together with SKeylogger, we were able to get data from the keyboard. The keyboards we used were a Logitech K120 and a Kensington, both of them seem to work with the Galileo board. You could attempt to use SKeylogger in your custom image build and see if that works, just make sure your board has access to the internet to be able to clone the repository.

 

Also make sure the keyboard is connected to the Galileo.

 

Here are the steps we followed using the latest image:

 

1. Make sure the Galileo is booting up from the SDCard, to do so the latest image version should be the following:

 

root@galileo:~# cat /etc/version

 

201606081532

 

2. Check your network connection, the easiest way would be to connect an Ethernet cable to the Galileo board. Also you can connect the board via WiFi following this guide https://software.intel.com/en-us/node/519955 https://software.intel.com/en-us/node/519955

 

We checked the Galileo connection using ping:

 

root@galileo:~# ping http://google.com/ google.comPING http://google.com/ google.com (216.58.192.14): 56 data bytes

 

64 bytes from 216.58.192.14: seq=0 ttl=52 time=7.381 ms

 

64 bytes from 216.58.192.14: seq=1 ttl=52 time=7.027 ms

 

64 bytes from 216.58.192.14: seq=2 ttl=52 time=7.173 ms

 

64 bytes from 216.58.192.14: seq=3 ttl=52 time=7.070 ms

 

^C

 

--- http://google.com/ google.com ping statistics ---

 

4 packets transmitted, 4 packets received, 0% packet loss

 

round-trip min/avg/max = 7.027/7.162/7.381 ms

 

3. Now that you have internet access, proceed to clone the SKeylogger repository (steps and information can be found here https://github.com/gsingh93/simple-key-logger https://github.com/gsingh93/simple-key-logger)

 

root@galileo:~# git clone https://github.com/gsingh93/simple-key-logger.git https://github.com/gsingh93/simple-key-logger.git<span style="-webk...
idata
Community Manager
125 Views

Hi Paula,

 

 

Do you have updates on this case? Have you been able to try our suggestions?

 

 

Regards,

 

-Pablo
PMora5
New Contributor I
125 Views

HI Pablo,

Sorry for taking so long to reply.

Thanks for the detailed tutorial, I was able to read the entries from my keyboard, but that wasn't quite what I was aiming for. What I had in mind was to connect any USB keyboard and be able to send commands to the terminal, as a regular keyboard. That's why I thought in kernel editing, because it seems like the USB host is not configured to accept "external" input devices.

Nevertheless thank you for suggestion, I really appreciate your effort.

Best,

Paula

idata
Community Manager
125 Views

Hi Paula,

 

 

You're more than welcome and I'm sorry this is not what you were hoping for. But maybe you can use our work or at least part of it to try to get the behavior you expect. Hopefully, you'll find a better way to implement it.

 

 

Regards,

 

-Pablo
PMora5
New Contributor I
125 Views

Hi Pablo,

Yes of course.

Thank you for all your kind help and support.

Best,

Paula

Reply