need USB mouse and keyboard to work

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

nmmane
Posts: 16
Joined: Mon Aug 14, 2017 9:36 am

need USB mouse and keyboard to work

Thu Feb 01, 2018 12:33 pm

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?
blue_z
Location: USA
Posts: 1743
Joined: Thu Apr 19, 2007 10:15 pm

Re: need USB mouse and keyboard to work

Fri Feb 02, 2018 8:54 pm

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
nmmane
Posts: 16
Joined: Mon Aug 14, 2017 9:36 am

Re: need USB mouse and keyboard to work

Sat Feb 03, 2018 6:34 am

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.
nmmane
Posts: 16
Joined: Mon Aug 14, 2017 9:36 am

Re: need USB mouse and keyboard to work

Mon Feb 05, 2018 10:46 am

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.
blue_z
Location: USA
Posts: 1743
Joined: Thu Apr 19, 2007 10:15 pm

Re: need USB mouse and keyboard to work

Mon Feb 05, 2018 11:05 pm

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
nmmane
Posts: 16
Joined: Mon Aug 14, 2017 9:36 am

Re: need USB mouse and keyboard to work

Sat Feb 10, 2018 6:00 am

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?

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 3 guests