2009-05-28 20:43:33

by Przemo Firszt

[permalink] [raw]
Subject: Wacom Graphire Bluetooth HID driver - help needed

Hi,
I'm working on Wacom Graphire bluetooth tablet driver. It's a HID driver
and it's almost ready to be released, but I still have some problems.
The main one is that the tablet works in mouse mode and I need to send a
control message to switch to tablet mode. Currently I'm using an ugly
hack in /net/bluetooth/hidp/core.c - hidp_add_connection:


rep_data [0] = 0x03; rep_data [1] = 0x00;
hidp_send_ctrl_message(session,
HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE,
rep_data, 2);
/* 0x06 - high reporting speed, 0x05 - low speed */
rep_data [0] = 0x05; rep_data [1] = 0x00;
hidp_send_ctrl_message(session,
HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE,
rep_data, 2);

That hack is based on wacom graphire bluetooth driver created by Andrew
Zabolotny, that driver has never neen mainstreamed, beacause of some
philosophy issues (as far as I understand it)

Any ideas how I can send the control message from HID driver level? Is
it possible?
--
Przemo Firszt







2009-05-29 09:13:48

by Przemo Firszt

[permalink] [raw]
Subject: Re: Wacom Graphire Bluetooth HID driver - help needed

Dnia 2009-05-28, czw o godzinie 23:29 +0100, Bastien Nocera pisze:
> On Thu, 2009-05-28 at 21:43 +0100, Przemysław Firszt wrote:
> > Hi,
> > I'm working on Wacom Graphire bluetooth tablet driver.
>
> I already posted patches to linux-input and linux-bluetooth with support
> for that, and it's merged into Fedora 11.
>
> Check that code, and let me know whether you have any comments on the
> code.

I'm trying completly different way (redefining the device report and
mapping), but the problems (mode 2 and turning tablet twice to get it
working) are similar. Did you get any reply that this patch is going to
be included in mainstream?

Do you know what was the reason of that error -14 ? (see here for the
details: http://marc.info/?l=linux-bluetooth&m=123724912027050&w=2 )
I still have that problem...

I've to check your bluetoothd patch - do you know if it's going to be
included or the developers are waiting for required changes in kernel?
I hope that it could sort out the ugly hack in hidp.

--
Przemo







2009-05-28 22:29:09

by Bastien Nocera

[permalink] [raw]
Subject: Re: Wacom Graphire Bluetooth HID driver - help needed

On Thu, 2009-05-28 at 21:43 +0100, Przemysław Firszt wrote:
> Hi,
> I'm working on Wacom Graphire bluetooth tablet driver.

I already posted patches to linux-input and linux-bluetooth with support
for that, and it's merged into Fedora 11.

Check that code, and let me know whether you have any comments on the
code.

Cheers



2009-06-24 20:55:03

by Bastien Nocera

[permalink] [raw]
Subject: Re: Wacom Graphire Bluetooth HID driver - big lag

On Wed, 2009-06-24 at 21:49 +0100, Przemysław Firszt wrote:
> Hi Bastien,
> I'm testing wacom bluetooth driver and there are 2 problems. One of them
> is that I have to switch on tablet twice to get it working. Next problem
> is that the lag is huge and I had to switch to "low speed" in bluez
> patch (see here for the details:
> http://cvs.fedoraproject.org/viewvc/rpms/bluez/devel/bluez-activate-wacom-mode2.patch?revision=1.1&view=markup)
>
> I'm using:
> -patched bluez-4.42
> -the latest kernel 2.6.30-08503-g4e8a237-dirty
> -PLD Th 3.0 distro on NC4200 HP laptop
>
> I'm downloading Fedora LiveCD to check if these problems are
> distro-related, but I had similar issues before, so I'm not expecting
> any change.
>
> Any ides what can I test/change to get rid of those problems?

No idea, those are the same problems I was encountering when testing it,
though using the kernel to do the mode2 switching might fix the first
problem.

No idea about the lag though...


2009-06-24 20:49:43

by Przemo Firszt

[permalink] [raw]
Subject: Wacom Graphire Bluetooth HID driver - big lag

Hi Bastien,
I'm testing wacom bluetooth driver and there are 2 problems. One of them
is that I have to switch on tablet twice to get it working. Next problem
is that the lag is huge and I had to switch to "low speed" in bluez
patch (see here for the details:
http://cvs.fedoraproject.org/viewvc/rpms/bluez/devel/bluez-activate-wacom-mode2.patch?revision=1.1&view=markup)

I'm using:
-patched bluez-4.42
-the latest kernel 2.6.30-08503-g4e8a237-dirty
-PLD Th 3.0 distro on NC4200 HP laptop

I'm downloading Fedora LiveCD to check if these problems are
distro-related, but I had similar issues before, so I'm not expecting
any change.

Any ides what can I test/change to get rid of those problems?
Regards,
Przemo Firszt


2009-06-07 15:53:22

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Wacom Graphire Bluetooth HID driver - help needed

Hi Bastien,

> > > > I'm working on Wacom Graphire bluetooth tablet driver.
> > >
> > > I already posted patches to linux-input and linux-bluetooth with support
> > > for that, and it's merged into Fedora 11.
> > >
> > > Check that code, and let me know whether you have any comments on the
> > > code.
> >
> > I'm trying completly different way (redefining the device report and
> > mapping), but the problems (mode 2 and turning tablet twice to get it
> > working) are similar.
>
> The second problem seems to be fixed by recent kernels for me.
>
> > Did you get any reply that this patch is going to
> > be included in mainstream?
>
> I believe it was supposed to be merged by now. Jiri?
>
> > Do you know what was the reason of that error -14 ? (see here for the
> > details: http://marc.info/?l=linux-bluetooth&m=123724912027050&w=2 )
> > I still have that problem...
>
> Don't know. I guess having the device mode 2 setup in the kernel would
> avoid this sort of problems.
>
> > I've to check your bluetoothd patch - do you know if it's going to be
> > included or the developers are waiting for required changes in kernel?
> > I hope that it could sort out the ugly hack in hidp.
>
> The bluetoothd patch works around the missing hid write support in the
> Bluetooth hid stack. It could be moved to the kernel if the HID
> Bluetooth support grew that ability.

the HID raw support is global now and should work. However I have never
tested it. I am happy to push a patch for it if you have one.

Regards

Marcel



2009-06-07 12:25:49

by Bastien Nocera

[permalink] [raw]
Subject: Re: Wacom Graphire Bluetooth HID driver - help needed

On Fri, 2009-05-29 at 10:13 +0100, Przemysław Firszt wrote:
> Dnia 2009-05-28, czw o godzinie 23:29 +0100, Bastien Nocera pisze:
> > On Thu, 2009-05-28 at 21:43 +0100, Przemysław Firszt wrote:
> > > Hi,
> > > I'm working on Wacom Graphire bluetooth tablet driver.
> >
> > I already posted patches to linux-input and linux-bluetooth with support
> > for that, and it's merged into Fedora 11.
> >
> > Check that code, and let me know whether you have any comments on the
> > code.
>
> I'm trying completly different way (redefining the device report and
> mapping), but the problems (mode 2 and turning tablet twice to get it
> working) are similar.

The second problem seems to be fixed by recent kernels for me.

> Did you get any reply that this patch is going to
> be included in mainstream?

I believe it was supposed to be merged by now. Jiri?

> Do you know what was the reason of that error -14 ? (see here for the
> details: http://marc.info/?l=linux-bluetooth&m=123724912027050&w=2 )
> I still have that problem...

Don't know. I guess having the device mode 2 setup in the kernel would
avoid this sort of problems.

> I've to check your bluetoothd patch - do you know if it's going to be
> included or the developers are waiting for required changes in kernel?
> I hope that it could sort out the ugly hack in hidp.

The bluetoothd patch works around the missing hid write support in the
Bluetooth hid stack. It could be moved to the kernel if the HID
Bluetooth support grew that ability.