E1.20 RDM (Remote Device Management) Protocol Forums  

Go Back   E1.20 RDM (Remote Device Management) Protocol Forums > RDM Developer Forums > RDM General Implementation Discussion

RDM General Implementation Discussion General Discussion and questions relating to implementing RDM in a product.

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old January 12th, 2022   #1
lensfocus
Junior Member
 
Join Date: Jan 2022
Posts: 4
Default Discovery response not recognized

I am developing a new lighting device, and need to implement the RDM protocol. I am new to DMX and RDM, but I have the DMX working fine. I am having a problem getting the controller that I am using to recognize my response to the discovery message.



I'm using an ENTTEC USB PRO MK2 for testing, and am trying to get it to recognize my board in the RDM discovery process. It is not seeing my responses to the DISC_UNIQUE_BRANCH message, and I'm not sure why. I can see my response on the RS485 bus using a scope. I know it is seeing my response, because it is continuing to send discovery messages with a narrowing range of IDs, so it thinks there is a collision on the bus. I'm thinking that my checksum is not correct?


I saw two examples of source code on the web for this, and they both use the same algorithm to encode the response. However, in looking at the protocol document (ANSI E1.20), there is a disconnect somewhere.


Here is the suggested code from the web to send a response:

_rdmCheckSum = 6 * 0xFF;
for (byte i = 0; i < 7; i++)
disc->headerFE[i] = 0xFE;
disc->headerAA = 0xAA;
for (byte i = 0; i < 6; i++) {
disc->maskedDevID[i+i] = _devID[i] | 0xAA;
disc->maskedDevID[i+i+1] = _devID[i] | 0x55;
_rdmCheckSum += _devID[i];
}
disc->checksum[0] = (_rdmCheckSum >> 8) | 0xAA;
disc->checksum[1] = (_rdmCheckSum >> 8) | 0x55;
disc->checksum[2] = (_rdmCheckSum & 0xFF) | 0xAA;
disc->checksum[3] = (_rdmCheckSum & 0xFF) | 0x55;

I have two issues with this.
1. Why do they initialize the checksum to 6 * 0xFF instead of zero?
2. The checksum should be adding the actual bytes sent after they are ORed, not the original bytes.


So, I tried changing it to this, to comply with the protocol:

_rdmCheckSum = 0;
for (byte i = 0; i < 7; i++)
disc->headerFE[i] = 0xFE;
disc->headerAA = 0xAA;
for (byte i = 0; i < 6; i++) {
u32 idx = i+i;
disc->maskedDevID[idx] = _devID[i] | 0xAA;
_rdmCheckSum += disc->maskedDevID[idx];
idx++;
disc->maskedDevID[idx] = _devID[i] | 0x55;
_rdmCheckSum += disc->maskedDevID[idx];
}
disc->checksum[0] = (_rdmCheckSum >> 8) | 0xAA;
disc->checksum[1] = (_rdmCheckSum >> 8) | 0x55;
disc->checksum[2] = (_rdmCheckSum & 0xFF) | 0xAA;
disc->checksum[3] = (_rdmCheckSum & 0xFF) | 0x55;

but I still don't get a MUTE message saying that the controller sees my response.

Thanks for any help you can provide!
lensfocus is offline   Reply With Quote
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 04:18 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.