locked
Serial Port Access for Metro app?

    Question

  • I see that there are several questions already regarding Windows 8 Metro apps and serial port access. I also see that WinRT does not support the System.IO.Ports namespace which one would normally use to access the serial port. Finally looking at this document http://msdn.microsoft.com/en-us/library/windows/apps/hh464945(v=VS.85).aspx I see that there are no alternatives for Serial and Parallel port access.

    However, can Microsoft provide some guidance on how ISVs can get access to serial port data from a Metro app? I see that there was a promised whitepaper on this topic (http://social.msdn.microsoft.com/Forums/en-US/tailoringappsfordevices/thread/7f9f0f37-ddb6-4192-b02b-2326964c059b). Depending on content, that whitepaper could be a great help to me.

    There are still many applications that make use of virtual COM drivers for serial port access even though many PCs don't have physical serial ports. It would be great if serial ports were still supported easily in Metro applications. From what I can tell, they are not well supported now.

    Tuesday, May 08, 2012 2:09 AM

Answers

  • Windows 8 does not include WinRT API support for serial or parallel port access; that was not a scenario that we targeted. 
     There is no easy way for a Metro style app to access a physical or virtual serial port device.
    Thursday, May 10, 2012 10:59 PM
    Moderator
  • This isn’t a scenario we targeted.  The option of last resort – is you write a custom driver, which isn’t an option for everyone, and even then it can only be accessed by one privileged app declared in device metadata.   A desktop app may be a better answer.

    Best Wishes - Eric

    Tuesday, September 25, 2012 12:22 AM
    Moderator

All replies

  • Laduran,

    Thank you for your question.  Are you referring to USB serial ports?

    Best Wishes - Eric

    Wednesday, May 09, 2012 5:36 PM
    Moderator
  • Yes, I am referring to a Virtual COM driver such as that provided by FTDI as well as others. I know of a couple different companies that are still developing devices and using a virtual COM port for device to host communication. Yes, I know it seems old school but it is simple, and until now, well supported.

    In fact, these aren't even USB "dongles". They are fully integrated devices in a laptop form factor that use an internal USB header for connectivity. So the end user wouldn't even know it was a USB device.

    Another thought I had was to have a service that wasn't reliant on WinRT to do the serial communication and then use an IPC mechanism to send/receive the data. Is that possible in Metro apps? Is a form of IPC supported between a Metro app and a non-Metro app (or service)?

    Louis

    PS: Eric Hanson, how's that whitepaper coming along?


    • Edited by laduran Thursday, May 10, 2012 7:33 PM
    Thursday, May 10, 2012 4:20 AM
  • Windows 8 does not include WinRT API support for serial or parallel port access; that was not a scenario that we targeted. 
     There is no easy way for a Metro style app to access a physical or virtual serial port device.
    Thursday, May 10, 2012 10:59 PM
    Moderator
  •  Is a form of IPC supported between a Metro app and a non-Metro app (or service)?

    IPC is not supported in any fashion between Metro style apps and Desktop apps / services.

    Best Wishes - Eric

    Thursday, May 10, 2012 11:00 PM
    Moderator
  • IMHO, 

    You can use portable class which you make it with C++, than try to call it from WinRT (MetroApp).


    Saturday, May 12, 2012 6:57 AM
  • Portable classes are great however communication between Metro style apps and desktop apps is not allowed. 
    Saturday, May 12, 2012 7:49 AM
    Moderator
  • This is a shame if true.  Support of the USB CDC class is vital for custom devices ie AVR/ARM micro's to interface via a serial port.  
    Shame -reason to stick with Silverlight (using my own SerialPort class).
    Thursday, June 21, 2012 8:01 AM
  • Could you then at least point us in the right direction for not-so-easy way to do it?

    For our line of business, W8 ARM Slates would be the perfect solution, but we depend on hardware communications using a SPP over Bluetooth.

    I can't imagine we're the only ones with that requirement.

    Thursday, September 20, 2012 8:18 AM
  • This isn’t a scenario we targeted.  The option of last resort – is you write a custom driver, which isn’t an option for everyone, and even then it can only be accessed by one privileged app declared in device metadata.   A desktop app may be a better answer.

    Best Wishes - Eric

    Tuesday, September 25, 2012 12:22 AM
    Moderator
  • I entirely subscribe Joep point of view. They're not the only ones: W8 ARM tablet would be an ideal solution for our sales force automation application, where Bluetooth Printing over serial port of invoices and delivery documents is a strict necessity (we have a similar Android App that does it!). Do you know if there is there an easiest way to do it? Maybe a third part (non Microsoft) library?

    Best regards

    Thursday, October 18, 2012 9:23 AM
  • I realize that at this time there is no way to serial port communications on Win8 "Metro" apps (don't know the proper term and Metro has stuck). Yes, serial ports are a legacy device, but in my line of business (consulting) I have many many clients who still do communication over a virtual serial port (usually an FTDI solution). Maybe FTDI will step up and provide a generic drive. However even if they do, the fact that only "one privileged app" can access it will still be a huge problem.
    Saturday, October 27, 2012 8:43 PM
  • I think it is ridiculous that windows RT cannot communicate with serial devices and that they are furthermore considered legacy.

    As a system/network administrator I use serial almost every time I travel. There is no other way to set up a managed switch or router or many other devices until a management interface is established. This is one of the reasons why I choose Android as my tablet of choice. Windows RT will need to increase the scope of their APIs for metro code to allow for a diverse market of users to choose it as a portable OS of choice. 

    Considering Windows' main stake these days is in corporations, I would think that it would favor those who administer it and not consider the technology to be legacy especially because the individuals in this field often have major pull in their organizations decisions. The moment they start making another standardized  method of consoling into a device or interacting/sending information to basic hardware without programming it will then be legacy, until then I will simply be specialized. 

    I think Microsoft has a huge potential in merging the desktop and mobile device with Win 8 but it will need to be more functional or at least equally so to what's out there in almost every way for it to truly dominate and get support from the app making community.

    Sunday, November 04, 2012 8:27 PM
  • Very true, its ridiculous - must be some motive of MS to do this???

    FTDI and in recent years many micro-controllers have direct USB support with CDC USB firmware - and Bluetooth SPP.
    We are sticking with Silverlight and the traditional Windows - The new Windows RT is just too limiting so far.

    However, if someone intelligent at Microsoft can point me in the right direction I'm willing (& quite capable) to write a low-level driver???
    Any recommend reference books???

    ..tho expect this would be a manufacturer specific driver and a big expensive job - and the manufacturer would have to be helpful (...which I expect not)

    Happy XMas :)

    Tuesday, November 06, 2012 3:12 PM
  • According to this sample http://code.msdn.microsoft.com/Windows-Phone-8-Networking-835239c1 it can be done for Windows Phone 8.

    Somehow in WP8 one is able to connect to arbitrary bluetooth devices and push data through a StreamSocket to send it out. However I can't seem to translate this code to WinRT. In RT one is supposed to use NFC and tap the devices together. Obviously that's not a great solution either.

    Does anyone have an idea on how to use this StreamSocket approach in WinRT. If it's possible on WP8 I guess is should somehow be feasable on RT too...!?

    Monday, December 17, 2012 12:15 PM
  • Hi Eric,

    Is there a place were we can get more information about this (writing a driver specific to an app). Or some one we can talk to? Perhaps there is a program similar to Apple's MFi program? I've attended a few roadshows to ask this specific question (Irvine, San Diego, and recently, Las Vegas). But no one has been able to help.

    Communications is over bluetooth and we currently support the SPP and MFi's iAP URT/IDPS. 

    We develop a mobile Credit Card Reader and Printers for all other mobile platforms and would like to expand to WinRT. We have a few hundred existing clients that would like to migrate from there existing devices (Blackberry, iPhone, Android, iPad) to a WinRT device (not Win8). Our partners in Japan are also very interested.

    The ideal situation would be to be get our hardware working and offer some type of SDK to our partner developers. Or simply develop the software solutions in-house.  We have 6 different types of devices, and we are now working on a mobile Debit/PINPad, Reader, Printer combo.

    Any assistance would be greatly appreciated.

    Regards - Blaine


    • Edited by Blaine-AMSI Monday, December 17, 2012 4:00 PM
    Monday, December 17, 2012 3:53 PM
  • Almost every dive computer connects via serial interface (USB to Serial), so without serial communication WinRT is useless for this purpose. One of the most requested feature of my customers is the ability to connect a dive computer to their tablet device, but it's not possible with Windows RT.


    • Edited by dvlg Saturday, January 05, 2013 10:51 PM
    Saturday, January 05, 2013 10:44 PM
  • Just found out today that bluetooth SPP won't work...

    That really makes the RT tablets a no go for our engineers.  Most devices still have COM ports to communicate with.  How MS sees this as legacy is beyond me.  Do they go out in the real world sometimes ?

    Monday, May 27, 2013 9:09 AM
  • Hi Troll,

    This thread is about Windows 8. See the Devices section the Windows 8.1 Feature Guide for information about Windows 8.1.

    --Rob

    Tuesday, October 22, 2013 5:19 AM
    Owner