hcs301_programming
hcs301_programming copied to clipboard
Key derivation from Manufacturer key required?
Hi,
I'm exploring this, and I think there may be an error in your sketch.
From my research, the key programmed into the receiver should be derived from the Manufacturer key and the serial number (using the NormalKeyGen routine), rather than being a static value independent of the serial number. When I updated the sketch to derive the key from the manufacturer key and serial number, I was able to successfully read back and decrypt the transmissions.
Thanks for putting this together!
would you be able to provide that updated sketch?
I'm afraid I mischaracterised what I did. I actually did the derivation external to the sketch, updated the key in the sketch to match the serial number, and then ran it for only one transmitter.
However, I have made some changes to the ESPHome project, to implement keeloq support, which can be found here:
https://github.com/rogandawes/esphome/tree/keeloq
That includes routines for programming the HCS301, taken from this repository.