locked
How to send command to bluetooth driver through HCI RRS feed

  • Question

  • I know I'm able to send vendor-specific command using DeviceIoControl call with IOCTL_BTH_HCI_VENDOR_COMMAND. But how can I send standard bluetooth command, for example LE Set Scan Enable with OpCode 0x200C? I didn't find anything in docs about it.
    • Moved by Baron Bi Thursday, October 25, 2018 5:53 AM
    Monday, October 8, 2018 2:40 PM

All replies

  • Hi,

    thanks for posting here.

    >>I know I'm able to send vendor-specific command using DeviceIoControl call with IOCTL_BTH_HCI_VENDOR_COMMAND. But how can I send standard bluetooth command, for example LE Set Scan Enable with OpCode 0x200C? I didn't find anything in docs about it.

    Here is a similar case for you as a reference.

    https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/e09e8b70-e243-4a63-a3c3-7590849e43b7/bluetooth-ioctlbthhcivendorcommand-always-fails-with-1314

    One thing you should notice is that the process that submits IOCTL_BTH_HCI_VENDOR_COMMAND must have the SE_LOAD_DRIVER_NAME privilege. A process that is running in the system or an administrator context can elevate its privilege by using the SDK LookupPrivilegeValue and AdjustTokenPrivileges functions.

    Besides, for IOCTL_BTH_HCI_VENDOR_COMMAND issues, you'd better ask in this forum below for better support.

    https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?forum=wdk

    Hope this could be help of you.

    Best Regards,

    Baron Bi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, October 9, 2018 1:43 AM