* Re: [PATCH] Wacom Bluetooth mode-2 activation
2009-03-17 23:54 [PATCH] Wacom Bluetooth mode-2 activation Bastien Nocera
@ 2009-03-14 6:09 ` Marcel Holtmann
2009-03-23 14:09 ` Bastien Nocera
0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2009-03-14 6:09 UTC (permalink / raw)
To: Bastien Nocera; +Cc: BlueZ development
Hi Bastien,
> Patch is necessary to make the Wacom Bluetooth driver I posted to
> linux-input work as expected. I've tested this successfully with my
> tablet[1].
this maybe sound like a nit-pick, but please add an extra empty line
between the if-statement and the ioctl.
+ write(sk, buf, sizeof(buf));
+ }
err = ioctl_connadd(req);
The original code had one and so should have the new one with this extra
quirk.
Also can we please check at least the return value of write().
+ write(sk, buf, sizeof(buf));
Check the return value and at minimum have an error message printed.
Regards
Marcel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Wacom Bluetooth mode-2 activation
@ 2009-03-17 23:54 Bastien Nocera
2009-03-14 6:09 ` Marcel Holtmann
0 siblings, 1 reply; 3+ messages in thread
From: Bastien Nocera @ 2009-03-17 23:54 UTC (permalink / raw)
To: BlueZ development
[-- Attachment #1: Type: text/plain, Size: 395 bytes --]
Heya,
Patch is necessary to make the Wacom Bluetooth driver I posted to
linux-input work as expected. I've tested this successfully with my
tablet[1].
Cheers
[1]: For Marcel, if you want a funky new device, look for CTE-630BT:
http://www.wacom-europe.com/index2.asp?pid=163&lang=en
http://www.wacom-shop.net/cgi-bin/wacom.storefront/49c0379700eeee24273f4ddcef2606ba/Product/View/CTE&2D630BT3
[-- Attachment #2: 0001-Add-Mode-2-activation-for-the-Wacom-BT-tablet.patch --]
[-- Type: text/x-patch, Size: 1180 bytes --]
>From 7446ea0afdbdb602261c3d43efc4f29bac47cc4b Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Tue, 17 Mar 2009 23:44:44 +0000
Subject: [PATCH] Add Mode-2 activation for the Wacom BT tablet
Otherwise the device shows up as a simple mouse, and extended
events aren't being pushed to the kernel.
---
input/device.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/input/device.c b/input/device.c
index 0090bd4..8d65148 100644
--- a/input/device.c
+++ b/input/device.c
@@ -658,6 +658,19 @@ static int hidp_add_connection(const struct input_device *idev,
err = write(sk, buf, sizeof(buf));
}
+ if (req->vendor == 0x056a && req->product == 0x81) {
+ unsigned char buf[3];
+ int sk = g_io_channel_unix_get_fd(iconn->ctrl_io);
+
+ buf[0] = 0x53; /* HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE */
+ buf[1] = 0x03; buf[2] = 0x00;
+ write(sk, buf, sizeof(buf));
+
+ buf[0] = 0x71; /* HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE */
+ /* 0x06 - high reporting speed, 0x05 - low speed */
+ buf[1] = 0x06; buf[2] = 0x00;
+ write(sk, buf, sizeof(buf));
+ }
err = ioctl_connadd(req);
cleanup:
--
1.6.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Wacom Bluetooth mode-2 activation
2009-03-14 6:09 ` Marcel Holtmann
@ 2009-03-23 14:09 ` Bastien Nocera
0 siblings, 0 replies; 3+ messages in thread
From: Bastien Nocera @ 2009-03-23 14:09 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: BlueZ development
On Sat, 2009-03-14 at 07:09 +0100, Marcel Holtmann wrote:
> Hi Bastien,
>
> > Patch is necessary to make the Wacom Bluetooth driver I posted to
> > linux-input work as expected. I've tested this successfully with my
> > tablet[1].
>
> this maybe sound like a nit-pick, but please add an extra empty line
> between the if-statement and the ioctl.
>
> + write(sk, buf, sizeof(buf));
> + }
> err = ioctl_connadd(req);
>
> The original code had one and so should have the new one with this extra
> quirk.
OK.
> Also can we please check at least the return value of write().
>
> + write(sk, buf, sizeof(buf));
>
> Check the return value and at minimum have an error message printed.
The writes actually fail, from what I've seen, but it works... I'll try
to get some details about what fails.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-23 14:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-17 23:54 [PATCH] Wacom Bluetooth mode-2 activation Bastien Nocera
2009-03-14 6:09 ` Marcel Holtmann
2009-03-23 14:09 ` Bastien Nocera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox