View Single Post
Old January 13th, 2022   #7
ericthegeek
Task Group Member
 
Join Date: Aug 2008
Posts: 375
Default

Quote:
Originally Posted by lensfocus
I found the problem, it was a bad ground on my RS485 driver chip!
Oh good, glad you found the problem.



Quote:
Originally Posted by lensfocus
ericthegeek, I understand what you said that 6 * 0xFF is the same as adding the header bytes, but the header isn't supposed to be included in the discovery response checksum! I am now getting a "MUTE" instruction addressed to my UID after discovery after initially setting the checksum to zero.

The 6 * 0xFF isn't from the header (the header is 0xFE, not 0xFF).


Each byte of the UID is Boolean OR'd with 0xAA and 0x55.


We've established that (0xAA.or.VALUE)+(0x55.or.VALUE) == 0xFF+VALUE.


If you expand that out 6 times, once for each byte of the EUID you get:


(0xFF+UID_5)+(0xFF+UID_4)+(0xFF+UID_3)+(0xFF+UID_2)+(0xFF+UID_1)+(0xFF +UID_0)


That can be simplified to (6*0xFF)+UID_5+UID_4+UID_3+UID_2+UID_1+UID_0, which is the calculation that's done on that code snippet. Whoever figured out that simplification is clearly smarter than I am.


Quote:
Originally Posted by lensfocus
Thanks again, this is a great forum!

That's why we're here. The goal is to keep RDM developers on track and to help improve interoperability for everyone.


It's often worth browsing through older threads too, it can help you avoid many of the common pitfalls.
ericthegeek is offline   Reply With Quote