-
Notifications
You must be signed in to change notification settings - Fork 14
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
Adding GCM encryption support. #23
Conversation
@cont1nuity any ideas how to determine on |
Unfortunately no. The scan command appears not to return the firmware of all devices nor consistent other version information... Edit: I don't see any common ground here. I would have gone for |
This might be an indicator. Do we have any reference devices with older firmware? The bad example I posted above might have been another issue, but the symptoms were the same and it was fixed after a GCM implementation was added. I am not sure if V2 is reliable. The approach in the linked commit is similar, though: if timeout or decryption did not work, then switch to GCM and try again. V2 is just used as an additional indicator. |
I have a device with quite old firmware. I cannot test on it right now, but I found a response from it:
I'm just thinking about possible ways for autodetect. Even |
I tried implementing auto-select initially, but I am not too comfortable with the codebase, so it was not too easy for me and I opted for setting only to get the support on the way. |
This adds GCM encryption which can be toogled on via new client option `encryptionVersion` (1 = ECB, 2 = GCM). It is needed for newer firmware versions and replaces existing ECB for all pack encryptions BUT the scan command, which still runs on ECB for compatibility. Tested on firmware 362001065279+U-WB05RT13V1.23
Hi @cont1nuity, could you check if https://github.com/inwaar/gree-hvac-client/tree/gcm works for you? |
@inwaar I pushed the changes to the users and got the next:
|
@aivus do you have a full log of debug messages from a working version? |
Found the logs for the same device:
If it's not enough, I can ask users to push other logs |
@aivus could you check if this another approach works? |
Hey @inwaar Thanks for the update. It took a while to return back to the topic. I just pushed the changes to the users and will let you know it works for them or not. I'll keep you posted. |
@inwaar it looks like the changes work like a charm. Users report that their ACs started to work now. @cont1nuity @inwaar Users of my app have sent me some donations which I would like to share. Do you have paypal or anything else i can easely use? |
I just got notified of the merge closure for pr 26 but apparently never for this thread. I am sorry to not have replied, as I did not actively monitored this and relied on notifications that I apparently turned off... @aivus thanks for the offer, but I am fine. I did not do much heavy lifting here anyways 😅 |
This adds GCM encryption which can be toogled on via new client option
encryptionVersion
(1 = ECB, 2 = GCM). It is needed for newer firmware versions and replaces existing ECB for all pack encryptions BUT the scan command, which still runs on ECB for compatibility.Tested on firmware 362001065279+U-WB05RT13V1.23
This satisfies #22.