All of lore.kernel.org
 help / color / mirror / Atom feed
* Adonit Jot Pixel Stylus driver
@ 2017-01-24  4:12 David Farrell
  2017-01-25 10:19 ` Benjamin Tissoires
  0 siblings, 1 reply; 3+ messages in thread
From: David Farrell @ 2017-01-24  4:12 UTC (permalink / raw)
  To: linux-input

Hi folks,

I have an adonit jot pixel bluetooth stylus. Adapting someone else's
code (source http://gerev.github.io/laptop-cintiq/) I have it working
with uinput, posting ABS_PRESSURE and BTN_1/2 event codes and so on.
I'm running upstream.

What I'm wondering is; as the stylus relies on a bluetooth connection,
is it a suitable device to develop a kernel input driver for? And if
yes, are there any reference drivers you'd recommend I look at?

Many thanks in advance

David

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

* Re: Adonit Jot Pixel Stylus driver
  2017-01-24  4:12 Adonit Jot Pixel Stylus driver David Farrell
@ 2017-01-25 10:19 ` Benjamin Tissoires
  2017-01-25 17:50   ` David Farrell
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Tissoires @ 2017-01-25 10:19 UTC (permalink / raw)
  To: David Farrell; +Cc: linux-input, Peter Hutterer

On Tue, Jan 24, 2017 at 5:12 AM, David Farrell <davidnmfarrell@gmail.com> wrote:
> Hi folks,
>
> I have an adonit jot pixel bluetooth stylus. Adapting someone else's
> code (source http://gerev.github.io/laptop-cintiq/) I have it working
> with uinput, posting ABS_PRESSURE and BTN_1/2 event codes and so on.
> I'm running upstream.
>
> What I'm wondering is; as the stylus relies on a bluetooth connection,
> is it a suitable device to develop a kernel input driver for? And if
> yes, are there any reference drivers you'd recommend I look at?

Hi,

Coincidentally, I talked to Peter yesterday about this very same
stylus. I can only talk for the Wacom Creative Stylus 2, which I have,
but which I believe is similar to yours in many aspects.
So if your stylus is similar to mine, it uses BLE (or Bluetooth 4).
And in that case, you don't really need to write a kernel driver, but
more a bluez plugin in the same way HID over GATT (HID over BLE) is
working. This requires connecting over BLE to the stylus, then create
a uhid device (and you will have to write the report descriptors
matching your device by reverse engineering it), and inject that uhid
device in the same way bluez does for HID over GATT. Then you just
need to forward the raw events from the device to the uhid node and
the kernel will simply translate the events for you.

As a starter, you can have a look at profiles/input/hog.c and
profiles/input/hog-lib.c in the bluez repository.

Of course, if the stylus is not using BLE, then it perfectly makes
sense to write a full kernel driver for it (but I strongly suspect it
uses BLE).

Cheers,
Benjamin

>
> Many thanks in advance
>
> David
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Adonit Jot Pixel Stylus driver
  2017-01-25 10:19 ` Benjamin Tissoires
@ 2017-01-25 17:50   ` David Farrell
  0 siblings, 0 replies; 3+ messages in thread
From: David Farrell @ 2017-01-25 17:50 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: linux-input, Peter Hutterer

Hi Benjamin,

Ah that makes sense, it was Peter who directed me towards a
driver-based solution. Thank you for your detailed response, this is
everything I need to get started.

David

On 25 January 2017 at 05:19, Benjamin Tissoires
<benjamin.tissoires@gmail.com> wrote:
> On Tue, Jan 24, 2017 at 5:12 AM, David Farrell <davidnmfarrell@gmail.com> wrote:
>> Hi folks,
>>
>> I have an adonit jot pixel bluetooth stylus. Adapting someone else's
>> code (source http://gerev.github.io/laptop-cintiq/) I have it working
>> with uinput, posting ABS_PRESSURE and BTN_1/2 event codes and so on.
>> I'm running upstream.
>>
>> What I'm wondering is; as the stylus relies on a bluetooth connection,
>> is it a suitable device to develop a kernel input driver for? And if
>> yes, are there any reference drivers you'd recommend I look at?
>
> Hi,
>
> Coincidentally, I talked to Peter yesterday about this very same
> stylus. I can only talk for the Wacom Creative Stylus 2, which I have,
> but which I believe is similar to yours in many aspects.
> So if your stylus is similar to mine, it uses BLE (or Bluetooth 4).
> And in that case, you don't really need to write a kernel driver, but
> more a bluez plugin in the same way HID over GATT (HID over BLE) is
> working. This requires connecting over BLE to the stylus, then create
> a uhid device (and you will have to write the report descriptors
> matching your device by reverse engineering it), and inject that uhid
> device in the same way bluez does for HID over GATT. Then you just
> need to forward the raw events from the device to the uhid node and
> the kernel will simply translate the events for you.
>
> As a starter, you can have a look at profiles/input/hog.c and
> profiles/input/hog-lib.c in the bluez repository.
>
> Of course, if the stylus is not using BLE, then it perfectly makes
> sense to write a full kernel driver for it (but I strongly suspect it
> uses BLE).
>
> Cheers,
> Benjamin
>
>>
>> Many thanks in advance
>>
>> David
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-input" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-01-25 17:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24  4:12 Adonit Jot Pixel Stylus driver David Farrell
2017-01-25 10:19 ` Benjamin Tissoires
2017-01-25 17:50   ` David Farrell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.