Page 1 of 1

need USB mouse and keyboard to work

Posted: Thu Feb 01, 2018 12:33 pm
by nmmane
Dear all,


I have AT91som9x35 based board,

I have build Qt and developed my application for same.
Now i want to add usb keyboard and mouse interface with board.

I have connect mouse and keyboard it get detected by linux 3.6.9 but cant list under /dev/input.
only touch screen is listed there.

i have enabled drivers in linux menuconfig as follows
device driver->input device support->keyboards->select all
device driver->input device support->mice->select all

what i have to do to get usb mouse and keyboard working fine?

Re: need USB mouse and keyboard to work

Posted: Fri Feb 02, 2018 8:54 pm
by blue_z
nmmane wrote:I have connect mouse and keyboard it get detected by linux 3.6.9 but cant list under /dev/input.
only touch screen is listed there.
What exactly does "detected" mean?
nmmane wrote:i have enabled drivers in linux menuconfig as follows
device driver->input device support->keyboards->select all
device driver->input device support->mice->select all
That's probably incorrect, i.e. the wrong drivers.
Linux drivers for USB keyboards and mice typically are part of the HID (Human Interface Device) subsystem.
nmmane wrote:what i have to do to get usb mouse and keyboard working fine?
The easy approach to solving drivers for USB devices is to simply attach them to a Linux desktop/laptop computer. Assuming that it's running a decent distro, the USB device(s) should self-identify and its driver should get registered. The system log will have all of this information (e.g. the 'dmesg' comand).

Regards

Re: need USB mouse and keyboard to work

Posted: Sat Feb 03, 2018 6:34 am
by nmmane
What exactly does "detected" mean?
detect mans in dmesg log i can see as foloows

Code: Select all

usb 2-3: new low-speed USB device number 3 using at91_ohci
usb 2-3: New USB device found, idVendor=04ca, idProduct=0061
usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-3: Product: USB Optical Mouse
usb 2-3: Manufacturer: PixArt
Linux drivers for USB keyboards and mice typically are part of the HID (Human Interface Device) subsystem.
from where i can enable HID drives in linux config?

The easy approach to solving drivers for USB devices is to simply attach them to a Linux desktop/laptop computer. Assuming that its running a decent distro, the USB device(s) should self-identify and its driver should get registered. The system log will have all of this information (e.g. the 'dmesg' comand).
I dont understand what you exactly mean from that, i had tested this mouse and keyboard with linux desktop , and it works fine.

Re: need USB mouse and keyboard to work

Posted: Mon Feb 05, 2018 10:46 am
by nmmane
thanks blue_z,
Linux drivers for USB keyboards and mice typically are part of the HID (Human Interface Device) subsystem.
HID works for me , now got keyboard and mouse working fine.

Is there any easy way to know which inputX is keyboard and which inputX is mouse?

I need this for use keyboard & mouse in qt.

Re: need USB mouse and keyboard to work

Posted: Mon Feb 05, 2018 11:05 pm
by blue_z
nmmane wrote:Is there any easy way to know which inputX is keyboard and which inputX is mouse?

I need this for use keyboard & mouse in qt.
According to the Qt5 documentation, you can let Qt sort it out for you:
"Qt looks for a suitable device either via libudev or by walking through the available nodes."

Regards

Re: need USB mouse and keyboard to work

Posted: Sat Feb 10, 2018 6:00 am
by nmmane
blue_z wrote: According to the Qt5 documentation, you can let Qt sort it out for you:
"Qt looks for a suitable device either via libudev or by walking through the available nodes."


I am using Qt 4.7 dose it work there?