BrittonPlewes / GodoxRemote

Arduino library to mirror Godox RC-A5 wireless remote
9 stars 3 forks source link

Calculate checksum by combined XORs #2

Open charles-dyfis-net opened 2 years ago

charles-dyfis-net commented 2 years ago

It appears that the checksum field can be calculated by taking a known checksum from a known source value, and XORing in a constant for each bit that differs from that known source value.

Note that these values are generated from an RC-A5II remote, rather than the original RC-A5; the only hardware I have on hand is VL-150 and VL-300 units, so I can't personally guarantee that the values being collected are legitimate for other lights.

(Yes, this ticket has been completely renamed/reworked; apologies about that).

charles-dyfis-net commented 2 years ago

This ticket will be reopened after the assertions contained have been more aggressively validated, ideally with working code that can validate correct checksums for arbitrary inputs.

charles-dyfis-net commented 2 years ago

Adding notes here, because it's as good as place as any. Note that the below should be considered hypotheses -- the assertions have been spot checked but not comprehensively vetted.

charles-dyfis-net commented 2 years ago

In the group identifier:

charles-dyfis-net commented 2 years ago

In the channel identifier:

charles-dyfis-net commented 2 years ago

Reopening this ticket; https://github.com/charles-dyfis-net/gr-godox-remote contains an implementation of the above checksum algorithm in SQL, and tools demonstrating that its output is identical to values received over the air for a wide array of samples.