Replies: 1 comment
-
p.s. Kind of found temp workaround - using dmx_receive_num() with exact number of expected bytes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using XIAO esp32c3 on Arduino IDE with such RS485 board: https://www.aliexpress.com/item/1005002287645672.html
The board does not have EN pin (I set int enablePin = DMX_PIN_NO_CHANGE). But so far want to receive the DMX messages.
My DMX network sends four packets of data on each command: each time 7, 7, 256 and 256 bytes. Screenshots of the whole command and of the beginning of 256-byte packet is below.
Data in packets (decoded using oscillograph):
Then I call dmx_receive() and dmx_read(, , packet.size) in the loop (compiled almost without modification Arduino_DMXRead example, just removed disconnect and driver delete part and added some debug output). And getting first two 7-byte packets just fine, but next packets received as 7 bytes packets only.
Debug output:
06:51:10.761 -> Err=0, sc=80, size=7. Received=7. Data=80 01 13 07 42 00 05
06:51:10.810 -> Err=0, sc=81, size=7. Received=7. Data=81 01 13 07 0b 80 05
06:51:10.847 -> Err=0, sc=80, size=7. Received=7. Data=80 ff aa 01 00 00 00
06:51:10.892 -> Err=0, sc=80, size=7. Received=7. Data=80 ff bb 00 00 00 00
Why the lib truncates the packets? Should I somehow reset driver after each packet?
Appreciate any ideas.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions