-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add data encryption support according to the bthome protocol #3
Conversation
Awesome, thanks for the contribution. I'll have to pull my sensor package out of its case to test this, so it may take a few more days before I can merge it. Just glancing through, it makes sense. I do see what looks like some formatting diffs. Could you run the clang formatter (there's |
@junchao98 if you have time could you port your code to the general ESP32 example to finally have one with encryption? |
No problem, I will submit the code in the near future |
Great! Thanks. |
Testing this change out, I get an abort here:
Presumably, this is due to the advertisement being 35 bytes, more than the 31 allowed. It should probably check that and warn at least before aborting. Edit: In fact, it would probably be good to support encryption, but no name, as the encryption adds so many extra bytes |
Once I changed up the naming to be short enough (exactly 31 bytes), Home Assistant did pick it up as encryption and the bind key worked. Just a small tweak to try and make it a little more friendly of an error I think, and I can merge it in |
Yes, the esp-idf api has a requirement for maximum data length. |
I know this looks closed, that's what I get for trying to manage too many remotes. I tweaked the changes a little so it won't abort if too long, and merged in the commits. |
I have ported your code to the BTHomeV2-ESP32-example project, thanks for your hard working. |
hello everyone,
This submission I tested normal in the following cases