Cause of System.Exception: The device does not support the command feature. (Exception from HRESULT: 0x8007013C)

WorldOfBasti 136 Reputation points
2024-01-20T23:06:13.5133333+00:00

WARNING! There was an error parsing the document

Hello, I implemented a Gatt server in my UWP application using this documentation: https://learn.microsoft.com/de-de/windows/uwp/devices-sensors/gatt-server
This allows me to use the Windows PC as a peripheral role for Bluetooth Low Energy devices. Everything works as expected for me and many other users. The problem is: I get a lot of mails that some users get the following exception. (Bluetooth is of course supported and the latest drivers are installed. I also tried to check in system settings -> Privacy -> (left below "App permissions“) Other devices if the application is allowed, but without success.) I don't find any useful documentation on this and have no idea why it does work on some and doesn't for other computers. Does anyone have an idea, why this error occurs and what I can do about it? Thanks in advance.

System.Exception: The device does not support the command feature. (Exception from HRESULT: 0x8007013C)
at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21 
at _Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Void*) + Oxbe at _Interop.ForwardComStubs.Stub_6[TThis, TArgO](__ComObject, TArgO, Int32) + 0x5a at MyApp.Helpers.BluetoothManager.<StartService>d_7.MoveNextO + 0x87f

error

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,449 questions
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,276 questions
Universal Windows Platform (UWP)
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,400 questions
{count} votes

Accepted answer
  1. Junjie Zhu - MSFT 17,226 Reputation points Microsoft Vendor
    2024-02-29T01:35:10.9+00:00

    Hi @WorldOfBasti ,

    The property value of Bluetooth radio supports Low Engery Peripheral Role is false, this means the Bluetooth radio hardware on the system does not support LE peripheral role and thus the GATT server APIs cannot be fully used.

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.