node-dmx / dmx

DMX controller library for node.js
MIT License
300 stars 93 forks source link

enttec openDMX #3

Closed evantahler closed 10 years ago

evantahler commented 10 years ago

Great module!

I'm trying to get it to work with the enttec openDmx, which should be very similar to your usb-dmx-pro driver. I've determined that the baudrate is lower, but that's it so far. I can connect to the device for a few seconds before it disconnects... so I've got something wrong with send_universe.

Here's a reference implementation in ruby which I'm working from.

Any suggestions?

wiedi commented 10 years ago

sorry for taking sooo long to respond - saw the pull request, got distracted and forgot about it :(

What happens when the device disconnects? Does it successfully send out a few packats before it disconnects?

The ruby code looks pretty much like what we're already doing.

I'll merge it and we can improve from there.

evantahler commented 10 years ago

Thanks for getting back!

Don't merge this just yet. Here's a stand-alone gist trying to figure out what's going on. I've gotten closer, but still not yet.

https://gist.github.com/evantahler/9755268

wiedi commented 10 years ago

oops was to fast with the merge then ;)

No idea why the gist doesn't work. :/ Interesting that the other app indeed does reach the dimmerpack - maybe you can dtrace/dtruss it or something to see how it does this.

evantahler commented 10 years ago

Thanks... It's baffling me too! Do you have any suggestions on how to inspect the actual data begin sent to the pack on OSX?

wiedi commented 10 years ago

starting the app with "dtruss" should show that

evantahler commented 10 years ago

eh, it looks like dtruss doesn't work to well on signed, packaged & compiled apps. Good idea though!

evantahler commented 10 years ago

Got it! https://gist.github.com/evantahler/9755268

tldr: baudrate / 2 and the node FTDI driver already pads all the messages with start/stop bytes

evantahler commented 10 years ago

Here's a better PR https://github.com/wiedi/node-dmx/pull/4

chesnel commented 10 years ago

I look forward to testing the module with the Enttec dmx pro ! Thanks for this !

wiedi commented 10 years ago

fantastic! I'll have a look :)