locked
How can a Metro app communicate over a serial port and not over USB?

    Question

  • I have a requirement that the device must be recognized over a serial port and not USB. :( Any ways for my Metro app to communicate over a serial port and not over USB? Just to clarify, I cannot use the example provided here. I really need the device to be recognized over a serial port.

    Thank you for your help and time!

    Monday, January 27, 2014 6:20 AM

Answers

  • Hello,

    Unfortunately we do not support RS-232 hardware from the context of a Windows Store app. If you have a broad enough business scenario that you think will affect the development community please post it here and I will pass it along.

    Thanks,

    James


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

    Tuesday, January 28, 2014 12:33 AM
    Moderator
  • Hello,

    You cannot access RS-232 hardware from your Windows Store app because the app container does not offer access to the underlying hardware. We only allow a small subset of device types to be accessed from a Windows Store app. Support for more device types may be added in the future but many legacy device types may never be added. I have been fighting since before the W8 release to get MIDI device types added and have had no success. I know this really doesn't help but we do have great USB communications support and you might want to talk to your vendor about adding this support to their device.

    I wish I had better news for you,

    James


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



    Wednesday, January 29, 2014 11:56 PM
    Moderator

All replies

  • Moving to the hardware forum for better assistance.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, January 27, 2014 8:57 PM
    Moderator
  • Hello,

    Unfortunately we do not support RS-232 hardware from the context of a Windows Store app. If you have a broad enough business scenario that you think will affect the development community please post it here and I will pass it along.

    Thanks,

    James


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

    Tuesday, January 28, 2014 12:33 AM
    Moderator
  • Thank you for the response, James!!

    From our Windows Store app, we tried accessing the serial port via DllImport("kernel32.dll"...) but we're unable to successfully get the COM port state (always returns false). Did I understand correctly that it is because of a Windows Store app's AppContainer sandboxing? If yes, are there ways for me to grant the Windows Store app the DeviceCapability (I haven't seen an appropriate DeviceCapability to use for serial ports)  or permission to read and write data over the serial port?

    I hope support for Serial Communications can be accommodated. In a nutshell, for us, our partner vendor's devices are setup to communicate over serial ports with no alternatives.


    • Edited by Celbester Tuesday, January 28, 2014 2:00 AM grammar, terms
    Tuesday, January 28, 2014 1:30 AM
  • Hello,

    You cannot access RS-232 hardware from your Windows Store app because the app container does not offer access to the underlying hardware. We only allow a small subset of device types to be accessed from a Windows Store app. Support for more device types may be added in the future but many legacy device types may never be added. I have been fighting since before the W8 release to get MIDI device types added and have had no success. I know this really doesn't help but we do have great USB communications support and you might want to talk to your vendor about adding this support to their device.

    I wish I had better news for you,

    James


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



    Wednesday, January 29, 2014 11:56 PM
    Moderator
  • Hi James!

    Your info has been very clarifying and informative; thank you! Yea, I still really wish WinStore apps have serial port support but your info helps to firm up that we have to try other avenues of implementation instead of still insisting for ways on how to make a WinStore app talk to a serial port.

    Please update the community if there are any updates to this. :) Thank you!
    • Edited by Celbester Friday, January 31, 2014 8:33 AM additions
    Friday, January 31, 2014 8:31 AM