-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
[Bug]: Newer versions of Bluetti firmware use BLE encryption #120
Comments
also experiencing the same issue, though good to know others were able to sus it out |
I have made tons of progress reverse engineering the protocol. It appears that once you get past the encryption that the underlying data exchange is the same. As for merging this with the integration, not sure I will be much use there. |
Seems like my new AC70 also uses encryption ... |
From what their marketing people told me, they added a "password" function to the Bluetooth control to prevent people walking around RV parks from turning off other people's power. I don't have details on how they added it. |
@Patrick762 I have the encryption process mostly worked out in a test script that I wrote in python. I haven't had much time to complete the final steps of the handshake but I at least know what is happening. Hit me up on Discord (I'm in your channel) and I can share it with you if you want. I would like to see if it is universal across the different models. |
the same here, also a AC180 UPDATE: todays update to hassio 13.0 finished, after that, state of charge is displayed |
Same here with an AC 180 |
Any News on this? Just updated my ep600 to the newest version... now nothing works ... :-( |
Yeah definitely don't update if your stuff is working. I haven't had a bunch of time to finish dissecting the encryption due to work stress. It's definitely not standard and I'm not sure it will work with the HA integration. Might be portable to the MQTT project that exists however. |
Yeah, but had to Update my EP600. Because I get a second one and the parallel grid connection didint work until I updated both EP600 to the newest available FW.. :-( UPDATE: |
guys, i just got the AC180, and while the device connects, only 2 entities a created and nothing shows up. |
@jsaiko are you able to share the current code, irrelevant of the state? I'd love to pick it up as I have some time to put into some projects and this one is a bug bear of mine that I'd like to sort out. |
I unfortunately just did a system format and dont have the most recent version of the code 😞 I did find an older copy though, not sure how broken it is or isn't. Maybe I can find time to touch it up soon. |
Thanks @jsaiko. I'll spend some time during the week having a look through and seeing what I can add. Will share back here. |
@jsaiko (let me know if you don't want me tagging you). I've gone a slightly different route; I've decompiled the Android APK for Bluetti. I've attached the connection manager classes and associated services to this. Item to note is one of the consts defined is ;
My java and cryptography skills are a bit rusty, at best. I'll spend some time over next few days trying to compare this to what you've implemented (or atlernatively, just reimplement the below in Python once I've got my head around it). If something below is an aha moment for you and it's quick for you to implement this to finalise, call it out and I'll hold. The method bleEncryptedHandler is below for reference.
|
@russellproud I was using the APK as a reference when creating the script too ;) |
Haha yeah, I came to that conclusion after posting this :) |
Hi, I don't suppose anyone has found a way of getting at least the percentage available info into homeassistant on an EB3A? appreciate there is the encryption issue but didn't know if anyone had found a workaround to get the raw data into HA somehow. |
If your device uses encryption, even reading the values is not possible without decryption. |
it's odd as they have enabled encryption (from what people say) to prevent other people accessing your device however the app has local option which just finds and connects to devices close by without having to authenticate. that would therefore not stop people accessing your device whether it's using encryption or no encryption, you just need the app. |
There is an option in the app to set a password. The “no login” part of the app should ask for the password at connect time if a password has been set on the device.
If no password is set, then the device seems to use encryption anyway with a default password.
Thanks!
-Jeff
On Dec 13, 2024, at 3:40 PM, blackys7312 ***@***.***> wrote:
it's odd as they have enabled encryption (from what people say) to prevent other people accessing your device however the app has local option which just finds and connects to devices close by without having to authenticate. that would therefore not stop people accessing your device whether it's using encryption or no encryption, you just need the app.
—
Reply to this email directly, view it on GitHub<#120 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BDQE2HJUHZP7LZ7YA2RACZL2FNV75AVCNFSM6AAAAABKQ2IA3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBSGU2TGMBYGA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hello everyone, has anyone made any progress on this topic? |
This isn't over. Bluetti just saying they aren't supporting it. That's fine, I'll work in finishing up this decryption and just stop buying their products. |
I think the forum post is a bad example of the “telephone game”.
I have some internal contacts with Bluetti management and have suggested that they document the Bluetooth protocol as well as the method of encryption to enable HA compatibility. The technical managers were very positive on the idea. I cannot get into any further details.
I’m not a Bluetti employee.
It would be useful if you guys have a specific ask for what is to be documented. I can present that to them next time.
Also: is documentation in Chinese OK?
Translating it is more work for them than documenting it. They have to hire (expensive!) business document translators to get things into English. I think if we are OK to have Chinese documentation then it would be a much easier ask on their side.
Thanks!
-Jeff
On Jan 20, 2025, at 13:27, Joe Saiko ***@***.***> wrote:
This isn't over. Bluetti just saying they aren't supporting it. That's fine, I'll work in finishing up this decryption and just stop buying their products.
—
Reply to this email directly, view it on GitHub<#120 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BDQE2HI6RNMUPLFDYT6C32T2LVS2HAVCNFSM6AAAAABKQ2IA3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBTGI2TANRTGM>.
You are receiving this because you commented.Message ID: ***@***.***>
|
@jhagenk thanks for the insight. We just need the handshake process documented. There are multiple key exchanges that take place when connecting to the device by bluetooth before you can even exchange any data. Their implementation is non standard so it will take time figure out unless they are able to help. |
I’ll reach out when they are back in the office.
I’d bet it will be a bit before we see anything as we are coming up on the Chinese new years holiday.
Thanks!
-Jeff
On Jan 20, 2025, at 13:39, Joe Saiko ***@***.***> wrote:
@jhagenk<https://github.com/jhagenk> thanks for the insight. We just need the handshake process documented. There are multiple key exchanges that take place when connecting to the device by bluetooth before you can even exchange any data. Their implementation is non standard so it will take time figure out unless they are able to help.
—
Reply to this email directly, view it on GitHub<#120 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BDQE2HJXRP2KLIYILE62XJ32LVUJ5AVCNFSM6AAAAABKQ2IA3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBTGI3DGMBWGQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I got the BLE encryption to work! I could only test with a new AC180, but I can retrieve the serial number and the battery pct% just fine, using the exact same ReadHoldingRegisters() commands as what's already in the repository. The encryption just wraps the existing protocol, with some additional chatter in the beginning to exchange keys. On a side note, the "bluetooth password" which supposedly was one of the reasons for the protocol change is not secure at all... It's stored on the device, the application asks the device for the password and compares it with what the user types. You can literally ask over bluetooth what the password is! I'll clean up the code next weekend and submit. I'm sure I've taken shortcuts somewhere so could use help after it's published to properly integrate it. |
What great news!! If you need help testing on the EB3A model, count on me! Thank you very much |
Thank you for your work! If that's working now, we can in the next step extract the bt lib from the integration so it can be used in a mqtt project. |
Awesome!
Given that this has been figured out, I’ll save my favors from the development manager for another time.
I can assist with testing if needed. I have access to most current Bluetti models.
Thanks!
-Jeff
On Jan 27, 2025, at 4:53 AM, Patrick762 ***@***.***> wrote:
Thank you for your work!
If that's working now, we can in the next step extract the bt lib from the integration so it can be used in a mqtt project.
—
Reply to this email directly, view it on GitHub<#120 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BDQE2HM4NBYVGYSYYDXEW232MYT6JAVCNFSM6AAAAABKQ2IA3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJVGY4DKNJRGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I ended up putting this in the warhammerkid/bluetti_mqtt code since the Bluetooth stack of the machine I have running home assistant doesn't seem to properly work. There are more changes than just the encryption since I added another device type in there, but the encryption code is self-contained if you only want that. To try it out, you should be able to run something similar to the command in the commit summary. Maybe try changing the device type to V2Device too if you're not using AC180 (bluetooth/__init__.py, Thanks @jsaiko for sharing your earlier attempt, you were very close! |
I have the same problem with my AC180P, very annoying. For now at least bluetti need to make the bluetti app have a horizontal version, so i can integrade it in a nice touch display for my camper. Hope anyone can find a solution or bluetti will come with one... |
Tried running this build of bluett_mqtt and getting errors. Hopefully it's able to help as an updated build in this add-on soon. :) |
What happened?
I have a new AC180 which does not work with any known currently available open source solution. After some digging, it appears the device is using BLE encryption. Based on my troubleshooting, the "2A 2A" is a signature to start the encryption process.
These notifications appear then a few seconds later the device disconnects if no action is taken.
What version of our software are you running?
0.1.2
What device are you seeing the problem on?
AC180
IOT v9046.01
ARM v2107.02
DSP v2102.02
What bluetooth connection are you using?
Internal bluetooth adapter
Have you changed the integration settings?
false
Integration settings (if you changed them)
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: