locked
Bluetooth intermittent connection issue: No such service is known

    Question

  • Hi all,

    I am having an intermittent issue with the Bluetooth RFCOMM API for Windows store apps. I have 2 devices that normally connect fine, but after some amount of time the following call just stops working:

    await RfcommDeviceService.FromIdAsync(chatServiceInfo.Id);

    and throws the following exception:

    No such service is known. The service cannot be found in the specified name space. (Exception from HRESULT: 0x8007277C)

    The only 2 ways to fix the issue seem to be:

    1. Restart the Bluetooth adapter (going into Change PC Settings on Windows 8 etc.) or
    2. Restart the entire Windows device

    Unfortunately restarting the app alone does not solve the problem. The only other post on the MSDN forums that seemed relevant was this one by nicksav: "RFCOMM API. RfcommDeviceService. Error opening Socket. WinRT" (see post 3)

    Where he ultimately attributed the issue to a bad PC.

    My questions are:

    1. What could be causing this issue, which seems to be at a deeper OS level? As best as I can tell, all of the unmanaged resources are properly unloaded by my app.
    2. Is there any way for my app to rectify it if it does happen?

    Thanks for any help you can provide!

    Tuesday, August 05, 2014 6:38 PM

All replies

  • I think the error is stating the truth. That service doesn't exist.  Have you checked event logs for Bluetooth device notifications?   Also, check the Bluetooth power settings.   Make sure allow the computer to manage the powerstate is turned off:

    Windows Key + X then M to bring up device manager. THen go tot he Bluetooth sections and find the adapter that has power management settings:  Disable the "Allow....." option


    Bret Bentzinger (MSFT) @awehellyeah


    Tuesday, August 05, 2014 9:37 PM
    Moderator
  • Hi Bret,

    The events listed under the "events" tab above do not show anything recent - can you recommend which section or filter in EventViewer I should check? I've made the recommended adjustments to both of my devices (one surface RT and one desktop) and will respond with whether or not the error appears again.

    Thanks!

    Wednesday, August 06, 2014 1:46 AM