Conversation
…ult decryption method
This was referenced Mar 22, 2026
Owner
Author
|
This PR is not perfect, there are some code smells I plan on fixing and I am still not sure about the structure, but since others are working on adding support for other devices #28 #27 I think its probably best to merge this now for its improved logging and better structure which make it easier to override specific functions for classes and fix the other issues later under #19 when I get around to cleaning things up. Its not like this is super unstable, I have been testing it with my prime charger 160w and its been super solid. |
This was referenced Mar 30, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for the Anker Prime 160w charger and probably the 250w one as well which was meant to be supported but almost certainly did not work.
Anker Prime devices seem to use a somewhat similar but also very different protocol. The encryption scheme is pretty different, it uses AES GCM instead of AES CBC, uses a MAC to validate packets, encrypts the initial negotiation using a static key, uses 12-bytes for a nonce instead of 16-bytes as an IV and uses no padding, but the overall packet structure is the same, anyway you get the picture.
As it stands this just reports telemetry data but I will probably add some controls later, and probably move things about as I decide how to best handle these two different device types/classes (Solix and Prime).
See #9 for context.