Как перейти от последовательного порта к устройству Bluetooth и отключить его - PullRequest
0 голосов
/ 23 апреля 2019

Я использую WMI для запроса последовательных портов, которые подключены через Bluetooth, я получаю объект управления со следующими свойствами:

    Property[Caption] = null
    Property[ClassGuid] = {4d36e978-e325-11ce-bfc1-08002be10318}
    Property[CompatID] = BTHENUM\{00001101-0000-1000-8000-00805f9b34fb}
    Property[CreationClassName] = null
    Property[Description] = Standard Serial over Bluetooth link
    Property[DeviceClass] = PORTS
    Property[DeviceID] = BTHENUM\{00001101-0000-1000-8000-00805F9B34FB}_LOCALMFG&0002\7&2B70A8A8&0&88C626AD9497_C00000000
    Property[DeviceName] = Standard Serial over Bluetooth link
    Property[DevLoader] = null
    Property[DriverDate] = 20060621000000.******+***
    Property[DriverName] = null
    Property[DriverProviderName] = Microsoft
    Property[DriverVersion] = 10.0.15063.0
    Property[FriendlyName] = Standard Serial over Bluetooth link (COM5)
    Property[HardWareID] = BTHENUM\{00001101-0000-1000-8000-00805f9b34fb}_LOCALMFG&0002
    Property[InfName] = bthspp.inf
    Property[InstallDate] = null
    Property[IsSigned] = true
    Property[Location] = null
    Property[Manufacturer] = Microsoft
    Property[Name] = null
    Property[PDO] = \Device\BthModem0
    Property[Signer] = Microsoft Windows
    Property[Started] = null
    Property[StartMode] = null
    Property[Status] = null
    Property[SystemCreationClassName] = null
    Property[SystemName] = null

Что я хотел бы сделать, это найти соответствующее устройство Bluetooth ирасцепить его программно (C # или C ++).Пока мне не удалось найти какой-либо способ сделать это.Удаление портов не приводит к автоматическому разъединению устройства.

Я попытался сопоставить эти свойства со свойствами драйвера устройства BT и не нашел совпадений ...

...