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.

Reply
 
Thread Tools Search this Thread Display Modes
Old January 13th, 2022   #1
sblair
Administrator
 
Join Date: Feb 2006
Posts: 441
Send a message via AIM to sblair Send a message via MSN to sblair
Default

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
sblair is offline   Reply With Quote
Old January 13th, 2022   #2
lensfocus
Junior Member
 
Join Date: Jan 2022
Posts: 4
Default

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!
lensfocus is offline   Reply With Quote
Old January 13th, 2022   #3
ericthegeek
Task Group Member
 
Join Date: Aug 2008
Posts: 390
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
Old January 13th, 2022   #4
sblair
Administrator
 
Join Date: Feb 2006
Posts: 441
Send a message via AIM to sblair Send a message via MSN to sblair
Default

Quote:
Originally Posted by ericthegeek View Post
Oh good, glad you found the problem.

Whoever figured out that simplification is clearly smarter than I am.
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
sblair is offline   Reply With Quote
Reply

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 10:59 AM.


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