From 47262ce1e936936e5a640f86377861f8b5bb5fcf Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 12 Jun 2020 01:34:42 +0200 Subject: [PATCH] fix #777 thanks @doegox --- pm3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pm3 b/pm3 index 73f2cac46..59960fe7c 100755 --- a/pm3 +++ b/pm3 @@ -115,7 +115,7 @@ function get_pm3_list_Windows { # Need to look for this first, the call to Win32_serialport "crashes" then native bt serial port. Don't ask why. #BT direct SERIAL PORTS (COM) if $FINDBTRFCOMM; then - for DEV in $(powershell.exe -command "Get-CimInstance -ClassName Win32_PnPEntity | Where-Object Caption -like 'Standard Serial over Bluetooth link (COM*' | Select Name" 2> /dev/null | awk '$0 ~ /COM/{print substr($6,2,4)}'); do + for DEV in $(powershell.exe -command "Get-CimInstance -ClassName Win32_PnPEntity | Where-Object Caption -like 'Standard Serial over Bluetooth link (COM*' | Select Name" 2> /dev/null | awk '$0 ~ /COM/{print substr($6,2,5)}'); do DEV=${DEV/ */} PM3LIST+=("$DEV") if [ ${#PM3LIST[*]} -ge "$N" ]; then @@ -152,7 +152,7 @@ function get_pm3_list_WSL { # Need to look for this first, the call to Win32_serialport "crashes" then native bt serial port. Don't ask why. #BT direct SERIAL PORTS (COM) if $FINDBTRFCOMM; then - for DEV in $(powershell.exe -command "Get-CimInstance -ClassName Win32_PnPEntity | Where-Object Caption -like 'Standard Serial over Bluetooth link (COM*' | Select Name" 2> /dev/null | awk '$0 ~ /COM/{print substr($6,2,4)}'); do + for DEV in $(powershell.exe -command "Get-CimInstance -ClassName Win32_PnPEntity | Where-Object Caption -like 'Standard Serial over Bluetooth link (COM*' | Select Name" 2> /dev/null | awk '$0 ~ /COM/{print substr($6,2,5)}'); do DEV=${DEV/ */} DEV="/dev/ttyS${DEV#COM}"