CTH-300; Bamboo Pad, wireless; usbmon

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

CTH-300; Bamboo Pad, wireless; usbmon

Julian Picht
Hi all,

I recently purchased a Bamboo Pad wireless (CTH-300, 056A:0319) and now I'm trying to get it to work with linux.

I found a thread from back in January this year about a device with the 0x318 device id. The user got to the point where multiple pen/touch "endpoints" were detected but the device would not be initialized correctly and thus not sending the interrupt requests. 

I get a very similar result, when I just use his patch with the type changed to BAMBOO_PT and the device id changed to 0x319.

Somebody suggested installing windows in a virtual machine and capturing the usb traffic. So this is what I did.

Now I'm sitting here, trying to make sense of the usbmon logs. I put them on github: https://github.com/jpicht/bamboodumps

What exactly am I looking for?

I got a little further with this patch:

diff -r /tmp/linux-source-3.13.0/drivers/input/tablet/wacom_wac.c linux-source-3.13.0/drivers/input/tablet/wacom_wac.c
2333a2334,2336
> static const struct wacom_features wacom_features_0x319 =
{ "Wacom Bamboo Pad",        WACOM_PKGLEN_BBPEN,    15200,  9500, 1023,
  31, INTUOSHT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
2467a2471
{ USB_DEVICE_DETAILED(0x319, USB_CLASS_HID, 0, 0) },

Now the initialization actually works and I get regular interrupts. But not the same as when using the windows driver, but still.

dmesg shows:
[12342.916427] usb 6-1: new full-speed USB device number 5 using uhci_hcd
[12343.080484] usb 6-1: New USB device found, idVendor=056a, idProduct=0319
[12343.080496] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[12343.080503] usb 6-1: Product: Bamboo Pad, wireless
[12343.080510] usb 6-1: Manufacturer: Wacom Co.,Ltd.
[12343.082727] input: Wacom Bamboo Tab Pen as /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.0/input/input31
[12343.084750] input: Wacom Bamboo Tab Pen as /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.1/input/input32
[12343.085630] input: Wacom Bamboo Tab Pen as /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.2/input/input33
[12343.086675] input: Wacom Bamboo Tab Pen as /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.3/input/input34
[12543.740584] usb 6-1: USB disconnect, device number 5
[12543.742890] wacom 6-1:1.1: wacom_sys_irq - usb_submit_urb failed with result -19
[12543.744865] wacom 6-1:1.3: wacom_sys_irq - usb_submit_urb failed with result -19
[12543.762870] wacom 6-1:1.2: wacom_sys_irq - usb_submit_urb failed with result -19

So the driver doesn't understand what is said... What's next? I could start poke around wacom_sys_irq with printk. Is this the right direction?

Thanks for reading and all the work you put into this project! Any help appreciated.

Julian Picht

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&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
|  
Report Content as Inappropriate

Re: CTH-300; Bamboo Pad, wireless; usbmon

Jason Gerecke
On Thu, Aug 7, 2014 at 12:15 AM, Julian Picht
<[hidden email]> wrote:

> Hi all,
>
> I recently purchased a Bamboo Pad wireless (CTH-300, 056A:0319) and now I'm
> trying to get it to work with linux.
>
> I found a thread from back in January this year about a device with the
> 0x318 device id. The user got to the point where multiple pen/touch
> "endpoints" were detected but the device would not be initialized correctly
> and thus not sending the interrupt requests.
>
> I get a very similar result, when I just use his patch with the type changed
> to BAMBOO_PT and the device id changed to 0x319.
>
> Somebody suggested installing windows in a virtual machine and capturing the
> usb traffic. So this is what I did.
>
> Now I'm sitting here, trying to make sense of the usbmon logs. I put them on
> github: https://github.com/jpicht/bamboodumps
>
> What exactly am I looking for?
>
> I got a little further with this patch:
>
> diff -r /tmp/linux-source-3.13.0/drivers/input/tablet/wacom_wac.c
> linux-source-3.13.0/drivers/input/tablet/wacom_wac.c
> 2333a2334,2336
>> static const struct wacom_features wacom_features_0x319 =
>>  { "Wacom Bamboo Pad",        WACOM_PKGLEN_BBPEN,    15200,  9500, 1023,
>>    31, INTUOSHT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
> 2467a2471
>>  { USB_DEVICE_DETAILED(0x319, USB_CLASS_HID, 0, 0) },
>
> Now the initialization actually works and I get regular interrupts. But not
> the same as when using the windows driver, but still.
>
> dmesg shows:
> [12342.916427] usb 6-1: new full-speed USB device number 5 using uhci_hcd
> [12343.080484] usb 6-1: New USB device found, idVendor=056a, idProduct=0319
> [12343.080496] usb 6-1: New USB device strings: Mfr=1, Product=2,
> SerialNumber=0
> [12343.080503] usb 6-1: Product: Bamboo Pad, wireless
> [12343.080510] usb 6-1: Manufacturer: Wacom Co.,Ltd.
> [12343.082727] input: Wacom Bamboo Tab Pen as
> /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.0/input/input31
> [12343.084750] input: Wacom Bamboo Tab Pen as
> /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.1/input/input32
> [12343.085630] input: Wacom Bamboo Tab Pen as
> /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.2/input/input33
> [12343.086675] input: Wacom Bamboo Tab Pen as
> /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.3/input/input34
> [12543.740584] usb 6-1: USB disconnect, device number 5
> [12543.742890] wacom 6-1:1.1: wacom_sys_irq - usb_submit_urb failed with
> result -19
> [12543.744865] wacom 6-1:1.3: wacom_sys_irq - usb_submit_urb failed with
> result -19
> [12543.762870] wacom 6-1:1.2: wacom_sys_irq - usb_submit_urb failed with
> result -19
>
> So the driver doesn't understand what is said... What's next? I could start
> poke around wacom_sys_irq with printk. Is this the right direction?
>
> Thanks for reading and all the work you put into this project! Any help
> appreciated.
>
> Julian Picht
>

I haven't looked at the packets too closely, but 'wacom_tpc_pen' seems
to decode data similar to the pen packets you captured. Try using
something more like the following:

static const struct wacom_features wacom_features_0x319 =
 { "Wacom Bamboo Pad",        WACOM_PKGLEN_PENABLED,    15200,  9500, 1023,
   0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };

{ USB_DEVICE_DETAILED(0x319, USB_CLASS_HID, 0, 0) },

That won't fix the "usb_submit_urb failed with result -19" errors that
you see (I'm guessing they're caused by 'wacom_query_tablet_data' in
wacom_sys.c not sending a mode-switch command that the tablet
recognizes... see what commands are sent to the tablet by Windows
immediately after the tablet is plugged in) but should decode the pen
packets once its fixed. I'd wouldn't worry too much about getting the
fingers or buttons working until the pen does, since at least then
you're sure the device has been initialized correctly.

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
|  
Report Content as Inappropriate

Re: CTH-300; Bamboo Pad, wireless; usbmon

Chris Bagwell



On Mon, Aug 11, 2014 at 12:01 PM, Jason Gerecke <[hidden email]> wrote:
On Thu, Aug 7, 2014 at 12:15 AM, Julian Picht
<[hidden email]> wrote:
> Hi all,
>
> I recently purchased a Bamboo Pad wireless (CTH-300, 056A:0319) and now I'm
> trying to get it to work with linux.
>
> I found a thread from back in January this year about a device with the
> 0x318 device id. The user got to the point where multiple pen/touch
> "endpoints" were detected but the device would not be initialized correctly
> and thus not sending the interrupt requests.
>
> I get a very similar result, when I just use his patch with the type changed
> to BAMBOO_PT and the device id changed to 0x319.
>
> Somebody suggested installing windows in a virtual machine and capturing the
> usb traffic. So this is what I did.
>
> Now I'm sitting here, trying to make sense of the usbmon logs. I put them on
> github: https://github.com/jpicht/bamboodumps
>
> What exactly am I looking for?
>
> I got a little further with this patch:
>
> diff -r /tmp/linux-source-3.13.0/drivers/input/tablet/wacom_wac.c
> linux-source-3.13.0/drivers/input/tablet/wacom_wac.c
> 2333a2334,2336
>> static const struct wacom_features wacom_features_0x319 =
>>  { "Wacom Bamboo Pad",        WACOM_PKGLEN_BBPEN,    15200,  9500, 1023,
>>    31, INTUOSHT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
> 2467a2471
>>  { USB_DEVICE_DETAILED(0x319, USB_CLASS_HID, 0, 0) },
>
> Now the initialization actually works and I get regular interrupts. But not
> the same as when using the windows driver, but still.
>
> dmesg shows:
> [12342.916427] usb 6-1: new full-speed USB device number 5 using uhci_hcd
> [12343.080484] usb 6-1: New USB device found, idVendor=056a, idProduct=0319
> [12343.080496] usb 6-1: New USB device strings: Mfr=1, Product=2,
> SerialNumber=0
> [12343.080503] usb 6-1: Product: Bamboo Pad, wireless
> [12343.080510] usb 6-1: Manufacturer: Wacom Co.,Ltd.
> [12343.082727] input: Wacom Bamboo Tab Pen as
> /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.0/input/input31
> [12343.084750] input: Wacom Bamboo Tab Pen as
> /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.1/input/input32
> [12343.085630] input: Wacom Bamboo Tab Pen as
> /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.2/input/input33
> [12343.086675] input: Wacom Bamboo Tab Pen as
> /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.3/input/input34
> [12543.740584] usb 6-1: USB disconnect, device number 5
> [12543.742890] wacom 6-1:1.1: wacom_sys_irq - usb_submit_urb failed with
> result -19
> [12543.744865] wacom 6-1:1.3: wacom_sys_irq - usb_submit_urb failed with
> result -19
> [12543.762870] wacom 6-1:1.2: wacom_sys_irq - usb_submit_urb failed with
> result -19
>
> So the driver doesn't understand what is said... What's next? I could start
> poke around wacom_sys_irq with printk. Is this the right direction?
>
> Thanks for reading and all the work you put into this project! Any help
> appreciated.
>
> Julian Picht
>

I haven't looked at the packets too closely, but 'wacom_tpc_pen' seems
to decode data similar to the pen packets you captured. Try using
something more like the following:

static const struct wacom_features wacom_features_0x319 =
 { "Wacom Bamboo Pad",        WACOM_PKGLEN_PENABLED,    15200,  9500, 1023,
   0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };

{ USB_DEVICE_DETAILED(0x319, USB_CLASS_HID, 0, 0) },

That won't fix the "usb_submit_urb failed with result -19" errors that
you see (I'm guessing they're caused by 'wacom_query_tablet_data' in
wacom_sys.c not sending a mode-switch command that the tablet
recognizes... see what commands are sent to the tablet by Windows
immediately after the tablet is plugged in) but should decode the pen
packets once its fixed. I'd wouldn't worry too much about getting the
fingers or buttons working until the pen does, since at least then
you're sure the device has been initialized correctly.


From init_dongle_only dump, it looks like new device mode format and two of them are needed?  If I'm reading it right, need to do these two calls:

 wacom_set_device_mode(intf, 9, 2, 1);
 wacom_set_device_mode(intf, 9, 2, 5);

ffff8801385c50c0 86730210 S Ci:6:004:0 s a1 01 0309 0001 0002 2 <
ffff8801385c50c0 86731747 C Ci:6:004:0 0 2 = 0900
ffff8801385c50c0 86736522 S Co:6:004:0 s 21 09 0309 0001 0002 2 = 0901
ffff8801385c50c0 86737753 C Co:6:004:0 0 2 >
ffff8800834876c0 86739639 S Ci:6:004:0 s a1 01 0309 0001 0002 2 <
ffff8800834876c0 86740742 C Ci:6:004:0 0 2 = 0901
ffff8800834876c0 86745952 S Co:6:004:0 s 21 09 0309 0001 0002 2 = 0905
ffff8800834876c0 86746750 C Co:6:004:0 0 2 >

From previous 'lsusb' emailed to list for this device, there is a report ID of 9 with size of 2 on pen interface and no report ID of 2 like other wacom_tpc_pen() devices use.  So 0901 makes sense.  There is a report ID of 2 on touch interface but most likely not the right report to write to.

Chris

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

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

Re: CTH-300; Bamboo Pad, wireless; usbmon

Jason Gerecke
Either command could be the mode-switch. The other likely commands the tablet to do something else, but I couldn't guess what. It should be fine to just send both commands if that's what Windows does though. Hopefully that's enough to get past the urb issue.

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, Aug 12, 2014 at 8:02 AM, Chris Bagwell <[hidden email]> wrote:



On Mon, Aug 11, 2014 at 12:01 PM, Jason Gerecke <[hidden email]> wrote:
On Thu, Aug 7, 2014 at 12:15 AM, Julian Picht
<[hidden email]> wrote:
> Hi all,
>
> I recently purchased a Bamboo Pad wireless (CTH-300, 056A:0319) and now I'm
> trying to get it to work with linux.
>
> I found a thread from back in January this year about a device with the
> 0x318 device id. The user got to the point where multiple pen/touch
> "endpoints" were detected but the device would not be initialized correctly
> and thus not sending the interrupt requests.
>
> I get a very similar result, when I just use his patch with the type changed
> to BAMBOO_PT and the device id changed to 0x319.
>
> Somebody suggested installing windows in a virtual machine and capturing the
> usb traffic. So this is what I did.
>
> Now I'm sitting here, trying to make sense of the usbmon logs. I put them on
> github: https://github.com/jpicht/bamboodumps
>
> What exactly am I looking for?
>
> I got a little further with this patch:
>
> diff -r /tmp/linux-source-3.13.0/drivers/input/tablet/wacom_wac.c
> linux-source-3.13.0/drivers/input/tablet/wacom_wac.c
> 2333a2334,2336
>> static const struct wacom_features wacom_features_0x319 =
>>  { "Wacom Bamboo Pad",        WACOM_PKGLEN_BBPEN,    15200,  9500, 1023,
>>    31, INTUOSHT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
> 2467a2471
>>  { USB_DEVICE_DETAILED(0x319, USB_CLASS_HID, 0, 0) },
>
> Now the initialization actually works and I get regular interrupts. But not
> the same as when using the windows driver, but still.
>
> dmesg shows:
> [12342.916427] usb 6-1: new full-speed USB device number 5 using uhci_hcd
> [12343.080484] usb 6-1: New USB device found, idVendor=056a, idProduct=0319
> [12343.080496] usb 6-1: New USB device strings: Mfr=1, Product=2,
> SerialNumber=0
> [12343.080503] usb 6-1: Product: Bamboo Pad, wireless
> [12343.080510] usb 6-1: Manufacturer: Wacom Co.,Ltd.
> [12343.082727] input: Wacom Bamboo Tab Pen as
> /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.0/input/input31
> [12343.084750] input: Wacom Bamboo Tab Pen as
> /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.1/input/input32
> [12343.085630] input: Wacom Bamboo Tab Pen as
> /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.2/input/input33
> [12343.086675] input: Wacom Bamboo Tab Pen as
> /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.3/input/input34
> [12543.740584] usb 6-1: USB disconnect, device number 5
> [12543.742890] wacom 6-1:1.1: wacom_sys_irq - usb_submit_urb failed with
> result -19
> [12543.744865] wacom 6-1:1.3: wacom_sys_irq - usb_submit_urb failed with
> result -19
> [12543.762870] wacom 6-1:1.2: wacom_sys_irq - usb_submit_urb failed with
> result -19
>
> So the driver doesn't understand what is said... What's next? I could start
> poke around wacom_sys_irq with printk. Is this the right direction?
>
> Thanks for reading and all the work you put into this project! Any help
> appreciated.
>
> Julian Picht
>

I haven't looked at the packets too closely, but 'wacom_tpc_pen' seems
to decode data similar to the pen packets you captured. Try using
something more like the following:

static const struct wacom_features wacom_features_0x319 =
 { "Wacom Bamboo Pad",        WACOM_PKGLEN_PENABLED,    15200,  9500, 1023,
   0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };

{ USB_DEVICE_DETAILED(0x319, USB_CLASS_HID, 0, 0) },

That won't fix the "usb_submit_urb failed with result -19" errors that
you see (I'm guessing they're caused by 'wacom_query_tablet_data' in
wacom_sys.c not sending a mode-switch command that the tablet
recognizes... see what commands are sent to the tablet by Windows
immediately after the tablet is plugged in) but should decode the pen
packets once its fixed. I'd wouldn't worry too much about getting the
fingers or buttons working until the pen does, since at least then
you're sure the device has been initialized correctly.


From init_dongle_only dump, it looks like new device mode format and two of them are needed?  If I'm reading it right, need to do these two calls:

 wacom_set_device_mode(intf, 9, 2, 1);
 wacom_set_device_mode(intf, 9, 2, 5);

ffff8801385c50c0 86730210 S Ci:6:004:0 s a1 01 0309 0001 0002 2 <
ffff8801385c50c0 86731747 C Ci:6:004:0 0 2 = 0900
ffff8801385c50c0 86736522 S Co:6:004:0 s 21 09 0309 0001 0002 2 = 0901
ffff8801385c50c0 86737753 C Co:6:004:0 0 2 >
ffff8800834876c0 86739639 S Ci:6:004:0 s a1 01 0309 0001 0002 2 <
ffff8800834876c0 86740742 C Ci:6:004:0 0 2 = 0901
ffff8800834876c0 86745952 S Co:6:004:0 s 21 09 0309 0001 0002 2 = 0905
ffff8800834876c0 86746750 C Co:6:004:0 0 2 >

From previous 'lsusb' emailed to list for this device, there is a report ID of 9 with size of 2 on pen interface and no report ID of 2 like other wacom_tpc_pen() devices use.  So 0901 makes sense.  There is a report ID of 2 on touch interface but most likely not the right report to write to.

Chris


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

_______________________________________________
Linuxwacom-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss
Loading...