locked
Access DMX 512 Protocol with WindowStore App?

    Question

  • Is there a way to communicate with/through the DMX 512 Protocol (via USB Adapter) to control lights?
    Info:http://en.wikipedia.org/wiki/DMX512

    There's also a wpf solution for that: http://quickdmx.codeplex.com/


    UPDATE: In the meantime I ported the above WPF Project to WindowsStore (just had to replace some threading stuff with Tasks). Now I've to wait until I receive my ARRI DMX512 light. But it would be interesting of course if someone has knowledge in this area in advance ;)
    • Edited by SW_Andy Monday, March 30, 2015 12:23 PM
    Monday, March 30, 2015 11:22 AM

All replies

  • Hi SW_Andy,

    Not quite sure if there are some third party libraries have such feature. But there is no build-in feature at this moment.

    But we do have documentation for how to communicate with Talking to USB devices, start to finish (Windows Store app)

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 31, 2015 8:10 AM
    Moderator
  • Hello,

    Most DMX controllers have MIDI interfaces to allow interactions between the computer and the external DMX controller. MIDI integrating also allows the DMX lighting control codes to easily be integrated into a standard DAW setup. This integration allows for easy synchronization of audio and lighting instruments.

    We do currently have some MIDI support for Windows Store apps. You can download and install the MIDI preview components from the link below:

    WindowsPreview.Devices.Midi

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    • Proposed as answer by Jamles HezModerator Wednesday, April 1, 2015 3:21 AM
    • Unproposed as answer by SW_Andy Friday, April 10, 2015 1:41 PM
    Tuesday, March 31, 2015 9:23 PM
    Moderator
  • Hi James,

    thank you very much. Sounds good. will definitely check that out.

    I've got a dmx light now... we'll order an Enttec USB-DMX Adapter also. Reportedly the Enttec Adapters have proper Windows 8 Drivers (thats what I read in some boards).

    I still need an usb Adapter right? And with proper Windows 8 Drivers, right?

    EDIT:

    Stupid me.. of course we'll need that Adapter ;) But as you said one that has MIDI enabled. Enttec has also one with a Midi-Breakout Box... so on the other end I would need a Midi-USB cable going to the Surface I guess.

    Will happily Report back here :)

    Thanks,
    Andy



    • Edited by SW_Andy Wednesday, April 1, 2015 9:17 AM
    Wednesday, April 1, 2015 9:12 AM
  • Little update:
    In the meantime I was in contact with ENTTEC and they said to me that it would be possible to control the lights via midi to dmx but not to send a turn on/off command. That's sad.

    So I'll try the USB Way either building my own USB Access with the help of the article mentioned above or to use quickDMX (or my port of that) which would of course require to send/receive WCF to work together with my windowsStore App.

    Another simple solution would be to use a power plug from allnet or avm and send get Parameters to turn the lights on/off... no Need for dmx.


    • Edited by SW_Andy Wednesday, April 8, 2015 11:35 AM
    Wednesday, April 8, 2015 11:35 AM
  • Ok, got the Hardware now and could test my c# code. So far my ports of openDMX and quickDMX both are reporting that there is something, but I receive an error message, telling me, that the device could not be opened and also that there is a invalid handle (FT_DEVICE_NOT_OPENED and FT_INVALID_HANDLE).

    I guess this is due to the missing Vendor informations I now have to pass into my WindowsStore App?

    I tried to follow the USB guide mentioned above... in Step three it is mentioned that device class, subclass and protocoll code must match one or another(?) certain ID, identifier or whatever.

    As I have a german Windows it was a bit hard to determine the right naming... but I got the proper Information out of the registry I hope.

    The info I got is...

    Compatible IDS:
    USB\Class_FF&SubClass_FF&Prot_FF
    USB\Class_FF&SubClass_FF
    USB\Class_FF

    Also I got as Information for the Class "Ports". And as classname I got "Anschlüsse (COM & LPT)".

    Am I doomed now or will this suffice?

    EDIT

    Ok, I added the DeviceCapabilities like that:

    <m2:DeviceCapability Name="usb">
          <!--FTDIBUS\COMPORT&VID_0403&PID_6001 -->
          <m2:Device Id="vidpid:0403 6001">
            <!--<m2:Function Type="classId:ff * *"/>-->
            <m2:Function Type="name:vendorSpecific"/>
          </m2:Device>
        </m2:DeviceCapability>

    and the c# class like that:

     private async void OpenDevice()
            {
                //FTDIBUS\COMPORT&VID_0403&PID_6001
                UInt32 vid = 0x0403;
                UInt32 pid = 0x6001;
                UsbDevice usbDevice;
    
                string aqs = UsbDevice.GetDeviceSelector(vid, pid);
                Debug.WriteLine("aqs:" + aqs);
    
                var myDevices = await Windows.Devices.Enumeration.DeviceInformation.FindAllAsync(aqs);
    
                try
                {
                    usbDevice = await UsbDevice.FromIdAsync(myDevices[0].Id);
                }
                catch (Exception exception)
                {
                    Debug.WriteLine("OpenDevice ERROR");
                    Debug.WriteLine(exception.Message);
                    Debug.WriteLine(exception.HResult);
                    //Debug.WriteLine(exception.InnerException.Message);
                }
                finally
                {
                    Debug.WriteLine("Opened device for communication.");
                }

    But failing miserably.. throwing me These Errors:

    Specified argument was out of the range of valid
    values.Parameter name:index

    So... what now? Anyone might have a clue what I'm doing wrong? Or is my device class just not supported?




    • Edited by SW_Andy Friday, April 10, 2015 9:37 AM
    Friday, April 10, 2015 8:56 AM
  • We only support a small subset of USB device types. If the firmware doesn't support one of these types you won't be able to use any standard APIs to access the device. 

    If it is a custom device type theoretically you could use the USB Device APIs and call directly into the device via IOCtl calls. I don't believe that this is supported outside the context of a device app. Device apps can only be written by the OEM or IHV (device manufacturer).

    -James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Friday, April 10, 2015 11:56 PM
    Moderator
  • Hi James,

    well... I'm quite lost here. I do not know if the Firmware does support one of the accepted types or not. Also I do not know which are the supported subsets at all... there's a list yeah... but I don't see antything regarding r232 Serial port (which dmx basically is) - also other questions regarding the very same vendor- and product-id in this Forum remained unanswered.

    I would propose that you widen the possibilities here for sideloaded Enterprise apps. In our case we build many exhibits for fairs, Museums and so on (and want to rely on Windows tablets), where the strict sandbox rules not always apply - and without solution, they often stand in the way (yes I'm Aware of brokered runtime components - but they're also not always the solution).

    That said - we now have a very simple (tough least favored) solution. We bought some programmable power plugs, which have a webserver built in and just send them a on/off state via a httplicent. The lights are then connected to that powerplugs.

    Tuesday, April 14, 2015 11:42 AM
  • Hello,

    For enterprise side loaded or kiosk apps you can create a desktop component that talks with the device and then use the Windows Store app to communicate with it. Check out the sample below for more information:

    Brokered Windows Runtime Components for side-loaded Windows Store apps

    Thanks,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Tuesday, April 14, 2015 6:21 PM
    Moderator
  • Yes I know. As I wrote in my post before ;)

    Also already done that for another Project. But as I also wrote that is also not always the solution. Especially if you have to manually sideload one or two tablets in a short matter of time (one day, two days) without rolloutsystem and without People technically fit (exhibtion personal, Hosts etc). Dosen't apply to this Project I'm afraid.

    Wednesday, April 15, 2015 12:57 PM
  • Hi Andy,

    Did you had any luck finally on this? 

    Friday, May 29, 2015 5:55 PM