![]() |
|
|||||||
| RDM General Implementation Discussion General Discussion and questions relating to implementing RDM in a product. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
|
#1 |
|
Administrator
|
Welcome to the forums!
A couple random thoughts of things I've ran into before to also check: - Could be a timing issue in the response. Make sure everything is within the right timing window. - You might need to leave some additional time between sending the packet and shutting off the Tx drive. It is super easy to disable TX before the packet has fully been sent chopping off some bits at the end and causing the behavior you are seeing. Scott
__________________
Scott M. Blair ![]() RDM Protocol Forums Admin |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Jan 2022
Posts: 4
|
Thanks so much for your responses, Scott and ericthegeek..
I found the problem, it was a bad ground on my RS485 driver chip! I did try adding a delay after sending the packet before enabling the receive, but that was allright, I am waiting till the Tx buffer is empty first. Anyway, I still have the question about the checksum initialization. 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. Thanks again, this is a great forum! |
|
|
|
|
|
#3 | |||
|
Task Group Member
Join Date: Aug 2008
Posts: 390
|
Quote:
Quote:
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:
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. |
|||
|
|
|
|
|
#4 |
|
Administrator
|
And that is exactly why I don't try to be clever in my code. I'll just end up confusing myself later. I don't recommend trying to be too smart in your code. Eric is one of the more brilliant people I know. If the code is trying to be too clever for him, then it's too clever for most anyone.
__________________
Scott M. Blair ![]() RDM Protocol Forums Admin |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Discovery response format | FishFood6 | RDM General Implementation Discussion | 5 | November 19th, 2020 06:15 AM |
| Discovery Response Preamble | prwatE120 | RDM General Implementation Discussion | 0 | January 20th, 2007 12:22 AM |