feat: Logitech K370 keyboard and M240 mouse Bluetooth monitor & auto-pairer with Topmost PIN alert

This commit is contained in:
rl544
2026-10-13 13:00:13 +09:00
commit b345386887
9 changed files with 815 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
[Windows.Devices.Bluetooth.BluetoothLEDevice,Windows.Devices.Bluetooth,ContentType=WindowsRuntime] | Out-Null
$op = [Windows.Devices.Bluetooth.BluetoothLEDevice]::FromBluetoothAddressAsync(232857434550649)
while ($op.Status -eq [Windows.Foundation.AsyncStatus]::Started) { Start-Sleep -Milliseconds 100 }
$dev = $op.GetResults()
Write-Host ("Dev: " + $dev)
if ($dev) {
Write-Host ("ConnectionStatus: " + $dev.ConnectionStatus)
$gattOp = $dev.GetGattServicesAsync([Windows.Devices.Bluetooth.BluetoothCacheMode]::Uncached)
while ($gattOp.Status -eq [Windows.Foundation.AsyncStatus]::Started) { Start-Sleep -Milliseconds 100 }
$gatt = $gattOp.GetResults()
Write-Host ("Gatt status: " + $gatt.Status + " Services count: " + $gatt.Services.Count)
}