mirror of
https://github.com/agessaman/meshcore-packet-capture.git
synced 2026-04-20 23:23:37 +00:00
add ble pairing helper to ps1 installer
This commit is contained in:
parent
3db7fbc75e
commit
ff1b1bd8ca
1 changed files with 24 additions and 1 deletions
|
|
@ -321,6 +321,29 @@ function Start-Installation {
|
|||
|
||||
if ($script:SelectedBleDevice) {
|
||||
Write-Host "SUCCESS: BLE device configured: $script:SelectedBleName ($script:SelectedBleDevice)" -ForegroundColor Green
|
||||
|
||||
# Attempt BLE pairing
|
||||
Write-Host ""
|
||||
Write-Host "INFO: Attempting to pair with BLE device..." -ForegroundColor Blue
|
||||
Write-Host "INFO: This may require user interaction on the device" -ForegroundColor Blue
|
||||
|
||||
try {
|
||||
$blePairingScript = Join-Path $InstallDir "ble_pairing_helper.py"
|
||||
$pairingResult = & python $blePairingScript $script:SelectedBleDevice 2>&1
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host "SUCCESS: BLE device paired successfully" -ForegroundColor Green
|
||||
}
|
||||
else {
|
||||
Write-Host "WARNING: BLE pairing failed or was skipped" -ForegroundColor Yellow
|
||||
Write-Host "INFO: You may need to pair manually or the device may already be paired" -ForegroundColor Blue
|
||||
Write-Host "INFO: Pairing output: $pairingResult" -ForegroundColor Blue
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "WARNING: BLE pairing failed: $($_.Exception.Message)" -ForegroundColor Yellow
|
||||
Write-Host "INFO: You may need to pair the device manually" -ForegroundColor Blue
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "WARNING: No BLE device configured" -ForegroundColor Yellow
|
||||
|
|
@ -516,7 +539,7 @@ PACKETCAPTURE_MQTT1_KEEPALIVE=120
|
|||
Write-Host ""
|
||||
Write-Host "Configuration file: $InstallDir\.env.local"
|
||||
Write-Host ""
|
||||
Write-Host "To run manually: cd $InstallDir && .\venv\Scripts\python.exe packet_capture.py"
|
||||
Write-Host "To run manually: cd $InstallDir; .\venv\Scripts\python.exe packet_capture.py"
|
||||
Write-Host ""
|
||||
Write-Host "SUCCESS: Installation complete!" -ForegroundColor Green
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue