2013-06-27 13:16:52

by Jiri Kosina

[permalink] [raw]
Subject: Logitech M705: Thumb button (was Re: [PATCH v4] HID: Add full support for Logitech Unifying receivers)


[ Frantisek Fuka added to CC ]

On Wed, 14 Sep 2011, Benjamin Tissoires wrote:

> >> Nice. Does this mean I will be able to use the thumb-button of my M705
> >> mouse in the near future?
> >>
> >> (Someone asked the same question 1.5 years ago, but nothing happened
> >> till then: http://thread.gmane.org/gmane.linux.kernel.input/11791 )
> >
> > This is quite weird. I was going to say that it will work, but with
> > the M705 I've got at home,this thumb button doesn't work at all
> > (anything is emitted from the usb, even with this driver).
> > But I'm pretty sure I made it work with the one I got at work.
> >
> > I'll give a try on Monday unless people at Logitech gave us the solution.

> I got some information for you. Apparently, it won't be possible to
> enable this thumb button right now.
> To enable it, the Windows driver put the mouse in a kind of debug mode
> that need to be handled properly, which is not the case as of today.
>
> I was able to make it work at home because there were different series
> of M705, the latest sending the thumb button by default.

Let me resurrect this 2 years old thread, as I have received multiple
reports since then, stating that some revisions of M705 don't have working
thumb button.

Question mostly to the Logitech guys: Nestor, Olivier, could you please
provide us with the sequence that needs to be sent to (certain revisisons
of) M705 to let enter the debug mode, making the thumb button actually
emit a USB message?

Thanks,

--
Jiri Kosina
SUSE Labs


2013-07-03 10:47:32

by Nestor Lopez Casado

[permalink] [raw]
Subject: Re: Logitech M705: Thumb button (was Re: [PATCH v4] HID: Add full support for Logitech Unifying receivers)

Hi all,

Sorry it took me some time to answer.

I extended the Logitech HIDPP10 specification here:
https://drive.google.com/folderview?id=0BxbRzx7vEV7eWmgwazJ3NUFfQ28&usp=sharing

The document "Logitech_hidpp10_specification_draft_Unifying_devices_receivers.doc"
now contains most of the relevant hidpp10 registers and notifications
needed to interact with older Logitech devices that support hidpp10 as
well as the Unifying receiver.

In particular I added the specifications for the registers that enable
retrieving the FW version information for devices/receivers. This will
become relevant below.

Cheers,
Nestor


On Thu, Jun 27, 2013 at 3:16 PM, Jiri Kosina <[email protected]> wrote:
>
>
> [ Frantisek Fuka added to CC ]
>
> On Wed, 14 Sep 2011, Benjamin Tissoires wrote:
>
> > >> Nice. Does this mean I will be able to use the thumb-button of my M705
> > >> mouse in the near future?
> > >>
> > >> (Someone asked the same question 1.5 years ago, but nothing happened
> > >> till then: http://thread.gmane.org/gmane.linux.kernel.input/11791 )
> > >
> > > This is quite weird. I was going to say that it will work, but with
> > > the M705 I've got at home,this thumb button doesn't work at all
> > > (anything is emitted from the usb, even with this driver).
> > > But I'm pretty sure I made it work with the one I got at work.
> > >
> > > I'll give a try on Monday unless people at Logitech gave us the solution.
>
> > I got some information for you. Apparently, it won't be possible to
> > enable this thumb button right now.
> > To enable it, the Windows driver put the mouse in a kind of debug mode
> > that need to be handled properly, which is not the case as of today.
> >
> > I was able to make it work at home because there were different series
> > of M705, the latest sending the thumb button by default.
>
> Let me resurrect this 2 years old thread, as I have received multiple
> reports since then, stating that some revisions of M705 don't have working
> thumb button.
>
> Question mostly to the Logitech guys: Nestor, Olivier, could you please
> provide us with the sequence that needs to be sent to (certain revisisons
> of) M705 to let enter the debug mode, making the thumb button actually
> emit a USB message?


There are two versions of FW in the field:

1) Version 17.01.Build 0017.
This version reports the thumb button by default as HID button 6.

2) Version 17.00.Build 0015
This version does not report the thumb button by default.

It is possible to enable the M705 with FW 17.00.Build 0015 to send the
thumb button as HID button 6 via HIDPP10 command. But this will have a
(undesirable ?) side effect.
Once the button 6 is enabled, the buttons aside to the wheel (tilt
buttons) will no longer be reported as AC pan HID usage, they will be
reported as buttons 7 & 8. This might disrupt some users that rely on
the mouse AC pan feature.

To enable HID button 6 reporting from thumb button we need to clear
the bit 1 (Special button function) in register 0x01 on the M705
READ register: 10 IDX 81 01 r0 r1 r2
Clear Bit1: r0 &= 0xFD;
Write back register: 10 IDX 80 01 r0 r1 r2

IDX is the device index on the Unifying receiver.

Note that if the command is sent to all M705 devices, users that have
the 17.01.Build 0017 will lose the Ac pan and will gain nothing.


>
> Thanks,
>
> --
> Jiri Kosina
> SUSE Labs
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2013-07-09 13:40:35

by Benjamin Tissoires

[permalink] [raw]
Subject: Re: Logitech M705: Thumb button (was Re: [PATCH v4] HID: Add full support for Logitech Unifying receivers)

Hi Nestor,

On Wed, Jul 3, 2013 at 12:46 PM, Nestor Lopez Casado
<[email protected]> wrote:
> Hi all,
>
> Sorry it took me some time to answer.
>
> I extended the Logitech HIDPP10 specification here:
> https://drive.google.com/folderview?id=0BxbRzx7vEV7eWmgwazJ3NUFfQ28&usp=sharing

Thanks :)

> [...]
>> Let me resurrect this 2 years old thread, as I have received multiple
>> reports since then, stating that some revisions of M705 don't have working
>> thumb button.
>>
>> Question mostly to the Logitech guys: Nestor, Olivier, could you please
>> provide us with the sequence that needs to be sent to (certain revisisons
>> of) M705 to let enter the debug mode, making the thumb button actually
>> emit a USB message?
>
>
> There are two versions of FW in the field:
>
> 1) Version 17.01.Build 0017.
> This version reports the thumb button by default as HID button 6.
>
> 2) Version 17.00.Build 0015
> This version does not report the thumb button by default.
>
> It is possible to enable the M705 with FW 17.00.Build 0015 to send the
> thumb button as HID button 6 via HIDPP10 command. But this will have a
> (undesirable ?) side effect.
> Once the button 6 is enabled, the buttons aside to the wheel (tilt
> buttons) will no longer be reported as AC pan HID usage, they will be
> reported as buttons 7 & 8. This might disrupt some users that rely on
> the mouse AC pan feature.

This side effect can be solved by handling the magic sequence in the
kernel, and do the mapping in the kernel also.
This would need to add a special driver for the M705 though. The good
point is that both the firmware behave the same way when they are
switched to the special mode, meaning that we don't need to check the
build number and do the switch as soon as we see the M705 PID.

>
> To enable HID button 6 reporting from thumb button we need to clear
> the bit 1 (Special button function) in register 0x01 on the M705
> READ register: 10 IDX 81 01 r0 r1 r2
> Clear Bit1: r0 &= 0xFD;
> Write back register: 10 IDX 80 01 r0 r1 r2
>
> IDX is the device index on the Unifying receiver.
>
> Note that if the command is sent to all M705 devices, users that have
> the 17.01.Build 0017 will lose the Ac pan and will gain nothing.
>

For those who wants to try, I have set up a project [1] to implement
part of the spec Nestor released.
I implemented various features: list devices paired to a receiver,
pair/unpair a device, and toggle the button 6 on M705 mouse with the
faulty firmware.
When switching mode for the M705, as Nestor said, we lose the AC
panning ability until the correct remapping is done in the kernel.

Cheers,
Benjamin


[1] https://github.com/bentiss/uLogitech

2013-07-09 20:41:33

by Jiri Kosina

[permalink] [raw]
Subject: Re: Logitech M705: Thumb button (was Re: [PATCH v4] HID: Add full support for Logitech Unifying receivers)

On Tue, 9 Jul 2013, Benjamin Tissoires wrote:

> For those who wants to try, I have set up a project [1] to implement
> part of the spec Nestor released. I implemented various features: list
> devices paired to a receiver, pair/unpair a device, and toggle the
> button 6 on M705 mouse with the faulty firmware. When switching mode for
> the M705, as Nestor said, we lose the AC panning ability until the
> correct remapping is done in the kernel.
>
> Cheers,
> Benjamin
>
> [1] https://github.com/bentiss/uLogitech

Thanks for your work on this, Benjamin.

I have a followup question -- why not do this in the kernel completely
though? I have actually been asked by Linus directly (so we'd rather do
that :) ) to include pairing trigger as a sysfs toggle instead of having
to use userspace utilitites, and it actually makes sense to me.

Are you aware of any particular reason to not have all that's provided by
uLogitech in the kernel?

Thanks,

--
Jiri Kosina
SUSE Labs

2013-07-11 10:30:02

by Benjamin Tissoires

[permalink] [raw]
Subject: Re: Logitech M705: Thumb button (was Re: [PATCH v4] HID: Add full support for Logitech Unifying receivers)

On Tue, Jul 9, 2013 at 10:41 PM, Jiri Kosina <[email protected]> wrote:
> On Tue, 9 Jul 2013, Benjamin Tissoires wrote:
>
>> For those who wants to try, I have set up a project [1] to implement
>> part of the spec Nestor released. I implemented various features: list
>> devices paired to a receiver, pair/unpair a device, and toggle the
>> button 6 on M705 mouse with the faulty firmware. When switching mode for
>> the M705, as Nestor said, we lose the AC panning ability until the
>> correct remapping is done in the kernel.
>>
>> Cheers,
>> Benjamin
>>
>> [1] https://github.com/bentiss/uLogitech
>
> Thanks for your work on this, Benjamin.
>
> I have a followup question -- why not do this in the kernel completely
> though? I have actually been asked by Linus directly (so we'd rather do
> that :) ) to include pairing trigger as a sysfs toggle instead of having
> to use userspace utilitites, and it actually makes sense to me.

yep, the sysfs toggle for the pairing makes sense. In the same way, we
should retrieve the actual name of the device instead of building a
complex string "Logitech Unifying Device. Wireless PID:XXXX"...
And for the M705, it really should be implemented in the kernel (I
guess it will not be a lot of effort).

>
> Are you aware of any particular reason to not have all that's provided by
> uLogitech in the kernel?

I'm afraid the very first reason is that we (Nestor or myself) don't
have much allowed time to implement it properly in the kernel... :(
Nestor is working on other projects, and for me, I did not had any
customer requests for it in RHEL nor Fedora.

Cheers,
Benjamin