+ /*
+ * First stop potentially running monitoring and wait for 50ms before
+ * next command can be sent.
+ */
+ if (serial_write_blocking(serial, CMD_MONITOR_STOP,
+ strlen(CMD_MONITOR_STOP), serial_timeout(serial,
+ strlen(CMD_MONITOR_STOP))) < (int)strlen(CMD_MONITOR_STOP)) {
+ sr_dbg("Unable to write while probing for hardware.");
+ serial_close(serial);
+ return NULL;
+ }
+ g_usleep(50 * 1000);