我有一个具有三个SPP端口的设备。 通过btpair命令(http://bluetoothinstaller.com/bluetooth-command-line-tools/)与设备配对时,它没有启用这三个端口。 然后,我运行btcom命令激活SPP端口,但它仅启用一个端口。
我不愿意使用btcom。如果可以激活所有SPP端口,或者可以查明要启用的特定端口,则将使用任何方式。 绝对可以在GUI中执行此操作,但是我想在命令行或通过Python脚本执行此操作。
EDIT1:
我从注册表中找到了这个。它显示“ C00000001”为“启用”。我可以在其他字段中更改“已启用”,但不适用于启用SPP端口。有什么方法可以应用更改吗?:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Devices\012233445566\ServicesFor34f64b974de2\{00001101-0000-1000-8000-00805f9b34fb}]
"Instance"=dword:00000003
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Devices\012233445566\ServicesFor34f64b974de2\{00001101-0000-1000-8000-00805f9b34fb}\C00000000]
"PriLangServiceName"=hex:31,20,57,49,52,45,20,43,4f,4d,20,50,6f,72,74,20,34,00,\
...
00,00,00,00,00,00,00,00,00,00,00,00,00
"DeviceString"=""
"CounterInstanceId"=dword:00000000
"Enabled"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Devices\012233445566\ServicesFor34f64b974de2\{00001101-0000-1000-8000-00805f9b34fb}\C00000001]
"PriLangServiceName"=hex:44,45,42,55,47,20,43,4f,4d,20,50,6f,72,74,20,32,00,00,\
...
00,00,00,00,00,00,00,00,00,00,00,00,00
"DeviceString"=""
"CounterInstanceId"=dword:00000001
**"Enabled"=dword:00000001**
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTHPORT\Parameters\Devices\012233445566\ServicesFor34f64b974de2\{00001101-0000-1000-8000-00805f9b34fb}\C00000002]
"PriLangServiceName"=hex:47,50,53,20,43,4f,4d,20,50,6f,72,74,20,31,00,00,00,00,\
...
00,00,00,00,00,00,00,00,00,00,00,00,00
"DeviceString"=""
"CounterInstanceId"=dword:00000002
"Enabled"=dword:00000000