TeensyDMX: Receiver is unable to parse RB-DMX1
I’m seeing framing errors and other issues when trying to receive data from a Pioneer RB-DMX1.
My setup is as follows:
- Teensy 4.1
- TeensyDMX was pulled from git, from master branch not more than a few days ago
- Sketch is DMX receiver-only, via
Serial1. Based on the example sketch. - I’m using pin 3 as an RX watch pin, via
dmxRx.setRXWatchPin(RX_WATCH_PIN) - I’m using the serial console to debug packet stats and error information to the serial monitor.
The RB-DMX1 works fine when I hook it up directly to my lights. I’ve got roughly 19 DMX devices and about 157 used channels.
The Teensy 4.1 and your TeensyDMX library work fine if I receive DMX data from an Enttec Open DMX, with the same amount of fixtures.
When the RB-DMX1 is sending data to TeensyDMX, I will get framing errors and long packet counts. Depending on what the DMX box is outputting, it will sometimes not give any errors at all, but in other situations, it will give me nothing but errors, with no data at all output. This box is proprietary in that it only works with Rekordbox DJ software. what’s weird is that it seems to wig out the most when it’s sending certain colors, like red. Other colors/modes, it won’t error out at all. Which is really weird.
I started adding debug code in to figure out where the framing errors are coming from. There are about 11 places in the code where receiveBadBreak() will increment framingErrorCount.
I see framing error counts increase in the following source locations:
- Receiver.cpp line 729, space-for-break and MAB was just seen, and either the space-for-break time was too short, or the MAB time was too short
- Receiver.cpp line 811, First byte is too early, discard any data
The DMX output looks decent on an oscilloscope but my scope kinda sucks. I think I might modify the library to pulse a spare IO pin when the MAB transitions. that would be helpful. But anyway, here are the measurements I can come up with from the scope:
- Space-for-break time: 180.0 uS
- MAB time: ~20 uS
- Data bit length: 4 uS
- Break-to-break time: ~28.8 ms
The times look really consistent, there’s not really any jitter to speak of.
I’ve spent a few days on this and I’m not sure what to do from here. I’m pretty certain that the DMX device is within spec, or close to it, especially since it works with my lights. I think this might a legitimate bug with the library. Could you help me with this?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 32 (17 by maintainers)
Thanks for the comprehensive details. Yeah, I don’t like to close these until there’s some resolution. I appreciate your engagement with this and I’d really love to see this solved. I’ll do my best to help.