Hi, I have a device operated via an Arduino UNO board. I would like to write a driver for it so that my computer running linux recognises it natively. I have no experience writing drivers. Where should I start to specifically do something like this? Are there any templates or guides for drivers for this sort of thing specifically? Do I need to start over from scratch - learning how to write drivers? If so, could you recommend any resources in particular which would take me on the path to write drivers for HIDs in particular(to begin with)? Thanks, -- Pratyush Das(Reik)
On Thu, Mar 14, 2019 at 11:18:34PM +0530, Pratyush Das wrote:
Hi,
I have a device operated via an Arduino UNO board. I would like to write a driver for it so that my computer running linux recognises it natively.
I have no experience writing drivers. Where should I start to specifically do something like this? Are there any templates or guides for drivers for this sort of thing specifically?
Do I need to start over from scratch - learning how to write drivers? If so, could you recommend any resources in particular which would take me on the path to write drivers for HIDs in particular(to begin with)?
You should not need to write any kernel driver for Linux to support a HID device, it's all included already. HAve you tried using your device on Linux? What did, or did not, work for you? thanks, greg k-h
Hi, I want the device operated by the Arduino Uno board to be recognised as a mouse by my Linux OS. To control the cursor I am using the X11 API. Thanks, On Fri, 15 Mar, 2019, 01:39 Greg KH, <greg@kroah.com> wrote:
On Thu, Mar 14, 2019 at 11:18:34PM +0530, Pratyush Das wrote:
Hi,
I have a device operated via an Arduino UNO board. I would like to write a driver for it so that my computer running linux recognises it natively.
I have no experience writing drivers. Where should I start to specifically do something like this? Are there any templates or guides for drivers for this sort of thing specifically?
Do I need to start over from scratch - learning how to write drivers? If so, could you recommend any resources in particular which would take me on the path to write drivers for HIDs in particular(to begin with)?
You should not need to write any kernel driver for Linux to support a HID device, it's all included already.
HAve you tried using your device on Linux? What did, or did not, work for you?
thanks,
greg k-h
On Fri, Mar 15, 2019 at 06:23:37PM +0530, Pratyush Das wrote:
Hi,
I want the device operated by the Arduino Uno board to be recognised as a mouse by my Linux OS. To control the cursor I am using the X11 API.
Ok, and what does not work for you with the Linux side of this? Linux obviously has a USB HID driver for mice already, so there should not be any need to touch the kernel :) thanks, greg k-h
Hi, Le vendredi 15 mars 2019 à 18:23 +0530, Pratyush Das a écrit :
I want the device operated by the Arduino Uno board to be recognised as a mouse by my Linux OS. To control the cursor I am using the X11 API.
Arduino Uno is not the best Arduino board for the task. It's achievable out of the box with Leonardo, Micro, Due, Zero and Esplora[1]. It requires a hack on Arduino Uno (replacing the firmware of the AVR µC used as the USB to serial converter). The relevant Arduino library is <Mouse.h>[2]. On Linux side there's nothing to do on a fairly modern desktop system. [1] https://www.arduino.cc/en/Reference/Libraries [2] https://www.arduino.cc/reference/en/language/functions/usb/mouse/ Regards. -- Yann Droneaud OPTEYA
participants (3)
-
Greg KH -
Pratyush Das -
Yann Droneaud