0913 – Custom Protocol and Data Validation

Original link: https://atjason.com/daily/2022-09-13.html

The custom protocol and data verification are studied, and the conclusion is that the current custom protocol is continued to be used, plus summation verification.
‌
Regarding the custom protocol, for example, Xiaomi customized the MMA protocol on the basis of Bluetooth. It’s a bit too complicated and unnecessary for me, though.

Regarding the checksum, Bluetooth itself has a simple parity check, and the application layer will probably have its own checksum, such as CRC. Again, for simplicity, a sum check is used for now. However, in order to avoid simultaneous positive and negative offsets and the sum remains unchanged, a simple code table is added, that is, additional offsets are added, which significantly improves the verification success rate. CRC is actually the same idea, which is a reference.

This article is reproduced from: https://atjason.com/daily/2022-09-13.html
This site is for inclusion only, and the copyright belongs to the original author.