locked
Communicate with Bluetooth Device

    Question

  • Hello,

    We are currently investigating how to port our application across to a Metro style app using the WinRT API so that we can target ARM tablets once they are released.

    Our application needs to be able to connect to an interface dongle over Bluetooth using the serial port profile, this interface is then used to access a common communications bus used in industrial automation. We are then able to the Bluetooth link to monitor the communication bus as well as send configuration commands etc

    To be able to implement our application with WinRT we will obviously need information on the Bluetooth APIs available and I have been unable to find any documentation.

    Please can you advise how we interface with specialist Bluetooth devices?

    Regards,

    Anthony

    Friday, September 14, 2012 9:51 AM

All replies

  • Anthony,

    The available WinRT Bluetooth APIs are listed here:

    http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.proximity.aspx

    Best Wishes - Eric

    Saturday, September 15, 2012 1:44 AM
    Moderator
  • Hi Eric,

    Thank you for your response - I had looked at the proximity APIs but they seemed to only support communications with "Peer" applications on another computer?

    This obviously can't be used to communicate with a Bluetooth device expecting a serial data stream, there are a large number of devices that communicate over Bluetooth in this manner, it seems odd that it won't be supported through WinRT... Even if the device discovery and pairing is handled through the "Devices" control panel I would expect to be able to enumerate that list and select a device to open a channel to.

    The nature of these devices is that they can only handle a single connection so there is no issue of the user observing unexpected behaviour with one app accessing the device.

    Apologies if I have missed something on my reading of the documentation you linked to but I can't see how that API can establish the connection we (and likely a lot of other developers) would require. If I'm mistaken then could you please provide a bit of detail in which API functions will help with this?

    Regards,

    Anthony

    Saturday, September 15, 2012 7:45 AM
  • Hi Anthony,

    Are you able to create Metro style app communicating with Bluetooth device? If yes, please provide all the details to achieve this.

    Thanks!

    Vishal

    Friday, September 21, 2012 2:38 PM
  • Hello,

    Please update us with your findings. I am eagerly looking for this.

    Regards,

    Vishal

    Monday, September 24, 2012 10:50 AM
  • Eric,

    I would really like to know the answer to Anthony's question. I am also trying to connect an specialist device (high accuracy GPS receiver) to a windows surface tablet and create an application to find the paired Bluetooth device and obtain its data. I have written an application for Windows Phone 8 that uses the PeerFinder to find paired Bluetooth devices, however this does not appear to work using Windows 8. It seems to me that Bluetooth API is only supporting App to App connections, but what we are trying to do is App to Device.

    Basically what I want is this sample app, but for windows 8
    http://code.msdn.microsoft.com/wpapps/Bluetooth-app-to-device-644870ba#content <- Windows Phone 8

    PeerFinder.AlternateIdentities["Bluetooth:Paired"] = "" <-- not supported in windows 8

    According to this forum post I just found it is not supported, but it really should be.

    http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/d6b19693-2b8c-49cf-8ebe-c37b2118ec01


    .Chris



    • Edited by chrisahill1 Friday, January 04, 2013 10:29 PM
    Friday, January 04, 2013 10:20 PM
  • I agree I am in the same boat.  I am developing an industry application that would be in use internationally if I could get the bluetooth connect to work.  I am support iOS, Android, Windows Desktop and Windows RT.  All of which support it with the exception of iOS, (can't open up our devices to Apple), and Windows RT.  

    What is the purpose of not making this available?   I don't see how it can be a security problem.. Android has had this capability for an extremely long time.... any information would be good as I need to pass the reasoning on to my superiors as to why I can't implement this feature.

    Wednesday, January 16, 2013 3:12 PM
  • iOS is also supported as long as you register for their free Made for iPod program. Okay it is a bit of a faff but it is at least there. I don't see a solution for WinRT even with an amount of faff.
    Monday, January 21, 2013 4:08 PM