Kernel Newbies archive on lore.kernel.org
 help / 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 --]

<div dir="ltr"><div>Hi,</div><div><br></div><div>I have a device operated via an Arduino UNO board. I would like to write a driver for it so that my computer running <span class="gmail-gr_ gmail-gr_300 gmail-gr-alert gmail-gr_spell gmail-gr_inline_cards gmail-gr_disable_anim_appear gmail-ContextualSpelling gmail-ins-del gmail-multiReplace" id="gmail-300" style="display:inline;border-bottom:2px solid transparent;background-repeat:no-repeat;color:inherit;font-size:inherit">linux</span> recognises it natively. </div><div><br></div><div>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?</div><div><br></div><div>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)?</div><div><br></div><div>Thanks,</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Pratyush Das(Reik)<br></div></div></div></div></div></div>

[-- 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 --]

<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">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. </div><div dir="auto"><br></div><div dir="auto">Thanks,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 15 Mar, 2019, 01:39 Greg KH, &lt;<a href="mailto:greg@kroah.com">greg@kroah.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Mar 14, 2019 at 11:18:34PM +0530, Pratyush Das wrote:<br>
&gt; Hi,<br>
&gt; <br>
&gt; I have a device operated via an Arduino UNO board. I would like to write a<br>
&gt; driver for it so that my computer running linux recognises it natively.<br>
&gt; <br>
&gt; I have no experience writing drivers. Where should I start to specifically<br>
&gt; do something like this? Are there any templates or guides for drivers for<br>
&gt; this sort of thing specifically?<br>
&gt; <br>
&gt; Do I need to start over from scratch - learning how to write drivers? If<br>
&gt; so, could you recommend any resources in particular which would take me on<br>
&gt; the path to write drivers for HIDs in particular(to begin with)?<br>
<br>
You should not need to write any kernel driver for Linux to support a<br>
HID device, it&#39;s all included already.<br>
<br>
HAve you tried using your device on Linux?  What did, or did not, work<br>
for you?<br>
<br>
thanks,<br>
<br>
greg k-h<br>
</blockquote></div>

[-- 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, back to index

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

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org kernelnewbies@archiver.kernel.org
	public-inbox-index kernelnewbies


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/ public-inbox