Comments (6)
Alright well, I'm not exactly sure what I did, but it's working perfectly now. I'm gonna assume it was bad wiring somewhere or theater ghosts. Thanks for all the help. Just some notes:
- That scope reading is from the rx output after the max485, not straight from the dmx.
- I was wrong about the etc express only sending 96 channels, turns out the patch on the board was wrapping around after 96 and causing the packet to have a pattern of repeated values.
Here's the code for the curious: https://github.com/kpelzel/LALT-dmx
from esp_dmx.
Further Findings
I think I was wrong about the etc express sending all 513 bytes. It appears it may only be sending 96 bytes. I was also able to get some full packets so I know it's working to some extend, but there are a lot of smaller broken packets between the full packets. On the etc express I set channel 1 to 0x73 and channels 2-4 to 0xff. When I ignore all packets that aren't a length of 513 I repeated (but very slowly) get this output:
�[0;32mI (395376) main: Start code: 00, Error: 0, Size: 513�[0m
�[0;32mI (395376) main: 00 73 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395376) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395386) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395396) main: 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 �[0m
�[0;32mI (395396) main: 00 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 �[0m
�[0;32mI (395406) main: 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395416) main: 00 73 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395416) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395426) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395436) main: 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 �[0m
�[0;32mI (395446) main: 00 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 �[0m
�[0;32mI (395446) main: 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395456) main: 00 73 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395466) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395466) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395476) main: 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 �[0m
�[0;32mI (395486) main: 00 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 �[0m
�[0;32mI (395486) main: 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395496) main: 00 73 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395506) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395506) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395516) main: 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 �[0m
�[0;32mI (395526) main: 00 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 �[0m
�[0;32mI (395526) main: 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395536) main: 00 40 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395546) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395546) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395556) main: 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 �[0m
�[0;32mI (395566) main: 00 00 00 00 00 00 00 00 00 f9 ff 00 00 00 00 00 �[0m
�[0;32mI (395566) main: 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395576) main: 00 73 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395586) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (395586) main: 00 �[0m
I tried setting my packet size to 96 and also 97, but it didn't improve the performance and resulted in shifted bytes:
�[0;32mI (16726) main: Start code: 00, Error: 0, Size: 96�[0m
�[0;32mI (16726) main: 00 73 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (16726) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (16736) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (16736) main: 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 �[0m
�[0;32mI (16746) main: 00 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 �[0m
�[0;32mI (16756) main: 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (19066) main: Start code: 73, Error: 0, Size: 96�[0m
�[0;32mI (19066) main: 73 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (19076) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (19076) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (19086) main: 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 �[0m
�[0;32mI (19096) main: 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 �[0m
�[0;32mI (19096) main: 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (25366) main: Start code: 73, Error: 0, Size: 96�[0m
�[0;32mI (25366) main: 73 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (25376) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (25376) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (25386) main: 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 �[0m
�[0;32mI (25396) main: 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 �[0m
�[0;32mI (25396) main: 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (38366) main: Start code: 00, Error: 264, Size: 96�[0m
�[0;32mI (38366) main: 00 73 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (38366) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (38376) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (38386) main: 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 �[0m
�[0;32mI (38386) main: 00 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 �[0m
�[0;32mI (38396) main: 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 03 �[0m
�[0;32mI (40976) main: Start code: 00, Error: 0, Size: 96�[0m
�[0;32mI (40976) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (40976) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (40976) main: 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 �[0m
�[0;32mI (40986) main: 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 �[0m
�[0;32mI (40996) main: 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (40996) main: 73 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (53316) main: Start code: 98, Error: 0, Size: 96�[0m
�[0;32mI (53316) main: 98 ef ff ff 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (53316) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (53326) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (53336) main: 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 �[0m
�[0;32mI (53336) main: 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 �[0m
�[0;32mI (53346) main: 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (54436) main: Start code: 00, Error: 0, Size: 96�[0m
�[0;32mI (54436) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (54436) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (54436) main: 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 �[0m
�[0;32mI (54446) main: 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (54456) main: 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 73 ff �[0m
�[0;32mI (54456) main: ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (54686) main: Start code: 73, Error: 0, Size: 96�[0m
�[0;32mI (54686) main: 73 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (54686) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (54696) main: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
�[0;32mI (54696) main: 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 �[0m
�[0;32mI (54706) main: 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 00 �[0m
�[0;32mI (54716) main: 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 �[0m
from esp_dmx.
Thanks for the information and the kind words!
This is a peculiar issue - it appears that the ESP32 is having a hard time determining when the DMX packet starts and ends, which is why you are seeing shifted bytes. It's surprising because of how robust the ETC Express is.
I don't have access to an Express to test, but I have loaded up esp_dmx v3.1.0 on my ESP32 and connected to my Entec DMX dongle and it is able to read DMX properly using your code. I also attempted to emulate an Express by sending DMX from a spare ESP32 using the DMX timings that the Express uses.
Which version of ESP-IDF are you using? And are you able to receive DMX coming from a different console?
from esp_dmx.
Unfortunately I don't have another console to test. I'm running ESP-IDF v5.1.1. I'll try out a different ESP32 and maybe a different power source. Currently I've been running off usb power from my laptop for testing, but I assumed that'd be enough for the esp32 and dmx shield.
My only other guess is incorrect wiring between the esp32 and dmx-shield, but I assume I wouldn't be seeing any packets if that was the case.
from esp_dmx.
I checked the signal with an oscilloscope today to make sure I'm not going crazy. It looks like the timings are fine.
Interpacket idle = ~11ms
Break = 94μs
MAB = 27μs
One question though. Is my signal inverted? Every diagram of dmx I've seen shows the idle low, break high, and MAB low. Mine seems to be the opposite. Are my D+ and D- getting crossed somewhere?
from esp_dmx.
If you've connected your scope to the A
line of your DMX bus, then your idle should be high; break, low; and MAB, high.
If you haven't tried already, one thing that I always do when troubleshooting is to connect my scope directly to the UART pins on the ESP32 to ensure that the DMX signal is making it from the RS485 transceiver to the ESP32. It is possible (albeit I think unlikely) that the enable pin is misconfigured which would make it difficult for the ESP32 to read data.
from esp_dmx.
Related Issues (20)
- Error on Sample DMX Sniffer HOT 1
- DMX read example - 'isr_handle' undeclared in arduino 2.14 HOT 1
- DMX Output randomly stops for a few seconds HOT 1
- Interrupt conflict HOT 1
- rdm_register_dmx_personality missing in 3.1.0 HOT 4
- DMX Read - Unstable packet.size depends on the number of DMX channels HOT 3
- compiling error with 3.10 but not with 3.0.3-beta HOT 3
- Bug string constant to 'char*' [-Wwrite-strings] HOT 2
- Send SET RDM_PID_IDENTIFY_DEVICE argument error
- RDM controller requests are not copying parameter data HOT 2
- dmx_get_personality_description() does not work HOT 1
- ESP32-S3 RDM issues with UART0 HOT 5
- Start Address Not Saving Via RDM HOT 8
- Compile Warning
- Problem with installing DMX on UART2 HOT 9
- Could not find any RDM capable devices HOT 1
- Stability Issue with BLE and UART
- ESP32 DMX Libary packet size read problem HOT 2
- Is it possible to receive dmx on one uart and copy/write it on another uart ? HOT 3
- Multiple Universes on a ESP32 Dev HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp_dmx.