Skip to content
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

fe95 legacy decrypt for YLYK01YL, YLKG07YL/YLKG08YL and more #88

Merged
merged 1 commit into from
Sep 27, 2021

Conversation

G1K
Copy link
Contributor

@G1K G1K commented Sep 26, 2021

Encryption can be used for remotes and dimers. More details were analyzed in custom-components/ble_monitor#289
But it could not be done as in python, since crypto in node js supports only aes-ccm with auth tag for verifying the result. Many thanks to @Alx2000y for defeating this problem.

Decryption and parsing of messages was checked by me on the YLYK01YL remote control
beaconkey can be obtained using a python script:

wget https://raw.githubusercontent.com/custom-components/ble_monitor/master/custom_components/ble_monitor/ble_parser/get_beacon_key.py 
pip3 install bluepy

python3 get_beacon_key.py <MAC> <PRODUCT_ID>


#python3 get_beacon_key.py AB:CD:EF:12:34:56 959

It is suitable for the PRODUCT_ID list:

  • 339: 'YLYK01YL'
  • 950: 'YLKG07YL/YLKG08YL'
  • 959: 'YLYB01YL-BHFRC'
  • 1254: 'YLYK01YL-VENFAN'
  • 1678: 'YLYK01YL-FANCL'

@gfwilliams
Copy link
Member

Great - thanks for this!

@gfwilliams gfwilliams merged commit e84818b into espruino:master Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants