CANDY-HOUSE / SesameSDK_ESP32_with_DemoApp

SesameSDK3.0は、iOS/Android/Embedded向けのBluetooth/AIoT(Internet of Things)ライブラリであり、オープンソース、使いやすく、強力、かつ永続的に無料です。公式のセサミアプリもこのSesameSDKを使用しており、このSDKを用いてあなたのアプリにもセサミアプリが持つ全ての機能を組み込むことができます。
https://jp.candyhouse.co
MIT License
13 stars 5 forks source link

ssm_ble_receiver cannot parse packets from Sesame Touch #7

Closed js4jiang5 closed 2 months ago

js4jiang5 commented 5 months ago

I've successfully integrated Sesame5 and Sesame Touch into Home Assistant thanks to this demo program. Now I can lock/unlock, set lock/unlock position, horizon calibration, add fingerprints and cards, but there are some problems with Sesame Touch. I guess that is because the demo program is aimed for Sesame5 only.

One of the problems is that the ssm_ble_receiver can parse the publish/response packets from Sesame5 successfully, but it cannot parse the packets from Sesame Touch. When I send a command to Touch to add fingerprints and cards, it adds succesfully and responds some packets, but the content is just some random code. I think the parsing might be different for both devices. Hope Candy House can provide the method to fix it.

image

MotoZe commented 5 months ago

Hello! Thank you for using our products. Regarding your question about the data transmission between ssm and ssm_touch, these devices follow the same basic communication protocols. If you are experiencing issues with data parsing, it could be related to differences or issues in the encryption and decryption processes.

I recommend checking to ensure that all data packets are correctly encrypted and decrypted as required. These steps are crucial for secure data transmission. You can refer to the following technical document for more details on implementing and understanding the necessary encryption and decryption operations:

Security Layer Documentation

If you still encounter issues after checking these steps, or if you need further technical support, please feel free to contact us. I hope this information helps resolve the issues you are facing!

js4jiang5 commented 5 months ago

Hello! Thank you for using our products. Regarding your question about the data transmission between ssm and ssm_touch, these devices follow the same basic communication protocols. If you are experiencing issues with data parsing, it could be related to differences or issues in the encryption and decryption processes.

I recommend checking to ensure that all data packets are correctly encrypted and decrypted as required. These steps are crucial for secure data transmission. You can refer to the following technical document for more details on implementing and understanding the necessary encryption and decryption operations:

Security Layer Documentation

If you still encounter issues after checking these steps, or if you need further technical support, please feel free to contact us. I hope this information helps resolve the issues you are facing!

I've found out the root cause. The difference between sesame lock and touch is how the secretkey is abstracted. They are different. I had to dig into Android and iOS SDK to find it out. Now I can parse the Sesame Touch packets successfully.

MotoZe commented 5 months ago

Thank you for the update and for sharing your solution! It's great to hear that you've resolved the issue.