kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* HID Driver
@ 2019-03-14 17:48 Pratyush Das
  2019-03-14 20:09 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Pratyush Das @ 2019-03-14 17:48 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 582 bytes --]

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)

[-- Attachment #1.2: Type: text/html, Size: 1194 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: HID Driver
  2019-03-14 17:48 HID Driver Pratyush Das
@ 2019-03-14 20:09 ` Greg KH
  2019-03-15 12:53   ` Pratyush Das
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2019-03-14 20:09 UTC (permalink / raw)
  To: Pratyush Das; +Cc: kernelnewbies

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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: HID Driver
  2019-03-14 20:09 ` Greg KH
@ 2019-03-15 12:53   ` Pratyush Das
  2019-03-15 14:20     ` Greg KH
  2019-03-15 14:58     ` Yann Droneaud
  0 siblings, 2 replies; 5+ messages in thread
From: Pratyush Das @ 2019-03-15 12:53 UTC (permalink / raw)
  To: Greg KH; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 1111 bytes --]

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
>

[-- Attachment #1.2: Type: text/html, Size: 1570 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: HID Driver
  2019-03-15 12:53   ` Pratyush Das
@ 2019-03-15 14:20     ` Greg KH
  2019-03-15 14:58     ` Yann Droneaud
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2019-03-15 14:20 UTC (permalink / raw)
  To: Pratyush Das; +Cc: kernelnewbies

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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: HID Driver
  2019-03-15 12:53   ` Pratyush Das
  2019-03-15 14:20     ` Greg KH
@ 2019-03-15 14:58     ` Yann Droneaud
  1 sibling, 0 replies; 5+ messages in thread
From: Yann Droneaud @ 2019-03-15 14:58 UTC (permalink / raw)
  To: Pratyush Das, Greg KH; +Cc: kernelnewbies

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



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-15 14:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-14 17:48 HID Driver Pratyush Das
2019-03-14 20:09 ` Greg KH
2019-03-15 12:53   ` Pratyush Das
2019-03-15 14:20     ` Greg KH
2019-03-15 14:58     ` Yann Droneaud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).