Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paired but mouse not moving #5

Closed
bilogic opened this issue Apr 11, 2020 · 13 comments
Closed

Paired but mouse not moving #5

bilogic opened this issue Apr 11, 2020 · 13 comments

Comments

@bilogic
Copy link

bilogic commented Apr 11, 2020

Hi,

I managed to pair with my dongle, however, it paired as a keyboard.
The mouse also does not move at all. Actually, my aim is to pair as a keyboard and send some keys, can give me some pointers on how to go about it? Thank you!

image

@ronangaillard
Copy link
Owner

Can you post your code ?

@bilogic
Copy link
Author

bilogic commented Apr 16, 2020

I found the issue, pairing_packet_4 has to be 10 bytes instead of 22 bytes inside pairingStep(), I also added setChecksum() before sending each packet using radio.write().

Are you familiar with sending encrypted keystrokes?

@ronangaillard
Copy link
Owner

Checksum is already set in pairing packet so no need to add setChecksum to every radio.write().
And pairing packet number 4 is 10 bytes on genuine Logitech mouses. Did you change anything else in the code ?

For details on packets you can have a look at our presentation here : https://docs.google.com/presentation/d/11bzzGMaTR-Z7rp0n-jKFRVuT4hbaj_FmaKMywX97s8k/edit#slide=id.p

@bilogic
Copy link
Author

bilogic commented Apr 16, 2020

Hi, my goal is to create a compatible keyboard and have made more changes since. I think the dongle firmware has been updated since the presentation, which probably explains why 22 bytes no longer worked.

Yes, I have gone through your presentation before, however it does not not cover keyboard packets.

Thank you.

@ronangaillard
Copy link
Owner

Keyboards packet are completely different from mouse packets (at least because they are encrypted). This is another subject and we did not work on it (and we don't expect to work on it yet).

@ronangaillard
Copy link
Owner

I'm pretty sure the protocol has not changed as it's not possible to update firmwares on some Logitech devices, so there should be no issue while pairing using the original code provided in this repo.

@ronangaillard
Copy link
Owner

ronangaillard commented Apr 16, 2020

Did you try this

int x, y = 0;

  for(x = 0; x < 360; x+=5) {
    myMouse.move( (uint16_t)(mouseSpeed * cos( ((float)x) * degreesToRadians ) ),  
      (uint16_t)(mouseSpeed * sin( ((float)x) * degreesToRadians ) ));
      
    delay(10);
  }

?

@bilogic
Copy link
Author

bilogic commented Apr 16, 2020

I found the issue, pairing_packet_4 has to be 10 bytes instead of 22 bytes inside pairingStep(), I also added setChecksum() before sending each packet using radio.write().

These are the only changes I made to get logitech-mouse to pair and get the OS mouse to move. Without these changes, I was able to pair only.

@ronangaillard
Copy link
Owner

Weird as the changes you made only affect pairing.

@bilogic
Copy link
Author

bilogic commented Apr 16, 2020

Packet 4 is actually not part of pairing, 0x4f is to set timeout.
Anyway I could not tell what firmware your dongle was. Mine is C-U0007, 012.001.00032.

@bilogic
Copy link
Author

bilogic commented Apr 16, 2020

If you wish, take a look at RoganDawes/LOGITacker#55

@ronangaillard
Copy link
Owner

ronangaillard commented Apr 16, 2020

I don't have the keyboard anymore but I would expect it to still be able to pair with a Logitech dongle with the same packets it used to send. If not it would mean that the keyboard would not work anymore. That would seem strange.

@bilogic
Copy link
Author

bilogic commented Apr 16, 2020

Try and go through my messages again, I have explained it all. Your code is 3 years old. Logitech has released updates to the dongle's firmware.

@bilogic bilogic closed this as completed Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants