Support for custom VCP device

Post Reply
paradajz
Posts: 6
Joined: Tue Aug 17, 2021 7:38 pm
Real Name:

I am trying to create my own DMX device which uses STM32 microcontroller and USB VCP. Basically, once plugged into USB it shows as virtual COM port (but also as an MIDI device, not really relevant to this question). I have implemented the widget API from Enttec.

Naturally, QLC+ cannot recognize this device since I am using my own VID, PID, manufacturer name and product name. Once I've changed the VID/PID combination to the ones of FTDI (0x0403 / 0x6001), set the manufacturer name to "ENTTEC" and product name to "DMX USB PRO", QLC+ can see my device. However, no data is being sent to my device, so I've tried to run QLC+ with debug flag. This is what I see:

Code: Select all

virtual bool LibFTDIInterface::open() "DMX USB PRO" ftdi_usb_reset failed
virtual bool LibFTDIInterface::clearRts() "DMX USB PRO" USB device unavailable
I am guessing that this is due to the fact I am using standard VCP implementation and not the actual FTDI chip. The communication between my device and PC works fine in terminal, BTW (eg. "echo hello! > /dev/ttyACM0) - the issue is only between my device and QLC+ (and/or FTDI driver). My question is basically this:

Since I am in complete control of DMX timing on my device, what I need from PC/QLC+ side is DMX packets only. What steps would be needed for something like this to be supported in QLC+? Is it maybe already supported but I am not seeing it? Can I try to emulate some other device which doesn't use FTDI driver but their own VCP implementation? If so, then I could just open PR on GitHub with the added VID/PID combination which would use that driver.

Sorry I am missing anything obvious here.
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Hi, if your device works with /dev/ttyAMA0, then you should try the UART plugin and not the DMXUSB plugin.
The latter uses libftdi APIs, so it's not guaranteed it would work with non FTDI chipsets.
paradajz
Posts: 6
Joined: Tue Aug 17, 2021 7:38 pm
Real Name:

From what I've gathered, UART plugin ships only for ARM, right (eg. Raspberry Pi)? I can understand why GPIO plugin wouldn't be included with desktop version, but not really for UART...
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Read this
viewtopic.php?f=17&t=8894

Since you are in the software development section, I assume you're able to buid QLC+ yourself and enable the UART plugin
paradajz
Posts: 6
Joined: Tue Aug 17, 2021 7:38 pm
Real Name:

To quote "it is nowaday rare to see a RS232 interface on modern PCs"

That's true. However, it is not rare to see TTL level USB converters, such as FTDI, CH340, CP2102, or, USB CDC devices, such as Arduino boards. As an example this project will not work with QLC+ simply because UART plugin isn't enabled by default.

But anyways, yes, I did manage to build the QLC+, although I am not really seeing UART there... do I have to explicitly enable it during the build? The built version is QLC+ 5 which has a very different interface from the version in my distro (v4) so maybe I am missing something.
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

My post is from 2015, while the project you mentioned is from 2017.
Please consider the context before making absolute statements.

Also, if your QLC+ version is 4.x, why did you follow the build instructions of QLC+ 5?

In general, since this project is led only by me, I don't physically have time to support every DIY project in the world. I rather spend time to support real devices, tested and guaranteed by a manufacturer (and not by me)
I'll tell you a story: a few years ago someone posted in these forums an article saying "build your own DMX adapter for less than $10". Everyone said "WOW, then why should I spend $200 for a commercial one??"
Problem is that those DIY projects will hardly work well compared to opto-isolated and company driven devices.
The result is that those DIY people come back in these forums saying QLC+ doesn't work well with their hand made soldered DMX device.
Does it sound fair to you?

To conclude: I wrote the UART plugin to support a specific device (tested and guaranteed) mounted on the Raspberry Pi, not every serial adapter in the world (which BTW are not DMX adapters...)
Shipping the UART plugin on desktop versions doesn't still sound like a good idea to me in 2021.
I'd rather prefer you include the pre-built QLC+ plugin with your project and instruct your users how to install it. (I could even build them for you and attach them here if you like)

I hope I've made my point of view clear this time.
paradajz
Posts: 6
Joined: Tue Aug 17, 2021 7:38 pm
Real Name:

I'm sorry if my post sounded absolutist - that was not my intention. It was just confusing to me to have UART plugin working on one device only, but thanks for your explanation.

In the meantime I've found out that QLC+ can work with OLA. OLA can forward data from QLC to my device which is great and actually solves my problem, I just didn't realize before that this was possible at all.

Regarding the build, I've followed the guide from here:
https://github.com/mcallegari/qlcplus/w ... uild-HOWTO

I don't really see where the page with build instructions is for QLC4?
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

paradajz
Posts: 6
Joined: Tue Aug 17, 2021 7:38 pm
Real Name:

Thanks!
Post Reply