Bluetooth Application development using Microsoft XP SP2 RRS feed

  • Question

  • I am in process of finalizing way to create application for Bluetooth. I would need to use following profiles apart from service discovery : HFP, A2DP , AVRCP ,MAP.

    However my query is Can we really access profiles using Microsoft XP SP2.

    1. IS there any support for profiles in SP2?


    2. If i get profiles driver from some other vendor as well, is ther a standard way to communicate with these profiles?


    3. I have seen that HFP communication can be done using AT commands in WinCE. However is it possible in Windows XP as well?

    Please answer my query, i am totally stuck and lost. Not founding anything relevant on this.

    Monday, March 14, 2011 10:01 AM

All replies

  • I posted this to your question at stackoverflow:

    Bth_FAQ.docx (http://msdn.microsoft.com/en-us/windows/hardware/gg487349.aspx)

    What is new in Windows Vista?


    • Synchronous connection-oriented (SCO) link support. This support is necessary for the headset and hands-free profiles.

    • Kernel-mode device driver interface (DDI) support for Logical Link Control and Adaptation Protocol (L2CAP), Service Discovery Protocol (SDP), and SCO.


    So, in XP there's no API for L2CAP, and apparently there is no SCO support at all. So most of the profiles you list there can't be implemented. :-( MAP is ok as it uses GOEP (i.e. RFCOMM) afaik.

    Other stacks may have support: either support for the profiles in-box, and/or an API. Widcomm/Broadcom has API support for L2CAP and apparently Audio too, don't know abut build-in profile support. BlueSoleil doesn't have a L2CAP API but does have built-in support for various of the audio profiles. I don't know much about Toshiba.

    http://www.alanjmcf.me.uk/ Please follow-up in the newsgroup. If I help, mark the question answered
    Tuesday, March 15, 2011 8:18 PM
  • Thanks a lot for the reply Alan.On the pointers you have provided i will do some study and then get back to discussion.

    I have some basic doubts and i am new to bluetooth as well.

    For eg: As you say MAP uses GOEP so we might be able to implement in XP. But which are the functions/API's we need to use for this to be implemented.

    As far as i have seen in MSDN , there are very limited API's or winsock functions mainly for service and discovery.

    Please help.

    Wednesday, March 16, 2011 4:43 AM
  • Yup, there is no presentation/application layer APIs on Windows.  There's good support for RFCOMM, and for SDP.  Device discovery is ok in XP and good in Vista etc.

    I provide a managed library called 32feet.NET for Bluetooth/OBEX etc, http://32feet.codeplex.com/

    We have a partner library Brecham.Obex (http://inthehand.co.uk/forums/72.aspx http://inthehand.co.uk/files/folders/objectexchange/default.aspx) that provides very complete and flexible support for OBEX/GOEP so could be used to implement MAP -- and if not Andy will be willing to add any features needed.

    http://www.alanjmcf.me.uk/ Please follow-up in the newsgroup. If I help, mark the question answered
    Wednesday, March 16, 2011 4:58 PM
  • Thanks a lot Alan, your links and library seems very useful.

    However as you say that XP  has a very good support for RFComm. So when 2 devices pair:

    1. Does Automatically a RFComm link is created between the 2 devices if both the devices support RFComm?

    2. Once a RFComm link is created then if we want to use Dial Up Network. What would be step further? How will the dial up network be created? Are there some API's or is it automatically created.

    Basically i want to understand now if XP support RFComm then how Dial Up Network profile is further implemented.

    Thursday, March 17, 2011 12:27 PM
  • An RFCOMM connection is made if an application on one of the devices request a connection.  You realise that RFCOMM is the top level connection, below it are L2CAP, and ACL/baseband connections.

    I don't know if there is API support for starting a DUN connection -- it might be through RAS (remote access services) that one says: connect now.

    Anyway, through the UI I presume (I'm not in a position to test this at the moment) one configures the DUN connection and then tells it to connect.  At that point the DUN application will ask for a Winsock connection to {DeviceAddress=xxxx, Service=Dun} and a SDP query will be done to find the RFCOMM channel number and then the RFCOMM connection will be made.

    http://www.alanjmcf.me.uk/ Please follow-up in the newsgroup. If I help, mark the question answered
    Friday, March 18, 2011 12:13 PM