Page 1 of 1
Custom built FTDI adapter not working on Mac Os X
Posted: Mon Nov 23, 2015 7:04 pm
by dardo
Hi, I just found this software and its amazing. Thank you very much for it.
Im trying to use it on a mac with OpenDMX (FTDI chip) and can't get it to work. Same hardware, running the windows version from a VirtualBox machine runs without problem, so I know the hardware is ok. How can I debug this ?
Also, a separate matter Im trying to build the software on mac using Qt 5.5, the idea is to add support for non-FTDI UART-ttl chips (like CP2102, since its easier to get those in Argentina), will keep you posted on that one and any help/pointers is much appreciated.
Re: non working on Mac Os X
Posted: Mon Nov 23, 2015 7:04 pm
by mcallegari
dardo wrote:Im trying to use it on a mac with OpenDMX (FTDI chip) and can't get it to work.
QLC+ version ?
OSX version ?
Which OpenDMX device ?
Is it listed in the IO panel or not ?
dardo wrote:Also, a separate matter Im trying to build the software on mac using Qt 5.5, the idea is to add support for non-FTDI UART-ttl chips (like CP2102, since its easier to get those in Argentina), will keep you posted on that one and any help/pointers is much appreciated.
QLC+ already has a UART plugin but right now it's not enabled on OSX.
Which CP2102 device are you referring to ? Product page link please.
Re: non working on Mac Os X
Posted: Wed Nov 25, 2015 2:23 pm
by dardo
QLC+ version ?
OSX version ?
Which OpenDMX device ?
Is it listed in the IO panel or not ?
QLC 4.10.1, OSX 10.10.5
OpenDMX DIY, on breadboard. Its a FTDI USB cable connected to the Max485 connected to the light.
It is listed on the IO panel, but does not send commands (tested using another serial connected TX-RX), this same setup on the same computer, but on windows works. FTDI drivers are installed.
QLC+ already has a UART plugin but right now it's not enabled on OSX.
Will that work on windows ? The end user of this will be using windows. I can develop on Mac/Linux.
Which CP2102 device are you referring to ? Product page link please.
http://www.dx.com/p/usb-to-ttl-cp2102-s ... lXGGN-rTKY
https://www.silabs.com/Support%20Docume ... 2102-9.pdf
Thanks.
Re: non working on Mac Os X
Posted: Wed Nov 25, 2015 2:23 pm
by mcallegari
dardo wrote:QLC 4.10.1, OSX 10.10.5
OpenDMX DIY, on breadboard. Its a FTDI USB cable connected to the Max485 connected to the light.
It is listed on the IO panel, but does not send commands (tested using another serial connected TX-RX), this same setup on the same computer, but on windows works. FTDI drivers are installed.
Then it's the usual Apple FTDI driver issue, discussed a million times in this forum.
You need to disable it. Search for "FTDI" in the QLC+ PDF manual.
dardo wrote:Will that work on windows ? The end user of this will be using windows. I can develop on Mac/Linux.
No. I don't think I will ever support UART on Windows.
Anyway, you're using a FTDI chip, so no UART is involved.
Got it, but that's not a DMX adapter.
When you said "since its easier to get those in Argentina" I thought you were referring to DMX adapters on the market, not a custom built one.
The goal of QLC+ is to support existing products. Those built at home are out of scope and in any case they would require a huge amount of effort to be supported.
Re: Custom built FTDI adapter not working on Mac Os X
Posted: Wed Nov 25, 2015 5:14 pm
by dardo
Then it's the usual Apple FTDI driver issue, discussed a million times in this forum.
You need to disable it. Search for "FTDI" in the QLC+ PDF manual.
Thanks, I should RTFM before posting.
No. I don't think I will ever support UART on Windows.
Ok, I could try using a raspberry pi for this, will give that a shot.
Anyway, you're using a FTDI chip, so no UART is involved.
That's my development unit, but I plan to use the cp2102 on the production ones.
The goal of QLC+ is to support existing products. Those built at home are out of scope and in any case they would require a huge amount of effort to be supported.
I plan to support that myself, that's why Im asking for some directions on getting started. Thanks.
Re: Custom built FTDI adapter not working on Mac Os X
Posted: Wed Nov 25, 2015 5:14 pm
by mcallegari
dardo wrote:I plan to support that myself, that's why Im asking for some directions on getting started. Thanks.
You need to tweak the DMXUSB plugin.
1) add your device VID/PID here
https://github.com/mcallegari/qlcplus/b ... face.h#L94
2) add the VID/PID to the validity check here:
https://github.com/mcallegari/qlcplus/b ... ce.cpp#L73
3) add an "else if" here
https://github.com/mcallegari/qlcplus/b ... t.cpp#L201
like this
Code: Select all
else if (iface->vendorID() == DMXInterface::CP2102VID &&
iface->productID() == DMXInterface::CP2102PID)
{
widgetList << new EnttecDMXUSBOpen(iface, output_id++);
}
Re: Custom built FTDI adapter not working on Mac Os X
Posted: Fri Nov 27, 2015 4:07 pm
by dardo
Thank you very much!
I managed to build it on Mac OS X and did the changes you mentioned. Had to force it to use QtSerial but its not working so I suspect this has to do with Mac OS X.
Im building it on my linux box and will test it there, if that does not work I'll have to resort to use libusb which I really would like to avoid.
Thank you very much for your support.
BTW, I finished reading the whole manual and its excellent.
Re: Custom built FTDI adapter not working on Mac Os X
Posted: Fri Nov 27, 2015 5:08 pm
by mcallegari
Have a look here:
http://www.qlcplus.org/release-4.10.0.html
when it says "OSX/Important"
Most likely you don't have to use QtSerialPort for your adapter, and you still need to disable the Apple driver.
Can you post the debug messages printed by the dmxusb plugin when detecting the adapters ?
Re: Custom built FTDI adapter not working on Mac Os X
Posted: Fri Nov 27, 2015 7:03 pm
by dardo
This is not a FTDI chip, its not managed by Apple's driver. I had to install a vendor driver to get it detected. Not sure how this relates to this chip, but I will try disabling the driver.
Code: Select all
Most likely you don't have to use QtSerialPort for your adapter, and you still need to disable the Apple driver.
Im thinking it will not work, although QtSerialPort is reported to work with CP210X devices in the documentation. I tried running it on linux but it always starts with libFTDI interface and refuses to use QtSerialPort. I need to dig more into it. I really don't care about Mac OS X support, this will end up running on either a Windows laptop or Linux on a Raspberry pi, but my main development machine is a Mac
Can you post the debug messages printed by the dmxusb plugin when detecting the adapters ?
I guess this is the relevant part of it (running on Mac OS X):
Code: Select all
Loaded I/O plugin "ArtNet" from "libartnet.dylib"
Loaded I/O plugin "DMX USB" from "libdmxusb.dylib"
[QtSerialInterface] Serial: "" name: "incoming port - Bluetooth-Incoming-Port" vendor: ""
[QtSerialInterface] Serial: "" name: "Bluetooth-Modem" vendor: ""
[QtSerialInterface] Serial: "0001" name: "CP210x USB to UART Bridge Controller" vendor: "Silicon Labs"
static QList<DMXInterface *> LibFTDIInterface::interfaces(QList<DMXInterface *>) DMX USB VID: "10c4" PID: "ea60"
static QList<DMXInterface *> LibFTDIInterface::interfaces(QList<DMXInterface *>) DMX USB serial: "0001" name: "CP2102 USB to UART Bridge Controller" vendor: "Silicon Labs"
[setOutputsNumber] base line: 0 outputMap: QHash((0, 0))
[setOutputsNumber] base line: 1 outputMap: QHash((1, 0))
HotPlugMonitor::HotPlugMonitor(QObject *)
void HotPlugMonitor::start()
void HotPlugMonitor::emitDeviceAdded(uint, uint) 4292 60000
void HotPlugMonitor::emitDeviceAdded(uint, uint) 1452 33417
void HotPlugMonitor::emitDeviceAdded(uint, uint) 1452 610
void HotPlugMonitor::emitDeviceAdded(uint, uint) 1452 33798
void HotPlugMonitor::emitDeviceAdded(uint, uint) 1133 50475
void HotPlugMonitor::emitDeviceAdded(uint, uint) 2652 17664
void HotPlugMonitor::emitDeviceAdded(uint, uint) 1507 1544
void HotPlugMonitor::emitDeviceAdded(uint, uint) 1452 32775
void HotPlugMonitor::emitDeviceAdded(uint, uint) 1452 32775
Loaded I/O plugin "E1.31" from "libe131.dylib"
void DMXUSB::slotDeviceAdded(uint, uint) "10c4" "ea60"
[QtSerialInterface] Serial: "" name: "incoming port - Bluetooth-Incoming-Port" vendor: ""
[QtSerialInterface] Serial: "" name: "Bluetooth-Modem" vendor: ""
[QtSerialInterface] Serial: "0001" name: "CP210x USB to UART Bridge Controller" vendor: "Silicon Labs"
static QList<DMXInterface *> LibFTDIInterface::interfaces(QList<DMXInterface *>) DMX USB VID: "10c4" PID: "ea60"
static QList<DMXInterface *> LibFTDIInterface::interfaces(QList<DMXInterface *>) DMX USB serial: "0001" name: "CP2102 USB to UART Bridge Controller" vendor: "Silicon Labs"
[setOutputsNumber] base line: 0 outputMap: QHash((0, 0))
[setOutputsNumber] base line: 1 outputMap: QHash((1, 0))
void DMXUSB::slotDeviceAdded(uint, uint) "5ac" "8289"
void DMXUSB::slotDeviceAdded(uint, uint) Invalid DMX USB device, nothing to do
void DMXUSB::slotDeviceAdded(uint, uint) "5ac" "262"
void DMXUSB::slotDeviceAdded(uint, uint) Invalid DMX USB device, nothing to do
void DMXUSB::slotDeviceAdded(uint, uint) "5ac" "8406"
void DMXUSB::slotDeviceAdded(uint, uint) Invalid DMX USB device, nothing to do
void DMXUSB::slotDeviceAdded(uint, uint) "46d" "c52b"
void DMXUSB::slotDeviceAdded(uint, uint) Invalid DMX USB device, nothing to do
void DMXUSB::slotDeviceAdded(uint, uint) "a5c" "4500"
void DMXUSB::slotDeviceAdded(uint, uint) Invalid DMX USB device, nothing to do
void DMXUSB::slotDeviceAdded(uint, uint) "5e3" "608"
void DMXUSB::slotDeviceAdded(uint, uint) Invalid DMX USB device, nothing to do
void DMXUSB::slotDeviceAdded(uint, uint) "5ac" "8007"
void DMXUSB::slotDeviceAdded(uint, uint) Invalid DMX USB device, nothing to do
void DMXUSB::slotDeviceAdded(uint, uint) "5ac" "8007"
void DMXUSB::slotDeviceAdded(uint, uint) Invalid DMX USB device, nothing to do
Loaded I/O plugin "ENTTEC Wing" from "libenttecwing.dylib"
Loaded I/O plugin "HID" from "libhidplugin.dylib"
Loaded I/O plugin "Loopback" from "libloopback.dylib"
Loaded I/O plugin "MIDI" from "libmidiplugin.dylib"
Re: Custom built FTDI adapter not working on Mac Os X
Posted: Fri Nov 27, 2015 7:48 pm
by dardo
If I force it to use QtSerialProt, I get this
Code: Select all
virtual bool DMXUSBWidget::open(quint32, bool) Line: 0 , Input mask: 0 , Output Mask: 1
virtual bool QtSerialInterface::open() Open device ID: 0 ( "" )
virtual bool QtSerialInterface::open() "CP210x USB to UART Bridge Controller" cannot open serial driver
So, at least Im getting an error there. I'll keep digging.
Re: Custom built FTDI adapter not working on Mac Os X
Posted: Mon Nov 30, 2015 4:32 pm
by dardo
After much fiddling around I gave up and paired one of the CP2102 with an Arduino PRO Mini and wrote an sketch to support the DMX4ALL protocol. Doing that I got it to work and that covers my needs for now.
I think it is possible to do it without the arduino in the middle, just having the CP2102 speak directly to the MAX485 and will keep working on that, but will not use QtSerialPort, and will do it directly using POSIX calls.
Thanks for all your support.
Re: Custom built FTDI adapter not working on Mac Os X
Posted: Mon Nov 30, 2015 6:20 pm
by mcallegari
I think it is possible to do it without the arduino in the middle, just having the CP2102 speak directly to the MAX485 and will keep working on that, but will not use QtSerialPort, and will do it directly using POSIX calls.
QtSerialPort does use POSIX calls:
http://code.qt.io/cgit/qt/qtserialport. ... serialport
The issue you're experiencing is probably due to OSX, that filters out everything it doesn't know or want.
Plus, the OSX serial driver sucks and it's not capable of doing real time operations, so probably even if you suceed in writing some POSIX code, the OSX kernel will refuse to work like you expect.
I experienced it with the openDMX protocol. Luckily libFTDI solved it (by doing raw libUSB calls), but in your case I don't know how the CP2102 can be treated.
A suggestion: use Linux !
Re: Custom built FTDI adapter not working on Mac Os X
Posted: Tue Dec 01, 2015 8:38 pm
by dardo
Well, Im not a DJ Im a software developer and Im building this for my church. They are not tech saavy so this must run either on Windows or a Raspberry pi that I can attach to the back of a monitor. And I have that covered.
I just refuse to let CP210X devices unsupported, I'll keep playing with it just for fun. I really don't care about OS X, all my home computers run linux except for the work laptop (to do iOS apps). So I'll try in linux this weekend.
Again, thanks for all your support.