+ msleep(1000); // wait for OS to detect device disconnect.
+
+ bool opened = OpenProxmark(serial_port_name, true, 120); // wait for 2 minutes
+ if (opened) {
+ fprintf(stderr," Found.\n");
+ return 0;
+ } else {
+ fprintf(stderr,"Error: Proxmark not found.\n");
+ return -1;
+ }