Change for using device by-id

I have made some small changes to allow using serial device by-id.
This is helpful to select the devices uniquely.

rnodeconf.py /dev/serial/by-id/usb-1a86_USB_Single_Serial_537D019596-if00 --autoinstall
pull/15/head
SebastianObi 2022-07-25 21:03:03 +02:00 committed by GitHub
parent 5755e722f9
commit 0955ebc715
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 8 deletions

View File

@ -931,12 +931,11 @@ def main():
selected_port = port
if selected_port == None:
print("Could not find specified port "+str(args.port)+", exiting now")
exit()
port_path = selected_port.device
port_product = selected_port.product
port_serialno = selected_port.serial_number
port_path = args.port
else:
port_path = selected_port.device
port_product = selected_port.product
port_serialno = selected_port.serial_number
print("\nUsing device on "+str(port_path))
@ -1259,7 +1258,7 @@ def main():
print("summary before proceeding. In the next step, the device will be flashed and")
print("provisioned, so make that you are satisfied with your choices.\n")
print("Serial port : "+str(selected_port.device))
print("Serial port : "+str(port_path))
print("Device type : "+str(products[selected_product])+" "+str(models[selected_model][3]))
print("Platform : "+str(platforms[selected_platform]))
print("Device MCU : "+str(mcus[selected_mcu]))
@ -1275,7 +1274,7 @@ def main():
exit()
args.key = True
args.port = selected_port.device
args.port = port_path
args.platform = selected_platform
args.hwrev = 1
mapped_model = selected_model