-
Notifications
You must be signed in to change notification settings - Fork 9
Doesn't work with (my) CadMouse Pro Wireless #7
Comments
Permissions, maybe? By default only root should be able to send raw HID
messages, afaik.
|
OK, progress. Running as root in wireless mode, with
...seems to work inasmuch as no error message is displayed, but doesn't change the mouse behavior. That leads to some questions:
|
On Thursday, January 9, 2020 8:23:04 PM CET Daniel A. Thompson wrote:
- Are the HID commands different for the CadMouse Pro Wireless and/or its
receiver than they were for the regular CadMouse?
Very likely.
- Is there a way to determine this empirically?
Run the official software and capture the HID packets using e.g. Wireshark
(yes, it can capture USB device traffic). Use a VM if necessary.
|
OK. Here's what I found when disabling smart scroll in the official Windows software: Data fragment from this HID message is And here's what I found when enabling smart scroll in the windows software: Data fragment from this HID message is Do you know how to interpret these data fragments? They're 32 bytes long, but the existing implementation you've provided for the CadMouse only sends 8 bytes of payload, viz. https://github.com/lachs0r/cadmousectl/blob/master/cadmousectl.c#L25-L26. I don't have a regular CadMouse to compare with, otherwise this would be a little easier. |
Update: I just sent the entire 32 byte fragment instead of the 8 byte fragment, and that worked! I can now turn "smart scroll" on and off at will in Linux. I'll post code in a little bit. |
@danielthompson I was able to follow your steps and replicate your results up to the sudo command not failing and also not changing mouse behaviour. I have the CadMouse Wireless mouse identified as:
Would your code work with my mouse? What all do I need to change? |
Just wanted to share my two cents as a n00b following @danielthompson's example. I'm running 18.04.4, and the only thing I care about is being able to turn off Stupid Scroll, so I'm not going to try to implement this properly.
|
I totally forgot about this. @JulianLelandBell, you are correct, just sending the whole payload should work to disable smart scroll. I do have to run it as root, and I do have to re-run it whenever I manually turn the mouse on or off. After posting the results I got above, I remember now that I also did some further research to figure out what, if anything, the other bytes in the 32 byte payload are for. You'll note that if you run the Windows software, there are some more settings in addition to smart scroll on/off - polling rate, scroll speed, lift-off detection, etc. I was able to determine that some of those settings are sent to the mouse in that 32-byte payload when the user changes them in the Windows software (notably, polling rate). I can't find those results at the moment, unfortunately. So, the long-winded point I'm making is that that payload above, in addition to turning off smart scroll, may also set some of those other settings. I really like this mouse; it's rock solid & precision-engineered... yet the customer support and documentation is basically "it is what it is, if you don't like it, we don't care". I grew up there so I say this with all the love in the world - how typically German 😀 🇩🇪 |
Hello,
Thanks for putting together this project. This question is not really an issue about
cadmousectl
, since the failure it's experiencing is in the HID API, but I was hoping you might have some insight into what's going on.Goal
I want to turn off the annoying "smart scroll" feature that simulates scroll wheel inertia.
System
I'm running Ubuntu 18.04.3 LTS with gnome-shell on xorg. I have a CadMouse Pro Wireless (apparently just released by 3Dconnexion). This mouse has two USB modes: it can be used wirelessly with a USB receiver, or it can be directly plugged in via a micro-USB cable (it can also be used via Bluetooth, but I haven't tried that, and I assume that wouldn't work with the HID API anyway).
The issue
cadmousectl
fails to open the mouse via the HID API in either wired or wireless mode. We'll take them one at a time...Wired USB mode
When plugged in to a USB port via a micro-USB cable, the mouse is correctly recognized by the kernel as shown by
dmesg
:Mouse input is reflected in X11 for about 2-3 seconds, then ceases. In other words, I can move the mouse cursor around and click buttons just fine, for 2-3 seconds, but then it just stops working. No further messages occur in dmesg. Are there any other places where I could look for why this stops working?
In any case, note the
idProduct=c654
line in dmesg. I updated my local copy ofcadmousectl.c
to use that instead here: https://github.com/lachs0r/cadmousectl/blob/master/cadmousectl.c#L131However, running
cadmousectl
with the update product ID still shows the dreadedCould not find/open a CadMouse
.I then modified
cadmousectl
to usehid_enumerate()
to just tell me what HID sees, and got this:So.. the kernel sees it, HID sees it, but it doesn't respond in X and I can't open it HID for further examination. Any ideas?
Wireless mode with the provided USB receiver
When using the provided wireless USB receiver, I see the following in
dmesg
:Note here that the kernel sees the receiver, not the mouse.
In wireless mode, the mouse works in X without issue (i.e. it doesn't stop responding after 2-3 sec the way it did in wired mode).
However,
hid_open()
still fails (with this productID 0xc652), and my modified, enumerated output is now:Annoyingly,
hid_open()
returnsNULL
on failure, so I can't usehid_error()
to get any further error information, in either the wired or wireless case.Please let me know if you have any insight or ideas for further progress. Thanks.
The text was updated successfully, but these errors were encountered: