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