pm3 serial detection on OS X more robust

Official firmwares < 2018.02 had a different USB Model string (PM3<>proxmark3).
Better to detect based on the vendor string (proxmark.org) which is more stable,
to ease reflashing devices with old firmwares to the RDV4 firmware.
This commit is contained in:
Philippe Teuwen 2019-11-18 13:11:28 +01:00
commit 5e85d53c3e

4
pm3
View file

@ -29,7 +29,9 @@ function get_pm3_list_Linux {
function get_pm3_list_macOS { function get_pm3_list_macOS {
PM3LIST=() PM3LIST=()
for DEV in $(ioreg -r -n proxmark3 -l|awk -F '"' '/IODialinDevice/{print $4}'); do for DEV in $(ioreg -r -c "IOUSBHostDevice" -l|awk -F '"' '
$2=="USB Vendor Name"{b=($4=="proxmark.org")}
b==1 && $2=="IODialinDevice"{print $4}'); do
PM3LIST+=("$DEV") PM3LIST+=("$DEV")
done done
} }