OpenLightingProject / ola

The Open Lighting Architecture - The Travel Adaptor for the Lighting Industry
https://www.openlighting.org/ola/
Other
641 stars 204 forks source link

Add a Sunlite Device #1235

Open miglourenco opened 7 years ago

miglourenco commented 7 years ago

Can you add a Sunlite Suite 2 First Class + device?

+info: https://www.nicolaudie.com/pt/suite2fcplus.htm

Reguards, Miguel Lourenço

peternewman commented 7 years ago

Can we see lsusb -v output for the device please.

Have you tried accessing it using our existing Sunlite support for the USBDMX2? https://github.com/OpenLightingProject/ola/blob/master/plugins/usbdmx/README.md

miglourenco commented 7 years ago

Tell me how i do that?

Yeah, i have tried, dont work :/

Reguards

peternewman commented 7 years ago

Which OS are you on?

On Linux: lsusb -v

Can we see olad -l 4 logs for it trying to connect to the existing code too please.

miglourenco commented 7 years ago

I'm on Raspberry PI

peternewman commented 7 years ago

Okay, the Linux command will work then.

miglourenco commented 7 years ago

Bus 001 Device 004: ID 6244:0531 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x6244 idProduct 0x0531 bcdDevice 1.20 iManufacturer 1 Digital Art System iProduct 2 Intelligent USB Dmx Interface SIUDI7B iSerial 3 00000001A862 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 60 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 6 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x08 EP 8 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x88 EP 8 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Device Status: 0x0000 (Bus Powered)

waynehaffenden commented 7 years ago

What's the current status on this and would it also be possible to support the basic class box also? The output on my Mac for my device is:


Intelligent USB Dmx Interface SIUDI8C@14100000  <class AppleUSBDevice, id 0x100000c6a, registered, matched, active, busy 0 (2 ms), retain 17>
        {
          "sessionID" = 17259061703594
          "iManufacturer" = 1
          "bNumConfigurations" = 1
          "idProduct" = 1073
          "bcdDevice" = 264
          "Bus Power Available" = 250
          "USB Address" = 15
          "bMaxPacketSize0" = 64
          "iProduct" = 2
          "iSerialNumber" = 3
          "bDeviceClass" = 0
          "Built-In" = No
          "locationID" = 336592896
          "bDeviceSubClass" = 0
          "bcdUSB" = 512
          "USB Product Name" = "Intelligent USB Dmx Interface SIUDI8C"
          "PortNum" = 1
          "non-removable" = "no"
          "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}
          "bDeviceProtocol" = 0
          "IOUserClientClass" = "IOUSBDeviceUserClientV2"
          "IOPowerManagement" = {"DevicePowerState"=0,"CurrentPowerState"=3,"CapabilityFlags"=65536,"MaxPowerState"=4,"DriverPowerState"=3}
          "kUSBCurrentConfiguration" = 1
          "Device Speed" = 1
          "USB Vendor Name" = "Digital Art System"
          "idVendor" = 25156
          "IOGeneralInterest" = "IOCommand is not serializable"
          "USB Serial Number" = "00000002A79E"
          "IOClassNameOverride" = "IOUSBDevice"
        }
nomis52 commented 7 years ago

I've approached Sunlite numerous times about adding support for their devices. So far they haven't been willing to provide us with the API to communicate with the hardware.

If you're a customer it may be worth contacting their support and asking the question. The more people ask the better chance we have.

waynehaffenden commented 7 years ago

@nomis52 Thank you for the update, I will definitely do this, let's just hope and see.

peternewman commented 7 years ago

@waynehaffenden have you also tried accessing it using our existing Sunlite support for the USBDMX2? https://github.com/OpenLightingProject/ola/blob/master/plugins/usbdmx/README.md

I wonder if it might be similar enough we could reverse engineer from sniffing the USB protocol?

waynehaffenden commented 7 years ago

@peternewman I did but it didn't show up, I believe it only works for the Sunlite 1 boxes. I'm more than happy to try anything you need if you can send over some instructions for doing this?

peternewman commented 7 years ago

@waynehaffenden you could try changing https://github.com/OpenLightingProject/ola/blob/master/plugins/usbdmx/SunliteFactory.cpp VENDOR_ID and FULL_PRODUCT_ID to 0x6244 and 0x0531 respectively, or 0x6244 and 0x0431 (for the basic class box). In both cases you'll need to recompile OLA and relaunch to try the changes.

Otherwise you're probably into Wireshark USB logging to try and work out what it's doing.

waynehaffenden commented 7 years ago

@peternewman Thank you for this, I've updated the code but no idea on what I need to compile the source. I've never done anything with C++ so I'm a complete noob at this point, although, understand the basics. Do you have any guides, tips, etc that may help me? I can do this from Windows or Mac but will be planning on using the from my Mac.

peternewman commented 7 years ago

There are some compilation instructions for Mac here @waynehaffenden : https://www.openlighting.org/ola/mac-install/

Just to manage your expectations, firstly that suggestion is a stab in the dark. Secondly you should probably also read this FAQ: https://www.openlighting.org/ola/get-help/ola-faq/#Can_you_add_support_for_the_ltinsert-name-heregt_device

So in short I wouldn't spend too much time on it right now (aside from as a learning experience), as I doubt it will actually make it work.

waynehaffenden commented 7 years ago

@peternewman Thank you for this, if I do make it work then I'll let you know. Either way, thank you for your support

peternewman commented 6 years ago

So having had a chat with them at PLASA, Sunlite now have a library that's cross platform (Linux, Mac, Windows), which supports both USB and network attached dongles (apart from the SUSHI). Link here: https://www.nicolaudie.com/en/home-dev.htm

It would probably need a new plugin I think, but from the looks of the example it should be able to handle multiple devices and DMX in or out etc.

peternewman commented 6 years ago

I assume my trivial hack didn't work @waynehaffenden ?

waynehaffenden commented 6 years ago

@peternewman Thank you for speaking with them and finding that out, do you think they'll be plugin anytime soon and do you know if it would work with the box I have or is it just their new development kits?

Sadly, I never was able to figure out how to get it to compile, I followed the guide but just had no luck, I'm more than happy to try again but after you said it was unlikely to work I left it.

peternewman commented 6 years ago

I believe so Wayne. That's what they said in person and the website says "The Developer Kit software works with all Nicolaudie hardware.". I think the exception was their basic, cheapest inline USB interface.

The example code didn't look too bad, so it's just about time and what should be prioritised first. You'll probably need to get it compiling locally, initially at least, while we're testing stuff. What went wrong when you tried to compile it yourself?

waynehaffenden commented 6 years ago

@peternewman That could possibly count my box out then as mine is the basic class but I'm as always happy to test.

I've cloned the latest source from git and followed the guide for the MAC install above. Firstly, autoreconf doesn't ever work, getting the error of: Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326.

Then, trying to run ./configure or make in the cloned directory gives me the error: make: *** No targets specified and no makefile found. Stop.

Then, I try running the mac_build.sh script and it gives me then error: ./mac_build.sh: line 18: ./configure: No such file or directory make: No targets specified and no makefile found. Stop. make: No rule to make target check'. Stop. make: *** No rule to make targetinstall'. Stop. make: *** No rule to make target `install'. Stop.

I've only ever developed web apps and so there is a good chance I'm doing something really wrong and stupid that would be obvious for you. I guess it doesn't help that I'm not familiar with anything to do with the C++ world. Let us know if anything obvious springs to mind, much appreciated

peternewman commented 6 years ago

It's the Sushi interface they don't support, the little barrel thing here: https://www.dmxsoft.com/

Your's reports, via lsusb as a SIUDI8C, which I think is better than that one.

The compiling is one of those chained processes, where if the first step fails, often there won't be stuff in place, so all subsequent steps will fail to work too.

I take it you're running "autoreconf -i"?

Danger Will Robinson Which instructions did you follow exactly? The instructions I linked to use MacPorts ( https://www.macports.org/ ), but your error message mentions Cellar from Homebrew ( https://brew.sh/ ). You probably don't want to mix both on your system, in case bad stuff happens, or have you already done so? If you've got both on your system, which packages have you installed via which tool?

From this https://github.com/Homebrew/legacy-homebrew/issues/38015 it looks like you also need to "brew install automake", or do the port equivalent, depending on what you're preferred Mac package management system is.