How does a metro app use L2CAP protocol of windows 8?


  •  Hello,

    I want to program a metro APP that is implemented about a profile(for example, ftp, opp with obex 1.5) over l2cap on Bluetooth.

    How can my metro app use the l2cap protocol of windows?

    So far, I considered I can use device IO control to get it, and I wrote an profile driver, a metro App, and a winrt library. The test signing mode enabled. I try the following steps to use l2cap of windows 8. 

    1. My profile driver with code below to set property data with restricted after create the interface, and the status is success.

    status = g_pIoSetDeviceInterfacePropertyData(&symbolicLinkName,
                                                   &isRestricted /*true*/);

    2. I add a node for my Bluetooth controller by BluetoothSetLocalServiceInfo(), install my interface driver into the node, and it's successful.

    3. I create a metadata with below information.

        a) Locale default is en-US.

        b) the HWID (bthenum\{8c68f88f-ea75-4580-ace0-022691e843f2}_LOCALMFG&0000) is the HWID of the node I created by BluetoothSetLocalServiceInfo() in step 2.

        c) package name, publisher, App ID with my metro APP.

        d) primary category is "others".

        e) Add my metro app to Privileged Application list.

        f) Check "Copy packages to your system's local metadata store", and finish.

    After these actions, the device metadata is created, but the file is not existed in my system's local metadata store(%PROGRAMDATA%\Microsoft\Windows\DeviceMetadataStore\en-US). So, I copy it to %PROGRAMDATA%\Microsoft\Windows\DeviceMetadataStore\en-US as well. However, I use ddodiag.exe to get the log, I can't find any metadatapath property key in it. It seems the metadata package is not installed successfully. Why the metadata package can't be installed? Is it caused by the HWID of the device node is not a real physical device? 



    • Edited by iikolan Wednesday, July 11, 2012 12:44 PM
    Wednesday, July 11, 2012 7:11 AM


All replies

  • Yalan,

    I am looking into this for you.

    Best Wishes - Eric

    Thursday, July 12, 2012 8:20 AM
  • Hi Eric,

    Do you have any suggestions for me?


    • Edited by iikolan Wednesday, July 18, 2012 6:01 AM
    Wednesday, July 18, 2012 6:00 AM
  • Metro style device apps must talk to a driver for a real device.  Is the device external?

    Best Wishes - Eric

    Wednesday, July 18, 2012 8:12 AM
  • Hi Eric,

    I program a metro APP which has a function of FTP (a profile of bluetooth), and I need to use internal L2CAP protocol provided by MS.

    In desktop app, I can use L2CAP protocol by accessing a profile driver which is installed in a device node that is created by BluetoothSetLocalServiceInfo() API.

    This device node is simulated by a real bluetooth device.

    For now, I want to use L2CAP protocol in my metro app, like my desktop app.

    Can my metro device app talk to this driver?

    It it's not, how can my metro app use internal L2CAP of Windows 8?


    Wednesday, July 18, 2012 9:46 AM
  • Yes,

    Your app can talk to your custom blue tooth driver.

    Best Wishes - Eric 

    Wednesday, August 8, 2012 4:47 PM