DMX USB plugin rework

Massimo Callegari

Hi
To everyone building from sources, as you probably noticed, I've pushed some significant changes to the DMX USB plugin.

Please, help me to test these changes with all the USB adapters you have, especially those based on the ENTTEC DMX USB Pro.

If you encounter any issue, please report here.

Thanks !
Cingulingu

Hi, we have a problem. Tested on enttec MK2 and discover that there is a communication error. The device blinks the red led on any change on any channel.
System: linux (opensuse 13.1) x64, qt4, qlc-bild from git today 25.8.14.
Build log: https://build.opensuse.org/package/live ... 3.1/x86_64

Qlcplus Debug-0;

[Universe] setOutputPatch - ID: 0 , plugin: "DMX USB" , output: 0
virtual bool DMXUSBWidget::open(quint32, bool) Line: 0 , Input mask: 0 , Output Mask: 1
virtual bool DMXUSBWidget::open(quint32, bool) FTDI correctly opened and configured
[Universe] setOutputPatch - ID: 0 , plugin: "None" , output: 4294967295
virtual bool DMXUSBWidget::close(quint32, bool) Line: 0 , Input mask: 0 , Output Mask: 0
virtual bool DMXUSBWidget::close(quint32, bool) All inputs/outputs have been closed. Close FTDI too.
virtual void DMXUSB::configure()
virtual EnttecDMXUSBPro::~EnttecDMXUSBPro()
void EnttecDMXUSBPro::stopThread()
static QList QLCFTDI::widgets() DMX USB VID: "403" PID: "6001"
static QList QLCFTDI::widgets() DMX USB serial: "ENXE9A3P" name: "DMX USB PRO Mk2" vendor: "ENTTEC"
virtual bool DMXUSBWidget::open(quint32, bool) Line: 0 , Input mask: 0 , Output Mask: 2
virtual bool DMXUSBWidget::open(quint32, bool) FTDI correctly opened and configured
bool EnttecDMXUSBPro::extractSerial() "DMX USB PRO Mk2" gave malformed serial reply: "ffffffffffffffa0" "ffffffffffffffa5" "40" "1" "0" "0" "0" "0" "ffffffffffffffe7"
virtual bool DMXUSBWidget::close(quint32, bool) Line: 0 , Input mask: 0 , Output Mask: 0
virtual bool DMXUSBWidget::close(quint32, bool) All inputs/outputs have been closed. Close FTDI too.
void IOPluginCache::slotConfigurationChanged()
Massimo Callegari

Hi Cingulingu. If you refer to the serial number extraction error, that's normal. It always happened even before my changes.

Have you performed a distclean before rebuilding ?
Is the Mk2 the only device you have connected ?
Which lines are you opening and do you see any debug error when sending DMX data to them ?

Please keep in mind that during my tests I noticed that the Mk2 doesn't like many changes at once, so sometimes I had to disconnect it from the USB port to reset it and start from scratch again.
Cingulingu

For the serial No. I know. but this is the only error that I get.
For the build. Sure is clean. The OBS use the a clean VM every time.
For the MK2. It was the only device connected on USB.
And for the last. I did start from scratch. And even more I clean the settings and other stuff too. So no residuals has left from previous installation.
Nothing helped.
Massimo Callegari

Ok, which input/output line are you trying to use ?
Cingulingu

First one and second out. and first in. Practically it don’t work on any.
Massimo Callegari

I tried all the supported combinations listed in the DMX USB plugin documentation.
You're saying that selecting a single line (e.g. DMX1 OUT) makes a red led blinking ?
Cingulingu

Exactly. But not immediately. It happen when some output is applied.
Massimo Callegari

Honestly I have no explanation for what is happening to you.
I just double checked on my system even removing the QLC+ config file.
Still works for me.

Are you sure there isn't something you are not telling me ?
Have you changed anything in your system lately ?
What version of Qt and libFTDI are you using ?
Can you confirm that before
https://github.com/mcallegari/qlcplus/c ... 543b1d4dc1
QLC+ works with on your system with the Mk2 ?
Santiago Benejam Torres

Tested Enttec DMX USB Pro with qlcplus 4.7.5 from GIT compiled with qt5. Enttec don't wotk. The green led on Enttec dont blink when qlcplus is sending data. With 4.7.4 version downloaded from QLC`webpage. Works as expected, when sending data green led start blinking.
One detail on 4.7.4 on Input/Output DMXUSB show DMX Output 0, on 4.7.5 it show DMX Ouput 1.
Now I'm compiling 4.7.5 with qt4. And I will try it in a few minutes.
Santiago Benejam Torres

Same result with 4.7.5 compiled with qt4. Green LED on Enttec DMX USB Pro not blink and no DMX output. With 4.7.4 version works well.
Massimo Callegari

OK, so there's indeed a problem.
The question now is: why does the new code works for me ? I have tried on 2 different computers and even on Windows.
I tried all the adapters I have and they all work: Pro Mk2, ENTTEC open, Stageprofi and NanoDMX.
Tomorrow I'll test also a DMXKing ultraDMX Pro.

I'm gonna add some more debug messages. Please attach here your logs when you can.

Thanks
Massimo Callegari

Ok, maybe I already found something, can you please try again ?
Thanks
Cingulingu

Yes. I’m sure. Nothing has changed (libFTDI,Qt,...) from last week when I tested the version before the I/O plugin change. And it worked fine.
I have tested the today code from git. But the problem is still there.
Recompiled 4.7.4 from surceforge, tested - OK!
Massimo Callegari

I've added some debug messages.
Can you please try to send some DMX data to the first output and attach the debug log here ?
Please start from a clean configuration and open just the first output.

Thanks
Cingulingu

Here it is.
Attachments
QLC%2B.log
(39.71 KiB) Downloaded 101 times
Massimo Callegari

The log seems to be OK. I guess you still see the red led blinking, right ?

Last resort: turn these piece of code at line 474 of plugins/dmxusb/src/enttecdmxusbpro.cpp from this:

if (m_outputsMap[output] == 1)
request.prepend(m_out2reqCode); // Command - second port
else
request.prepend(m_out1reqCode); // Command - first port

Into this:

if (m_outputsMap[output] == 1)
request.prepend(ENTTEC_PRO_SEND_DMX_RQ2); // Command - second port
else
request.prepend(ENTTEC_PRO_SEND_DMX_RQ); // Command - first port

And rebuild. If this is the issue, then GCC is having a bad role in it...
Cingulingu

Tested and now it's working! Thanks!
I noticed that too. That the gcc misbehave on passing values to subroutines. Thanks again.
Just to know. Will you include this in git master or I have to make a patch?
Massimo Callegari

SO glad it's working now !
Thanks to you and your patience !

I've just pushed the change that should be the final and good one.
Can you please update your tree and test again ? Please test also the input line/s according to the table I've noted in the documentation.

Last question: which GCC version do you use ? In the end it seems my 4.8.2 was building a working code. I'm just curious of this weird fact.
Santiago Benejam Torres

Enttec DMX USB Pro It's working now, with 4.7.5 GIT compiled with qt4. The create-deb.sh fails but QLC+ seems to compile fine.
I got a segfault when clicking on the config button DMXUSB in the input/output tab.
Aug 26 19:35:26 ponent kernel: [92206.653521] qlcplus[28069]: segfault at 0 ip 00007f5baf115f59 sp 00007fffecb78c30 error 4 in libftdi.so.1.20.0[7f5baf114000+7000]

Starting qlcplus with Enttec connected is detected and I can use it.
Post Reply