All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Farrell <davidnmfarrell@gmail.com>
To: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Cc: linux-input <linux-input@vger.kernel.org>,
	Peter Hutterer <peter.hutterer@who-t.net>
Subject: Re: Adonit Jot Pixel Stylus driver
Date: Wed, 25 Jan 2017 12:50:54 -0500	[thread overview]
Message-ID: <CAAzBBqtYp3sS5J0-W=xD+0Ktq0+s+jWgqyPNdBocO_r1WR-gNw@mail.gmail.com> (raw)
In-Reply-To: <CAN+gG=FZhRwNQfsrsWCdswGMsq2wBWtyx2N7UT_SDWQLBQycJg@mail.gmail.com>

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

      reply	other threads:[~2017-01-25 17:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAzBBqtYp3sS5J0-W=xD+0Ktq0+s+jWgqyPNdBocO_r1WR-gNw@mail.gmail.com' \
    --to=davidnmfarrell@gmail.com \
    --cc=benjamin.tissoires@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.