ronangaillard / logitech-mouse

Use an arduino as a logitech wireless 🐭

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Paired but mouse not moving

bilogic opened this issue · comments

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

Can you post your code ?

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?

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

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.

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).

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.

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);
  }

?

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.

Weird as the changes you made only affect pairing.

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.

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

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.

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.