-
Notifications
You must be signed in to change notification settings - Fork 1
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
I have a question. #2
Comments
A device gets a unique RF address and AES encryption key when it's paired to a receiver. To fix this, you would have to save the RF address and AES encryption key to non-volatile memory, such as flash or EEPROM, after pairing and load those values back into memory when the device is rebooted. I have added comments to the example code to indicate what needs to be done. I would recommend looking at the Arduino EEPROM library to learn about saving and loading data. |
Thank you for your answer. if(err) { err = unifying_pair(&state, printf("Address : %d %d %d %d %d\n",address[0],address[1],address[2],address[3],address[4]); for(int i = 0; i < 5; i++) { I modified the code like this at the bottom. uint32_t aes_counter = random(); I modified the code at the top like this. But after the initial pairing was successful, it doesn't work when I remove and reconnect the device. |
Hi @decrazyo. Is there any working example for that? |
I've done some limited testing and gotten mixed results. I updated the example sketch to save and load the RF address and AES key from the EEPROM. I'm assuming that unplugging/plugging in the Arduino takes long enough that the receiver notices the lack of keep-alive packets and considers the device to actually be disconnected, while resetting the Arduino happens fast enough that the receiver don't notice the disconnect. If that's the case then my best guess is that I haven't accurately replicated the way that Unifying devices reconnect to a receiver. |
Thanks for adding pairing persistence. I'll try it out soon. Two strange things I noticed so far with the older version is : 1. After pairing , moving the mouse works but sending encrypted keystrokes does not work and 2. Using the connection utility to put the dongle în pairing mode works, pairing seems to happen as mouse movements start working immeditelly, but the connection utility still shows the dongle as unpaired. This second fact makes me wonder if pairing was really completed by both parties and key properly derived. I'm guessing the lack of proper key would explain non-working keystrokes. Maybe this is also somwhow related to why even after adding persistence of pairing data you are still not able to re-pair. Does the connection utility show your dongle as paired ? Thanks! Happy holidays! |
First of all, I am not good at English. Please understand.
I start pairing on Unifying software and when I connect the device, it works well until the device presses the key.
But when I disconnect and reconnect the device, it doesn't work.
Every time I reconnect the device, I have to make a new pairing to make the device work.
I want the device to work without pairing when I reconnect the device if it's already paired.
What should I do?
The text was updated successfully, but these errors were encountered: