wacom inkling as a tablet

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

wacom inkling as a tablet

Isaac Marco Blancas
Some body knows if the digital pen "wacom inkling" could be used in linux as a tablet? When I plug it in my ubuntu 14.04 it is showed as an "USB Massive Storage" but I don't know how to configure it as a Human Input Device.

I'm looking some gadget to be able to write in a paper and at the same time to be writing on my Xournal for my maths lectures screencasts. If you know some gadget for this... please tell me...

Best regards.

------------------------------------------------------------------------------

_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: wacom inkling as a tablet

Brett McCoy-2
On Mon, Oct 27, 2014 at 7:12 PM, Isaac Marco Blancas <[hidden email]> wrote:
Some body knows if the digital pen "wacom inkling" could be used in linux as a tablet? When I plug it in my ubuntu 14.04 it is showed as an "USB Massive Storage" but I don't know how to configure it as a Human Input Device.

I'm looking some gadget to be able to write in a paper and at the same time to be writing on my Xournal for my maths lectures screencasts. If you know some gadget for this... please tell me...

My understanding of the Inkling is that it doesn't work as an input device like Wacom tablets, it stores its data locally and then the data gets loaded into a graphics program for manipulation after you are done drawing on paper.

--
Brett W. McCoy -- http://www.brettwmccoy.com
------------------------------------------------------------------------
"In the rhythm of music a secret is hidden; If I were to divulge it, it would overturn the world."
    -- Jelaleddin Rumi

------------------------------------------------------------------------------

_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: wacom inkling as a tablet

Isaac Marco Blancas

2014-10-28 1:31 GMT+01:00 Brett McCoy <[hidden email]>:

My understanding of the Inkling is that it doesn't work as an input device like Wacom tablets, it stores its data locally and then the data gets loaded into a graphics program for manipulation after you are done drawing on paper.

I have tested on Windows and it works like a tablet when the device is connected with USB to Windows. The user's manual call it the "online mode". You can see it on page 42 in http://us.wacom.com/~/media/WTC/Files/Manuals/Current/Inkling%20Manual%20English.pdf

When you plug on Linux it is mounted as a USB Massive Storage but it is not recognised like a HID.

I don't know if The Linux Wacom Project could evaluate to support this wacom device.

There is a git project for a GNU/Linux-friendly version of the Wacom Inkling SketchManager (https://github.com/roelj/inklingreader) but they were not able to set the "online mode" (https://github.com/roelj/inklingreader/issues/13)

--
Isaac Marco Blancas
Universidad a Distancia de Madrid (UDIMA)
902 02 00 03

------------------------------------------------------------------------------

_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: wacom inkling as a tablet

Jason Gerecke
On Tue, Oct 28, 2014 at 8:45 AM, Isaac Marco Blancas
<[hidden email]> wrote:

>
> 2014-10-28 1:31 GMT+01:00 Brett McCoy <[hidden email]>:
>>
>>
>> My understanding of the Inkling is that it doesn't work as an input device
>> like Wacom tablets, it stores its data locally and then the data gets loaded
>> into a graphics program for manipulation after you are done drawing on
>> paper.
>
>
> I have tested on Windows and it works like a tablet when the device is
> connected with USB to Windows. The user's manual call it the "online mode".
> You can see it on page 42 in
> http://us.wacom.com/~/media/WTC/Files/Manuals/Current/Inkling%20Manual%20English.pdf
>
> When you plug on Linux it is mounted as a USB Massive Storage but it is not
> recognised like a HID.
>
> I don't know if The Linux Wacom Project could evaluate to support this wacom
> device.
>
> There is a git project for a GNU/Linux-friendly version of the Wacom Inkling
> SketchManager (https://github.com/roelj/inklingreader) but they were not
> able to set the "online mode"
> (https://github.com/roelj/inklingreader/issues/13)
>
> --
> Isaac Marco Blancas
> Universidad a Distancia de Madrid (UDIMA)
> 902 02 00 03
>

You learn something new every day! I had no idea the Inkling had an
"online" mode (nor that anyone had written an equivalent to
SketchManager!)

The lsusb output that was just posted in the linked issue contains a
useful HID descriptor, so it should be possible for someone familiar
with adding support for new devices to our driver to get something
working. I don't really have time to spare at the moment, but perhaps
another developer would be up to the task...

Alternatively, you /might/ have some luck having the HID driver
control the device. See what happens if you add
'usbhid.quirks=0x056a:0x0221:0x40000000' to the kernel commandline in
GRUB. You might get a new /dev/input/eventN device, or at least have
some interesting dmesg logs...

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one  /
(That is to say, eight) to the two,     /
But you can’t take seven from three,    /
So you look at the sixty-fours....

------------------------------------------------------------------------------
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: wacom inkling as a tablet

Isaac Marco Blancas
2014-10-28 17:54 GMT+01:00 Jason Gerecke <[hidden email]>:

Alternatively, you /might/ have some luck having the HID driver
control the device. See what happens if you add
'usbhid.quirks=0x056a:0x0221:0x40000000' to the kernel commandline in
GRUB. You might get a new /dev/input/eventN device, or at least have
some interesting dmesg logs...


Thank you for your answer...

I have boot after adding this to GRUB and there was no kernel panic but there's no response when I move the pen.

[  112.868335] usb 2-1.1: new high-speed USB device number 6 using ehci-pci
[  112.961270] usb 2-1.1: New USB device found, idVendor=056a, idProduct=0221
[  112.961274] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[  112.961276] usb 2-1.1: Product: MSC Device
[  112.961288] usb 2-1.1: Manufacturer: Wacom, Inc.
[  112.961292] usb 2-1.1: SerialNumber: 3B33000032EB5A090002DD01A3CC9A09
[  112.962798] usb-storage 2-1.1:1.1: USB Mass Storage device detected
[  112.962868] scsi7 : usb-storage 2-1.1:1.1
[  112.994997] input: Wacom, Inc. MSC Device as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/input/input22
[  112.995168] hid-generic 0003:056A:0221.0008: input,hidraw5: USB HID v1.01 Mouse [Wacom, Inc. MSC Device] on usb-0000:00:1d.0-1.1/input0
[  113.961633] scsi 7:0:0:0: Direct-Access     Wacom    Inkling          1256 PQ: 0 ANSI: 4
[  113.961872] sd 7:0:0:0: Attached scsi generic sg3 type 0
[  113.963123] sd 7:0:0:0: [sdc] 963840 2048-byte logical blocks: (1.97 GB/1.83 GiB)


The device is on /dev/hidraw5 but if I make a

cat /dev/hidraw5

and move the pen... nothing is returned

--
Isaac Marco Blancas
Universidad a Distancia de Madrid (UDIMA)
902 02 00 03

------------------------------------------------------------------------------

_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: wacom inkling as a tablet

Jason Gerecke
Hmmm. It could need to be prodded to send the appropriate report
(which is the case with most Wacom tablets) before anything useful
comes out. You might try using the "hid-recorder" tool from [1] with
its "-d" option. That'll get data from debugfs instead of the hidraw
device, and might produce some output.

[1]: https://bentiss.github.io/hid-replay-docs/

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one  /
(That is to say, eight) to the two,     /
But you can’t take seven from three,    /
So you look at the sixty-fours....



On Tue, Oct 28, 2014 at 10:36 AM, Isaac Marco Blancas
<[hidden email]> wrote:

> 2014-10-28 17:54 GMT+01:00 Jason Gerecke <[hidden email]>:
>>
>>
>> Alternatively, you /might/ have some luck having the HID driver
>> control the device. See what happens if you add
>> 'usbhid.quirks=0x056a:0x0221:0x40000000' to the kernel commandline in
>> GRUB. You might get a new /dev/input/eventN device, or at least have
>> some interesting dmesg logs...
>>
>
> Thank you for your answer...
>
> I have boot after adding this to GRUB and there was no kernel panic but
> there's no response when I move the pen.
>
> [  112.868335] usb 2-1.1: new high-speed USB device number 6 using ehci-pci
> [  112.961270] usb 2-1.1: New USB device found, idVendor=056a,
> idProduct=0221
> [  112.961274] usb 2-1.1: New USB device strings: Mfr=1, Product=2,
> SerialNumber=5
> [  112.961276] usb 2-1.1: Product: MSC Device
> [  112.961288] usb 2-1.1: Manufacturer: Wacom, Inc.
> [  112.961292] usb 2-1.1: SerialNumber: 3B33000032EB5A090002DD01A3CC9A09
> [  112.962798] usb-storage 2-1.1:1.1: USB Mass Storage device detected
> [  112.962868] scsi7 : usb-storage 2-1.1:1.1
> [  112.994997] input: Wacom, Inc. MSC Device as
> /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/input/input22
> [  112.995168] hid-generic 0003:056A:0221.0008: input,hidraw5: USB HID v1.01
> Mouse [Wacom, Inc. MSC Device] on usb-0000:00:1d.0-1.1/input0
> [  113.961633] scsi 7:0:0:0: Direct-Access     Wacom    Inkling
> 1256 PQ: 0 ANSI: 4
> [  113.961872] sd 7:0:0:0: Attached scsi generic sg3 type 0
> [  113.963123] sd 7:0:0:0: [sdc] 963840 2048-byte logical blocks: (1.97
> GB/1.83 GiB)
>
>
> The device is on /dev/hidraw5 but if I make a
>
> cat /dev/hidraw5
>
> and move the pen... nothing is returned
>
> --
> Isaac Marco Blancas
> Universidad a Distancia de Madrid (UDIMA)
> 902 02 00 03

------------------------------------------------------------------------------
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: wacom inkling as a tablet

Isaac Marco Blancas
I tried with the hid-recorder but there are no events when I move the pen.

sudo hid-recorder -d /dev/hidraw6
R: 215 05 0d 09 02 a1 01 85 02 09 02 a1 00 05 01 09 30 09 31 15 00 26 80 07 35 00 46 00 78 65 11 55 0e 75 10 95 02 81 02 05 0d 09 42 09 45 09 44 09 32 15 00 25 01 75 01 95 04 65 00 81 02 05 09 19 01 29 04 15 00 25 01 75 01 95 04 81 02 05 0d 09 30 15 00 26 00 04 75 10 95 01 81 02 05 0d 09 3d 09 3e 15 81 25 7f 75 08 95 02 81 02 c0 05 01 09 00 85 04 15 00 26 ff 00 75 08 95 0c 81 02 05 01 09 00 85 08 15 00 26 ff 00 75 08 95 3b 81 02 09 01 85 80 75 08 95 20 b1 02 c0 05 01 09 02 a1 01 85 01 09 01 a1 00 05 01 09 30 09 31 15 00 26 80 07 35 00 46 00 78 65 11 55 0e 75 10 95 02 81 02 05 09 19 01 29 03 15 00 25 01 75 01 95 03 65 00 81 02 95 05 81 01 c0 c0
N: Wacom, Inc. MSC Device
P: usb-0000:00:1d.0-1.1/input0
I: 3 056a 0221
reading debug interface /sys/kernel/debug/hid/0003:056A:0221.000A/events instead of /dev/hidraw6
^C
No events where recorded.
You may need to remove the option "--debugfs" to get more recordings.



2014-10-29 1:53 GMT+01:00 Jason Gerecke <[hidden email]>:
Hmmm. It could need to be prodded to send the appropriate report
(which is the case with most Wacom tablets) before anything useful
comes out. You might try using the "hid-recorder" tool from [1] with
its "-d" option. That'll get data from debugfs instead of the hidraw
device, and might produce some output.

[1]: https://bentiss.github.io/hid-replay-docs/

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one  /
(That is to say, eight) to the two,     /
But you can’t take seven from three,    /
So you look at the sixty-fours....



On Tue, Oct 28, 2014 at 10:36 AM, Isaac Marco Blancas
<[hidden email]> wrote:
> 2014-10-28 17:54 GMT+01:00 Jason Gerecke <[hidden email]>:
>>
>>
>> Alternatively, you /might/ have some luck having the HID driver
>> control the device. See what happens if you add
>> 'usbhid.quirks=0x056a:0x0221:0x40000000' to the kernel commandline in
>> GRUB. You might get a new /dev/input/eventN device, or at least have
>> some interesting dmesg logs...
>>
>
> Thank you for your answer...
>
> I have boot after adding this to GRUB and there was no kernel panic but
> there's no response when I move the pen.
>
> [  112.868335] usb 2-1.1: new high-speed USB device number 6 using ehci-pci
> [  112.961270] usb 2-1.1: New USB device found, idVendor=056a,
> idProduct=0221
> [  112.961274] usb 2-1.1: New USB device strings: Mfr=1, Product=2,
> SerialNumber=5
> [  112.961276] usb 2-1.1: Product: MSC Device
> [  112.961288] usb 2-1.1: Manufacturer: Wacom, Inc.
> [  112.961292] usb 2-1.1: SerialNumber: 3B33000032EB5A090002DD01A3CC9A09
> [  112.962798] usb-storage 2-1.1:1.1: USB Mass Storage device detected
> [  112.962868] scsi7 : usb-storage 2-1.1:1.1
> [  112.994997] input: Wacom, Inc. MSC Device as
> /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/input/input22
> [  112.995168] hid-generic 0003:056A:0221.0008: input,hidraw5: USB HID v1.01
> Mouse [Wacom, Inc. MSC Device] on usb-0000:00:1d.0-1.1/input0
> [  113.961633] scsi 7:0:0:0: Direct-Access     Wacom    Inkling
> 1256 PQ: 0 ANSI: 4
> [  113.961872] sd 7:0:0:0: Attached scsi generic sg3 type 0
> [  113.963123] sd 7:0:0:0: [sdc] 963840 2048-byte logical blocks: (1.97
> GB/1.83 GiB)
>
>
> The device is on /dev/hidraw5 but if I make a
>
> cat /dev/hidraw5
>
> and move the pen... nothing is returned
>
> --
> Isaac Marco Blancas
> Universidad a Distancia de Madrid (UDIMA)
> 902 02 00 03



--
Isaac Marco Blancas
Universidad a Distancia de Madrid (UDIMA)
902 02 00 03

------------------------------------------------------------------------------

_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: wacom inkling as a tablet

Isaac Marco Blancas
Some help is needed by Roel Jansen in the inklingreader for linux project. He is getting good results and needs help to understand the X Y coodinates and pressure params.

You can see at https://github.com/roelj/inklingreader/issues/13#issuecomment-63218429


2014-10-29 17:47 GMT+01:00 Isaac Marco Blancas <[hidden email]>:
I tried with the hid-recorder but there are no events when I move the pen.

sudo hid-recorder -d /dev/hidraw6
R: 215 05 0d 09 02 a1 01 85 02 09 02 a1 00 05 01 09 30 09 31 15 00 26 80 07 35 00 46 00 78 65 11 55 0e 75 10 95 02 81 02 05 0d 09 42 09 45 09 44 09 32 15 00 25 01 75 01 95 04 65 00 81 02 05 09 19 01 29 04 15 00 25 01 75 01 95 04 81 02 05 0d 09 30 15 00 26 00 04 75 10 95 01 81 02 05 0d 09 3d 09 3e 15 81 25 7f 75 08 95 02 81 02 c0 05 01 09 00 85 04 15 00 26 ff 00 75 08 95 0c 81 02 05 01 09 00 85 08 15 00 26 ff 00 75 08 95 3b 81 02 09 01 85 80 75 08 95 20 b1 02 c0 05 01 09 02 a1 01 85 01 09 01 a1 00 05 01 09 30 09 31 15 00 26 80 07 35 00 46 00 78 65 11 55 0e 75 10 95 02 81 02 05 09 19 01 29 03 15 00 25 01 75 01 95 03 65 00 81 02 95 05 81 01 c0 c0
N: Wacom, Inc. MSC Device
P: usb-0000:00:1d.0-1.1/input0
I: 3 056a 0221
reading debug interface /sys/kernel/debug/hid/0003:056A:0221.000A/events instead of /dev/hidraw6
^C
No events where recorded.
You may need to remove the option "--debugfs" to get more recordings.

--
Isaac Marco Blancas
Universidad a Distancia de Madrid (UDIMA)
902 02 00 03

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: wacom inkling as a tablet

Chris Bagwell
Looks like Roel's about got it figured out.  Based on this packet snippet in github thread:

02:00:00:e6:03:08:00:00:a5:0d
I see he's got it sending pen data data.  The 02 matches with report ID #2 in the lsusb output:

            Item(Local ): Usage, data= [ 0x02 ] 2
                            Pen
            Item(Main  ): Collection, data= [ 0x01 ] 1
                            Application
            Item(Global): Report ID, data= [ 0x02 ] 2

The next 4 bytes are X/Y as described by these fields:

            Item(Local ): Usage, data= [ 0x30 ] 48
                            Direction-X
            Item(Local ): Usage, data= [ 0x31 ] 49
                            Direction-Y
            Item(Global): Report Size, data= [ 0x10 ] 16
            Item(Global): Report Count, data= [ 0x02 ] 2

And so on. 

This seems to be a full HID compliant device so in near future it may "just work" with latest Linux kernels.  Its probably worth booting Linux 3.17 kernel and see how it behaves.

Around this commit time frame they have been cleaning up kernel driver so that newer Wacom devices better work with generic HID input driver.  https://github.com/torvalds/linux/commit/471d17148c8b4174ac5f5283a73316d12c4379bc

In mean time you'll probably have good luck getting a custom driver working starting from input-wacom git repo from sourceforge page.

If you search wacom mailing list you should see past examples of people adding their usb product ID's to wacom_wac.c file and then hacking up existing IRQ handlers to parse pen data for new wacom tablets.

I'm guessing you had to replay some USB packet to get device send pen data instead of mouse data?  Or to start sending any data at all?  You can look at wacom_sys.c::wacom_set_device_mode()  as example of sending that type data.

Chris



On Sun, Nov 16, 2014 at 7:41 AM, Isaac Marco Blancas <[hidden email]> wrote:
Some help is needed by Roel Jansen in the inklingreader for linux project. He is getting good results and needs help to understand the X Y coodinates and pressure params.

You can see at https://github.com/roelj/inklingreader/issues/13#issuecomment-63218429


2014-10-29 17:47 GMT+01:00 Isaac Marco Blancas <[hidden email]>:
I tried with the hid-recorder but there are no events when I move the pen.

sudo hid-recorder -d /dev/hidraw6
R: 215 05 0d 09 02 a1 01 85 02 09 02 a1 00 05 01 09 30 09 31 15 00 26 80 07 35 00 46 00 78 65 11 55 0e 75 10 95 02 81 02 05 0d 09 42 09 45 09 44 09 32 15 00 25 01 75 01 95 04 65 00 81 02 05 09 19 01 29 04 15 00 25 01 75 01 95 04 81 02 05 0d 09 30 15 00 26 00 04 75 10 95 01 81 02 05 0d 09 3d 09 3e 15 81 25 7f 75 08 95 02 81 02 c0 05 01 09 00 85 04 15 00 26 ff 00 75 08 95 0c 81 02 05 01 09 00 85 08 15 00 26 ff 00 75 08 95 3b 81 02 09 01 85 80 75 08 95 20 b1 02 c0 05 01 09 02 a1 01 85 01 09 01 a1 00 05 01 09 30 09 31 15 00 26 80 07 35 00 46 00 78 65 11 55 0e 75 10 95 02 81 02 05 09 19 01 29 03 15 00 25 01 75 01 95 03 65 00 81 02 95 05 81 01 c0 c0
N: Wacom, Inc. MSC Device
P: usb-0000:00:1d.0-1.1/input0
I: 3 056a 0221
reading debug interface /sys/kernel/debug/hid/0003:056A:0221.000A/events instead of /dev/hidraw6
^C
No events where recorded.
You may need to remove the option "--debugfs" to get more recordings.

--
Isaac Marco Blancas
Universidad a Distancia de Madrid (UDIMA)
902 02 00 03

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss



------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: wacom inkling as a tablet

Roel Janssen
Dear list,

I'm Roel. The guy who's trying to get the Inkling to work with the Wacom
driver.

Thanks Chris, for providing some details on where I should start hacking
the driver.

In the following link is the source code of how I activated the HID
interface of the device:
https://github.com/roelj/inklingreader/blob/275411f269253dc72731b063307edd46f9d458b3/src/usb/online-mode.c

Do you know what these sequences of URB_CONTROL's mean?

Kind regards,
Roel

On Sun, 2014-11-16 at 11:59 -0600, Chris Bagwell wrote:

> Looks like Roel's about got it figured out.  Based on this packet
> snippet in github thread:
>
> 02:00:00:e6:03:08:00:00:a5:0d
> I see he's got it sending pen data data.  The 02 matches with report
> ID #2 in the lsusb output:
>
>             Item(Local ): Usage, data= [ 0x02 ] 2
>                             Pen
>             Item(Main  ): Collection, data= [ 0x01 ] 1
>                             Application
>             Item(Global): Report ID, data= [ 0x02 ] 2
>
>
> The next 4 bytes are X/Y as described by these fields:
>
>             Item(Local ): Usage, data= [ 0x30 ] 48
>                             Direction-X
>             Item(Local ): Usage, data= [ 0x31 ] 49
>                             Direction-Y
>             Item(Global): Report Size, data= [ 0x10 ] 16
>             Item(Global): Report Count, data= [ 0x02 ] 2
>
>
> And so on.  
>
>
> This seems to be a full HID compliant device so in near future it may
> "just work" with latest Linux kernels.  Its probably worth booting
> Linux 3.17 kernel and see how it behaves.
>
> Around this commit time frame they have been cleaning up kernel driver
> so that newer Wacom devices better work with generic HID input driver.
> https://github.com/torvalds/linux/commit/471d17148c8b4174ac5f5283a73316d12c4379bc
>
>
> In mean time you'll probably have good luck getting a custom driver
> working starting from input-wacom git repo from sourceforge page.
>
>
> If you search wacom mailing list you should see past examples of
> people adding their usb product ID's to wacom_wac.c file and then
> hacking up existing IRQ handlers to parse pen data for new wacom
> tablets.
>
> I'm guessing you had to replay some USB packet to get device send pen
> data instead of mouse data?  Or to start sending any data at all?  You
> can look at wacom_sys.c::wacom_set_device_mode()  as example of
> sending that type data.
>
>
> Chris
>
>
>
>
>
>
> On Sun, Nov 16, 2014 at 7:41 AM, Isaac Marco Blancas
> <[hidden email]> wrote:
>         Some help is needed by Roel Jansen in the inklingreader for
>         linux project. He is getting good results and needs help to
>         understand the X Y coodinates and pressure params.
>        
>        
>         You can see at
>         https://github.com/roelj/inklingreader/issues/13#issuecomment-63218429
>        
>        
>        
>         2014-10-29 17:47 GMT+01:00 Isaac Marco Blancas
>         <[hidden email]>:
>                 I tried with the hid-recorder but there are no events
>                 when I move the pen.
>                
>                 sudo hid-recorder -d /dev/hidraw6
>                 R: 215 05 0d 09 02 a1 01 85 02 09 02 a1 00 05 01 09 30
>                 09 31 15 00 26 80 07 35 00 46 00 78 65 11 55 0e 75 10
>                 95 02 81 02 05 0d 09 42 09 45 09 44 09 32 15 00 25 01
>                 75 01 95 04 65 00 81 02 05 09 19 01 29 04 15 00 25 01
>                 75 01 95 04 81 02 05 0d 09 30 15 00 26 00 04 75 10 95
>                 01 81 02 05 0d 09 3d 09 3e 15 81 25 7f 75 08 95 02 81
>                 02 c0 05 01 09 00 85 04 15 00 26 ff 00 75 08 95 0c 81
>                 02 05 01 09 00 85 08 15 00 26 ff 00 75 08 95 3b 81 02
>                 09 01 85 80 75 08 95 20 b1 02 c0 05 01 09 02 a1 01 85
>                 01 09 01 a1 00 05 01 09 30 09 31 15 00 26 80 07 35 00
>                 46 00 78 65 11 55 0e 75 10 95 02 81 02 05 09 19 01 29
>                 03 15 00 25 01 75 01 95 03 65 00 81 02 95 05 81 01 c0
>                 c0
>                 N: Wacom, Inc. MSC Device
>                 P: usb-0000:00:1d.0-1.1/input0
>                 I: 3 056a 0221
>                 reading debug
>                 interface /sys/kernel/debug/hid/0003:056A:0221.000A/events instead of /dev/hidraw6
>                 ^C
>                 No events where recorded.
>                 You may need to remove the option "--debugfs" to get
>                 more recordings.
>                
>        
>         --
>         Isaac Marco Blancas
>         Universidad a Distancia de Madrid (UDIMA)
>         902 02 00 03
>        
>         ------------------------------------------------------------------------------
>         Comprehensive Server Monitoring with Site24x7.
>         Monitor 10 servers for $9/Month.
>         Get alerted through email, SMS, voice calls or mobile push
>         notifications.
>         Take corrective actions from your mobile device.
>         http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
>         _______________________________________________
>         Linuxwacom-discuss mailing list
>         [hidden email]
>         https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
>        
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> _______________________________________________ Linuxwacom-discuss mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: wacom inkling as a tablet

Chris Bagwell
Hi Roel,

Here are a couple of links to older thread listing that gives some Linux USB debug tips and some logic for converting X/Y that is likely better replacement for your current X/Y logic.

http://linuxwacom-discuss.996327.n3.nabble.com/Re-Logging-new-Bamboo-USB-Packets-td7061.html
http://linuxwacom-discuss.996327.n3.nabble.com/Intuos4-and-Linux-3-7-td4336.html

If I'm recalling correctly the writes your doing are all sets or reads of HID feature requests.  Feature requests are basically way you modify any dynamic behavior of HID devices.

Here is link to some sample feature request packets to Wacom device using Linux USB debug dumps.  Below is the write from wacom_sys.c:wacom_set_devicemode() that enables HW to send pen packets.  It writes to report id 2 with usb_data[] of 02 02 and then does a get to same report id to see if write worked.

http://sourceforge.net/p/linuxwacom/mailman/message/31818322/
ffff880111780cc0 2569735491 S Co:5:004:0 s 21 09 0302 0000 0002 2 = 0202
ffff880111780cc0 2569736271 C Co:5:004:0 0 2 >
ffff880111780cc0 2569736289 S Ci:5:004:0 s a1 01 0302 0000 0002 2 <
Yours is writing to report id 0x80 with length 33.  That closely matches your lsusb which shows report id 0x80 has length of 32 (+1 because report ID is sent in packet I guess).

Unless the feature is defined in HID standard (or maybe if names of fields are defined in HID report instead just array[32]), its impossible to know exact meaning of the writes without vendor docs.

Do the writes your doing occur during first plugin to Windows or do you have to click a button in GUI to enable on-line mode?  If former, I'd look into HID spec to see if its standard HID feature request.  If later then likely "magic handshake" is all you can document.

Chris

On Sun, Nov 16, 2014 at 3:02 PM, Roel Janssen <[hidden email]> wrote:
Dear list,

I'm Roel. The guy who's trying to get the Inkling to work with the Wacom
driver.

Thanks Chris, for providing some details on where I should start hacking
the driver.

In the following link is the source code of how I activated the HID
interface of the device:
https://github.com/roelj/inklingreader/blob/275411f269253dc72731b063307edd46f9d458b3/src/usb/online-mode.c

Do you know what these sequences of URB_CONTROL's mean?

Kind regards,
Roel

On Sun, 2014-11-16 at 11:59 -0600, Chris Bagwell wrote:
> Looks like Roel's about got it figured out.  Based on this packet
> snippet in github thread:
>
> 02:00:00:e6:03:08:00:00:a5:0d
> I see he's got it sending pen data data.  The 02 matches with report
> ID #2 in the lsusb output:
>
>             Item(Local ): Usage, data= [ 0x02 ] 2
>                             Pen
>             Item(Main  ): Collection, data= [ 0x01 ] 1
>                             Application
>             Item(Global): Report ID, data= [ 0x02 ] 2
>
>
> The next 4 bytes are X/Y as described by these fields:
>
>             Item(Local ): Usage, data= [ 0x30 ] 48
>                             Direction-X
>             Item(Local ): Usage, data= [ 0x31 ] 49
>                             Direction-Y
>             Item(Global): Report Size, data= [ 0x10 ] 16
>             Item(Global): Report Count, data= [ 0x02 ] 2
>
>
> And so on.
>
>
> This seems to be a full HID compliant device so in near future it may
> "just work" with latest Linux kernels.  Its probably worth booting
> Linux 3.17 kernel and see how it behaves.
>
> Around this commit time frame they have been cleaning up kernel driver
> so that newer Wacom devices better work with generic HID input driver.
> https://github.com/torvalds/linux/commit/471d17148c8b4174ac5f5283a73316d12c4379bc
>
>
> In mean time you'll probably have good luck getting a custom driver
> working starting from input-wacom git repo from sourceforge page.
>
>
> If you search wacom mailing list you should see past examples of
> people adding their usb product ID's to wacom_wac.c file and then
> hacking up existing IRQ handlers to parse pen data for new wacom
> tablets.
>
> I'm guessing you had to replay some USB packet to get device send pen
> data instead of mouse data?  Or to start sending any data at all?  You
> can look at wacom_sys.c::wacom_set_device_mode()  as example of
> sending that type data.
>
>
> Chris
>
>
>
>
>
>
> On Sun, Nov 16, 2014 at 7:41 AM, Isaac Marco Blancas
> <[hidden email]> wrote:
>         Some help is needed by Roel Jansen in the inklingreader for
>         linux project. He is getting good results and needs help to
>         understand the X Y coodinates and pressure params.
>
>
>         You can see at
>         https://github.com/roelj/inklingreader/issues/13#issuecomment-63218429
>
>
>
>         2014-10-29 17:47 GMT+01:00 Isaac Marco Blancas
>         <[hidden email]>:
>                 I tried with the hid-recorder but there are no events
>                 when I move the pen.
>
>                 sudo hid-recorder -d /dev/hidraw6
>                 R: 215 05 0d 09 02 a1 01 85 02 09 02 a1 00 05 01 09 30
>                 09 31 15 00 26 80 07 35 00 46 00 78 65 11 55 0e 75 10
>                 95 02 81 02 05 0d 09 42 09 45 09 44 09 32 15 00 25 01
>                 75 01 95 04 65 00 81 02 05 09 19 01 29 04 15 00 25 01
>                 75 01 95 04 81 02 05 0d 09 30 15 00 26 00 04 75 10 95
>                 01 81 02 05 0d 09 3d 09 3e 15 81 25 7f 75 08 95 02 81
>                 02 c0 05 01 09 00 85 04 15 00 26 ff 00 75 08 95 0c 81
>                 02 05 01 09 00 85 08 15 00 26 ff 00 75 08 95 3b 81 02
>                 09 01 85 80 75 08 95 20 b1 02 c0 05 01 09 02 a1 01 85
>                 01 09 01 a1 00 05 01 09 30 09 31 15 00 26 80 07 35 00
>                 46 00 78 65 11 55 0e 75 10 95 02 81 02 05 09 19 01 29
>                 03 15 00 25 01 75 01 95 03 65 00 81 02 95 05 81 01 c0
>                 c0
>                 N: Wacom, Inc. MSC Device
>                 P: usb-0000:00:1d.0-1.1/input0
>                 I: 3 056a 0221
>                 reading debug
>                 interface /sys/kernel/debug/hid/0003:056A:0221.000A/events instead of /dev/hidraw6
>                 ^C
>                 No events where recorded.
>                 You may need to remove the option "--debugfs" to get
>                 more recordings.
>
>
>         --
>         Isaac Marco Blancas
>         Universidad a Distancia de Madrid (UDIMA)
>         902 02 00 03
>
>         ------------------------------------------------------------------------------
>         Comprehensive Server Monitoring with Site24x7.
>         Monitor 10 servers for $9/Month.
>         Get alerted through email, SMS, voice calls or mobile push
>         notifications.
>         Take corrective actions from your mobile device.
>         http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
>         _______________________________________________
>         Linuxwacom-discuss mailing list
>         [hidden email]
>         https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
>
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> _______________________________________________ Linuxwacom-discuss mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: wacom inkling as a tablet

Chris Bagwell
Roel, here is one more bit of info that may help you while your working in user land.

It is possible to create a linux input device and inject data from userspace while X thinks its typical HW input driver.  See this wiki for some more info on a userspace app you can use to emulate HW: http://www.freedesktop.org/wiki/Evemu/

Also, see this code from evemu that you could make use of: http://bazaar.launchpad.net/~oif-team/evemu/trunk/view/head:/src/evemu.c

And last, this wiki can give you some background on how input events work for simple tablet pens: http://linuxwacom.sourceforge.net/wiki/index.php/Kernel_Input_Event_Overview

With that info, you likely can continue updating your inklingreader app to take packets your reading and inject them into kernel so they will make it back to X.  Thats likely a faster way to get something work then trying to figure out both how HID Linux drivers work in addition to how X input drivers expect input events to work.

Chris

On Sun, Nov 16, 2014 at 11:37 PM, Chris Bagwell <[hidden email]> wrote:
Hi Roel,

Here are a couple of links to older thread listing that gives some Linux USB debug tips and some logic for converting X/Y that is likely better replacement for your current X/Y logic.

http://linuxwacom-discuss.996327.n3.nabble.com/Re-Logging-new-Bamboo-USB-Packets-td7061.html
http://linuxwacom-discuss.996327.n3.nabble.com/Intuos4-and-Linux-3-7-td4336.html

If I'm recalling correctly the writes your doing are all sets or reads of HID feature requests.  Feature requests are basically way you modify any dynamic behavior of HID devices.

Here is link to some sample feature request packets to Wacom device using Linux USB debug dumps.  Below is the write from wacom_sys.c:wacom_set_devicemode() that enables HW to send pen packets.  It writes to report id 2 with usb_data[] of 02 02 and then does a get to same report id to see if write worked.

http://sourceforge.net/p/linuxwacom/mailman/message/31818322/
ffff880111780cc0 <a href="tel:2569735491" value="+12569735491" target="_blank">2569735491 S Co:5:004:0 s 21 09 0302 0000 0002 2 = 0202
ffff880111780cc0 2569736271 C Co:5:004:0 0 2 >
ffff880111780cc0 2569736289 S Ci:5:004:0 s a1 01 0302 0000 0002 2 <
Yours is writing to report id 0x80 with length 33.  That closely matches your lsusb which shows report id 0x80 has length of 32 (+1 because report ID is sent in packet I guess).

Unless the feature is defined in HID standard (or maybe if names of fields are defined in HID report instead just array[32]), its impossible to know exact meaning of the writes without vendor docs.

Do the writes your doing occur during first plugin to Windows or do you have to click a button in GUI to enable on-line mode?  If former, I'd look into HID spec to see if its standard HID feature request.  If later then likely "magic handshake" is all you can document.

Chris

On Sun, Nov 16, 2014 at 3:02 PM, Roel Janssen <[hidden email]> wrote:
Dear list,

I'm Roel. The guy who's trying to get the Inkling to work with the Wacom
driver.

Thanks Chris, for providing some details on where I should start hacking
the driver.

In the following link is the source code of how I activated the HID
interface of the device:
https://github.com/roelj/inklingreader/blob/275411f269253dc72731b063307edd46f9d458b3/src/usb/online-mode.c

Do you know what these sequences of URB_CONTROL's mean?

Kind regards,
Roel

On Sun, 2014-11-16 at 11:59 -0600, Chris Bagwell wrote:
> Looks like Roel's about got it figured out.  Based on this packet
> snippet in github thread:
>
> 02:00:00:e6:03:08:00:00:a5:0d
> I see he's got it sending pen data data.  The 02 matches with report
> ID #2 in the lsusb output:
>
>             Item(Local ): Usage, data= [ 0x02 ] 2
>                             Pen
>             Item(Main  ): Collection, data= [ 0x01 ] 1
>                             Application
>             Item(Global): Report ID, data= [ 0x02 ] 2
>
>
> The next 4 bytes are X/Y as described by these fields:
>
>             Item(Local ): Usage, data= [ 0x30 ] 48
>                             Direction-X
>             Item(Local ): Usage, data= [ 0x31 ] 49
>                             Direction-Y
>             Item(Global): Report Size, data= [ 0x10 ] 16
>             Item(Global): Report Count, data= [ 0x02 ] 2
>
>
> And so on.
>
>
> This seems to be a full HID compliant device so in near future it may
> "just work" with latest Linux kernels.  Its probably worth booting
> Linux 3.17 kernel and see how it behaves.
>
> Around this commit time frame they have been cleaning up kernel driver
> so that newer Wacom devices better work with generic HID input driver.
> https://github.com/torvalds/linux/commit/471d17148c8b4174ac5f5283a73316d12c4379bc
>
>
> In mean time you'll probably have good luck getting a custom driver
> working starting from input-wacom git repo from sourceforge page.
>
>
> If you search wacom mailing list you should see past examples of
> people adding their usb product ID's to wacom_wac.c file and then
> hacking up existing IRQ handlers to parse pen data for new wacom
> tablets.
>
> I'm guessing you had to replay some USB packet to get device send pen
> data instead of mouse data?  Or to start sending any data at all?  You
> can look at wacom_sys.c::wacom_set_device_mode()  as example of
> sending that type data.
>
>
> Chris
>
>
>
>
>
>
> On Sun, Nov 16, 2014 at 7:41 AM, Isaac Marco Blancas
> <[hidden email]> wrote:
>         Some help is needed by Roel Jansen in the inklingreader for
>         linux project. He is getting good results and needs help to
>         understand the X Y coodinates and pressure params.
>
>
>         You can see at
>         https://github.com/roelj/inklingreader/issues/13#issuecomment-63218429
>
>
>
>         2014-10-29 17:47 GMT+01:00 Isaac Marco Blancas
>         <[hidden email]>:
>                 I tried with the hid-recorder but there are no events
>                 when I move the pen.
>
>                 sudo hid-recorder -d /dev/hidraw6
>                 R: 215 05 0d 09 02 a1 01 85 02 09 02 a1 00 05 01 09 30
>                 09 31 15 00 26 80 07 35 00 46 00 78 65 11 55 0e 75 10
>                 95 02 81 02 05 0d 09 42 09 45 09 44 09 32 15 00 25 01
>                 75 01 95 04 65 00 81 02 05 09 19 01 29 04 15 00 25 01
>                 75 01 95 04 81 02 05 0d 09 30 15 00 26 00 04 75 10 95
>                 01 81 02 05 0d 09 3d 09 3e 15 81 25 7f 75 08 95 02 81
>                 02 c0 05 01 09 00 85 04 15 00 26 ff 00 75 08 95 0c 81
>                 02 05 01 09 00 85 08 15 00 26 ff 00 75 08 95 3b 81 02
>                 09 01 85 80 75 08 95 20 b1 02 c0 05 01 09 02 a1 01 85
>                 01 09 01 a1 00 05 01 09 30 09 31 15 00 26 80 07 35 00
>                 46 00 78 65 11 55 0e 75 10 95 02 81 02 05 09 19 01 29
>                 03 15 00 25 01 75 01 95 03 65 00 81 02 95 05 81 01 c0
>                 c0
>                 N: Wacom, Inc. MSC Device
>                 P: usb-0000:00:1d.0-1.1/input0
>                 I: 3 056a 0221
>                 reading debug
>                 interface /sys/kernel/debug/hid/0003:056A:0221.000A/events instead of /dev/hidraw6
>                 ^C
>                 No events where recorded.
>                 You may need to remove the option "--debugfs" to get
>                 more recordings.
>
>
>         --
>         Isaac Marco Blancas
>         Universidad a Distancia de Madrid (UDIMA)
>         902 02 00 03
>
>         ------------------------------------------------------------------------------
>         Comprehensive Server Monitoring with Site24x7.
>         Monitor 10 servers for $9/Month.
>         Get alerted through email, SMS, voice calls or mobile push
>         notifications.
>         Take corrective actions from your mobile device.
>         http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
>         _______________________________________________
>         Linuxwacom-discuss mailing list
>         [hidden email]
>         https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
>
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> _______________________________________________ Linuxwacom-discuss mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: wacom inkling as a tablet

Chris Bagwell
Sorry, I meant to send link to freedesktop's git repo: http://cgit.freedesktop.org/evemu/tree/src/evemu.c

On Mon, Nov 17, 2014 at 10:42 PM, Chris Bagwell <[hidden email]> wrote:
Roel, here is one more bit of info that may help you while your working in user land.

It is possible to create a linux input device and inject data from userspace while X thinks its typical HW input driver.  See this wiki for some more info on a userspace app you can use to emulate HW: http://www.freedesktop.org/wiki/Evemu/

Also, see this code from evemu that you could make use of: http://bazaar.launchpad.net/~oif-team/evemu/trunk/view/head:/src/evemu.c

And last, this wiki can give you some background on how input events work for simple tablet pens: http://linuxwacom.sourceforge.net/wiki/index.php/Kernel_Input_Event_Overview

With that info, you likely can continue updating your inklingreader app to take packets your reading and inject them into kernel so they will make it back to X.  Thats likely a faster way to get something work then trying to figure out both how HID Linux drivers work in addition to how X input drivers expect input events to work.

Chris


On Sun, Nov 16, 2014 at 11:37 PM, Chris Bagwell <[hidden email]> wrote:
Hi Roel,

Here are a couple of links to older thread listing that gives some Linux USB debug tips and some logic for converting X/Y that is likely better replacement for your current X/Y logic.

http://linuxwacom-discuss.996327.n3.nabble.com/Re-Logging-new-Bamboo-USB-Packets-td7061.html
http://linuxwacom-discuss.996327.n3.nabble.com/Intuos4-and-Linux-3-7-td4336.html

If I'm recalling correctly the writes your doing are all sets or reads of HID feature requests.  Feature requests are basically way you modify any dynamic behavior of HID devices.

Here is link to some sample feature request packets to Wacom device using Linux USB debug dumps.  Below is the write from wacom_sys.c:wacom_set_devicemode() that enables HW to send pen packets.  It writes to report id 2 with usb_data[] of 02 02 and then does a get to same report id to see if write worked.

http://sourceforge.net/p/linuxwacom/mailman/message/31818322/
ffff880111780cc0 <a href="tel:2569735491" value="+12569735491" target="_blank">2569735491 S Co:5:004:0 s 21 09 0302 0000 0002 2 = 0202
ffff880111780cc0 2569736271 C Co:5:004:0 0 2 >
ffff880111780cc0 2569736289 S Ci:5:004:0 s a1 01 0302 0000 0002 2 <
Yours is writing to report id 0x80 with length 33.  That closely matches your lsusb which shows report id 0x80 has length of 32 (+1 because report ID is sent in packet I guess).

Unless the feature is defined in HID standard (or maybe if names of fields are defined in HID report instead just array[32]), its impossible to know exact meaning of the writes without vendor docs.

Do the writes your doing occur during first plugin to Windows or do you have to click a button in GUI to enable on-line mode?  If former, I'd look into HID spec to see if its standard HID feature request.  If later then likely "magic handshake" is all you can document.

Chris

On Sun, Nov 16, 2014 at 3:02 PM, Roel Janssen <[hidden email]> wrote:
Dear list,

I'm Roel. The guy who's trying to get the Inkling to work with the Wacom
driver.

Thanks Chris, for providing some details on where I should start hacking
the driver.

In the following link is the source code of how I activated the HID
interface of the device:
https://github.com/roelj/inklingreader/blob/275411f269253dc72731b063307edd46f9d458b3/src/usb/online-mode.c

Do you know what these sequences of URB_CONTROL's mean?

Kind regards,
Roel

On Sun, 2014-11-16 at 11:59 -0600, Chris Bagwell wrote:
> Looks like Roel's about got it figured out.  Based on this packet
> snippet in github thread:
>
> 02:00:00:e6:03:08:00:00:a5:0d
> I see he's got it sending pen data data.  The 02 matches with report
> ID #2 in the lsusb output:
>
>             Item(Local ): Usage, data= [ 0x02 ] 2
>                             Pen
>             Item(Main  ): Collection, data= [ 0x01 ] 1
>                             Application
>             Item(Global): Report ID, data= [ 0x02 ] 2
>
>
> The next 4 bytes are X/Y as described by these fields:
>
>             Item(Local ): Usage, data= [ 0x30 ] 48
>                             Direction-X
>             Item(Local ): Usage, data= [ 0x31 ] 49
>                             Direction-Y
>             Item(Global): Report Size, data= [ 0x10 ] 16
>             Item(Global): Report Count, data= [ 0x02 ] 2
>
>
> And so on.
>
>
> This seems to be a full HID compliant device so in near future it may
> "just work" with latest Linux kernels.  Its probably worth booting
> Linux 3.17 kernel and see how it behaves.
>
> Around this commit time frame they have been cleaning up kernel driver
> so that newer Wacom devices better work with generic HID input driver.
> https://github.com/torvalds/linux/commit/471d17148c8b4174ac5f5283a73316d12c4379bc
>
>
> In mean time you'll probably have good luck getting a custom driver
> working starting from input-wacom git repo from sourceforge page.
>
>
> If you search wacom mailing list you should see past examples of
> people adding their usb product ID's to wacom_wac.c file and then
> hacking up existing IRQ handlers to parse pen data for new wacom
> tablets.
>
> I'm guessing you had to replay some USB packet to get device send pen
> data instead of mouse data?  Or to start sending any data at all?  You
> can look at wacom_sys.c::wacom_set_device_mode()  as example of
> sending that type data.
>
>
> Chris
>
>
>
>
>
>
> On Sun, Nov 16, 2014 at 7:41 AM, Isaac Marco Blancas
> <[hidden email]> wrote:
>         Some help is needed by Roel Jansen in the inklingreader for
>         linux project. He is getting good results and needs help to
>         understand the X Y coodinates and pressure params.
>
>
>         You can see at
>         https://github.com/roelj/inklingreader/issues/13#issuecomment-63218429
>
>
>
>         2014-10-29 17:47 GMT+01:00 Isaac Marco Blancas
>         <[hidden email]>:
>                 I tried with the hid-recorder but there are no events
>                 when I move the pen.
>
>                 sudo hid-recorder -d /dev/hidraw6
>                 R: 215 05 0d 09 02 a1 01 85 02 09 02 a1 00 05 01 09 30
>                 09 31 15 00 26 80 07 35 00 46 00 78 65 11 55 0e 75 10
>                 95 02 81 02 05 0d 09 42 09 45 09 44 09 32 15 00 25 01
>                 75 01 95 04 65 00 81 02 05 09 19 01 29 04 15 00 25 01
>                 75 01 95 04 81 02 05 0d 09 30 15 00 26 00 04 75 10 95
>                 01 81 02 05 0d 09 3d 09 3e 15 81 25 7f 75 08 95 02 81
>                 02 c0 05 01 09 00 85 04 15 00 26 ff 00 75 08 95 0c 81
>                 02 05 01 09 00 85 08 15 00 26 ff 00 75 08 95 3b 81 02
>                 09 01 85 80 75 08 95 20 b1 02 c0 05 01 09 02 a1 01 85
>                 01 09 01 a1 00 05 01 09 30 09 31 15 00 26 80 07 35 00
>                 46 00 78 65 11 55 0e 75 10 95 02 81 02 05 09 19 01 29
>                 03 15 00 25 01 75 01 95 03 65 00 81 02 95 05 81 01 c0
>                 c0
>                 N: Wacom, Inc. MSC Device
>                 P: usb-0000:00:1d.0-1.1/input0
>                 I: 3 056a 0221
>                 reading debug
>                 interface /sys/kernel/debug/hid/0003:056A:0221.000A/events instead of /dev/hidraw6
>                 ^C
>                 No events where recorded.
>                 You may need to remove the option "--debugfs" to get
>                 more recordings.
>
>
>         --
>         Isaac Marco Blancas
>         Universidad a Distancia de Madrid (UDIMA)
>         902 02 00 03
>
>         ------------------------------------------------------------------------------
>         Comprehensive Server Monitoring with Site24x7.
>         Monitor 10 servers for $9/Month.
>         Get alerted through email, SMS, voice calls or mobile push
>         notifications.
>         Take corrective actions from your mobile device.
>         http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
>         _______________________________________________
>         Linuxwacom-discuss mailing list
>         [hidden email]
>         https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
>
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> _______________________________________________ Linuxwacom-discuss mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss




------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Reply | Threaded
Open this post in threaded view
|

Re: wacom inkling as a tablet

Roel Janssen

Hello Chris,

Thanks a lot for the resources. It will take me a couple of days (maybe a week) to get something working.

The evemu solution seems pretty cool, but that would require people to use my software (InklingReader) to
get access to the HID interface of the Inkling. I believe that solution is non-optimal.

I don't know yet what I can/will do because I haven't processed the resources you pointed me to. If I have
any questions I will reply to this thread.

Thanks!

Kind regards,
Roel

 

Chris Bagwell schreef op 2014-11-18 05:43:

Sorry, I meant to send link to freedesktop's git repo: http://cgit.freedesktop.org/evemu/tree/src/evemu.c

On Mon, Nov 17, 2014 at 10:42 PM, Chris Bagwell <[hidden email]> wrote:
Roel, here is one more bit of info that may help you while your working in user land.

It is possible to create a linux input device and inject data from userspace while X thinks its typical HW input driver.  See this wiki for some more info on a userspace app you can use to emulate HW: http://www.freedesktop.org/wiki/Evemu/

Also, see this code from evemu that you could make use of: http://bazaar.launchpad.net/~oif-team/evemu/trunk/view/head:/src/evemu.c

And last, this wiki can give you some background on how input events work for simple tablet pens: http://linuxwacom.sourceforge.net/wiki/index.php/Kernel_Input_Event_Overview

With that info, you likely can continue updating your inklingreader app to take packets your reading and inject them into kernel so they will make it back to X.  Thats likely a faster way to get something work then trying to figure out both how HID Linux drivers work in addition to how X input drivers expect input events to work.

Chris


On Sun, Nov 16, 2014 at 11:37 PM, Chris Bagwell <[hidden email]> wrote:
Hi Roel,

Here are a couple of links to older thread listing that gives some Linux USB debug tips and some logic for converting X/Y that is likely better replacement for your current X/Y logic.

http://linuxwacom-discuss.996327.n3.nabble.com/Re-Logging-new-Bamboo-USB-Packets-td7061.html
http://linuxwacom-discuss.996327.n3.nabble.com/Intuos4-and-Linux-3-7-td4336.html

If I'm recalling correctly the writes your doing are all sets or reads of HID feature requests.  Feature requests are basically way you modify any dynamic behavior of HID devices.

Here is link to some sample feature request packets to Wacom device using Linux USB debug dumps.  Below is the write from wacom_sys.c:wacom_set_devicemode() that enables HW to send pen packets.  It writes to report id 2 with usb_data[] of 02 02 and then does a get to same report id to see if write worked.

http://sourceforge.net/p/linuxwacom/mailman/message/31818322/
ffff880111780cc0 <a href="tel:2569735491">2569735491 S Co:5:004:0 s 21 09 0302 0000 0002 2 = 0202
ffff880111780cc0 2569736271 C Co:5:004:0 0 2 >
ffff880111780cc0 2569736289 S Ci:5:004:0 s a1 01 0302 0000 0002 2 <
Yours is writing to report id 0x80 with length 33.  That closely matches your lsusb which shows report id 0x80 has length of 32 (+1 because report ID is sent in packet I guess).

Unless the feature is defined in HID standard (or maybe if names of fields are defined in HID report instead just array[32]), its impossible to know exact meaning of the writes without vendor docs.

Do the writes your doing occur during first plugin to Windows or do you have to click a button in GUI to enable on-line mode?  If former, I'd look into HID spec to see if its standard HID feature request.  If later then likely "magic handshake" is all you can document.
 
Chris

On Sun, Nov 16, 2014 at 3:02 PM, Roel Janssen <[hidden email]> wrote:
Dear list,

I'm Roel. The guy who's trying to get the Inkling to work with the Wacom
driver.

Thanks Chris, for providing some details on where I should start hacking
the driver.

In the following link is the source code of how I activated the HID
interface of the device:
https://github.com/roelj/inklingreader/blob/275411f269253dc72731b063307edd46f9d458b3/src/usb/online-mode.c

Do you know what these sequences of URB_CONTROL's mean?

Kind regards,
Roel

On Sun, 2014-11-16 at 11:59 -0600, Chris Bagwell wrote:
> Looks like Roel's about got it figured out.  Based on this packet
> snippet in github thread:
>
> 02:00:00:e6:03:08:00:00:a5:0d
> I see he's got it sending pen data data.  The 02 matches with report
> ID #2 in the lsusb output:
>
>             Item(Local ): Usage, data= [ 0x02 ] 2
>                             Pen
>             Item(Main  ): Collection, data= [ 0x01 ] 1
>                             Application
>             Item(Global): Report ID, data= [ 0x02 ] 2
>
>
> The next 4 bytes are X/Y as described by these fields:
>
>             Item(Local ): Usage, data= [ 0x30 ] 48
>                             Direction-X
>             Item(Local ): Usage, data= [ 0x31 ] 49
>                             Direction-Y
>             Item(Global): Report Size, data= [ 0x10 ] 16
>             Item(Global): Report Count, data= [ 0x02 ] 2
>
>
> And so on.
>
>
> This seems to be a full HID compliant device so in near future it may
> "just work" with latest Linux kernels.  Its probably worth booting
> Linux 3.17 kernel and see how it behaves.
>
> Around this commit time frame they have been cleaning up kernel driver
> so that newer Wacom devices better work with generic HID input driver.
> https://github.com/torvalds/linux/commit/471d17148c8b4174ac5f5283a73316d12c4379bc
>
>
> In mean time you'll probably have good luck getting a custom driver
> working starting from input-wacom git repo from sourceforge page.
>
>
> If you search wacom mailing list you should see past examples of
> people adding their usb product ID's to wacom_wac.c file and then
> hacking up existing IRQ handlers to parse pen data for new wacom
> tablets.
>
> I'm guessing you had to replay some USB packet to get device send pen
> data instead of mouse data?  Or to start sending any data at all?  You
> can look at wacom_sys.c::wacom_set_device_mode()  as example of
> sending that type data.
>
>
> Chris
>
>
>
>
>
>
> On Sun, Nov 16, 2014 at 7:41 AM, Isaac Marco Blancas
> <[hidden email]> wrote:
>         Some help is needed by Roel Jansen in the inklingreader for
>         linux project. He is getting good results and needs help to
>         understand the X Y coodinates and pressure params.
>
>
>         You can see at
>         https://github.com/roelj/inklingreader/issues/13#issuecomment-63218429
>
>
>
>         2014-10-29 17:47 GMT+01:00 Isaac Marco Blancas
>         <[hidden email]>:
>                 I tried with the hid-recorder but there are no events
>                 when I move the pen.
>
>                 sudo hid-recorder -d /dev/hidraw6
>                 R: 215 05 0d 09 02 a1 01 85 02 09 02 a1 00 05 01 09 30
>                 09 31 15 00 26 80 07 35 00 46 00 78 65 11 55 0e 75 10
>                 95 02 81 02 05 0d 09 42 09 45 09 44 09 32 15 00 25 01
>                 75 01 95 04 65 00 81 02 05 09 19 01 29 04 15 00 25 01
>                 75 01 95 04 81 02 05 0d 09 30 15 00 26 00 04 75 10 95
>                 01 81 02 05 0d 09 3d 09 3e 15 81 25 7f 75 08 95 02 81
>                 02 c0 05 01 09 00 85 04 15 00 26 ff 00 75 08 95 0c 81
>                 02 05 01 09 00 85 08 15 00 26 ff 00 75 08 95 3b 81 02
>                 09 01 85 80 75 08 95 20 b1 02 c0 05 01 09 02 a1 01 85
>                 01 09 01 a1 00 05 01 09 30 09 31 15 00 26 80 07 35 00
>                 46 00 78 65 11 55 0e 75 10 95 02 81 02 05 09 19 01 29
>                 03 15 00 25 01 75 01 95 03 65 00 81 02 95 05 81 01 c0
>                 c0
>                 N: Wacom, Inc. MSC Device
>                 P: usb-0000:00:1d.0-1.1/input0
>                 I: 3 056a 0221
>                 reading debug
>                 interface /sys/kernel/debug/hid/0003:056A:0221.000A/events instead of /dev/hidraw6
>                 ^C
>                 No events where recorded.
>                 You may need to remove the option "--debugfs" to get
>                 more recordings.
>
>
>         --
>         Isaac Marco Blancas
>         Universidad a Distancia de Madrid (UDIMA)
>         902 02 00 03
>
>         ------------------------------------------------------------------------------
>         Comprehensive Server Monitoring with Site24x7.
>         Monitor 10 servers for $9/Month.
>         Get alerted through email, SMS, voice calls or mobile push
>         notifications.
>         Take corrective actions from your mobile device.
>         http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
>         _______________________________________________
>         Linuxwacom-discuss mailing list
>         [hidden email]
>         https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
>
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> _______________________________________________ Linuxwacom-discuss mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss

 

 

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss