> i'm waiting 2.1 ms after the last rx byte and if there is no
> other byte for this time i try to explore the packet - if it is
> correct RDM packet, i will answer to the controller.
This is not correct. You must respond a a request within 2.0ms of receiving the request (table 3-4). If you wait longer than that the controller may consider the response to be lost. You can't use a timeout to reliably detect the end of a request.
For RDM to work, you have to look into the packet as you receive it. After you've received a break followed by 3 bytes, you have to look at the packet data to see if you've received an RDM Startcode (0xCC), Sub-Startcode (0x01), and Length. Once you know the request's length, then you can count how many more data bytes you need to receive.
> If i use this time-out as reference for non-DMX package
> this may be will not work with old DMX system where the
> timing for interslot delay can be 1s?!
You must always be looking for both a break, and a data byte. You don't know ahead of time which you'll receive. When you receive a falling edge, it may be the start bit for the next data byte, or it may be the start of a break.
|