- // check result of uart opening
- if (sp == INVALID_SERIAL_PORT) {
- printf("ERROR: invalid serial port\n");
- usb_present = false;
- } else if (sp == CLAIMED_SERIAL_PORT) {
- printf("ERROR: serial port is claimed by another process\n");
- usb_present = false;
- } else {
- usb_present = true;
- }
+ // try to open USB connection to Proxmark
+ usb_present = OpenProxmark(argv[1], waitCOMPort, 20);