- if (serial_write_blocking(serial, "*IDN?\r\n", 7) == -1) {
- sr_err("Unable to send identification string: %s.",
- strerror(errno));
+ if (serial_write_blocking(serial, "*IDN?\r\n", 7, SERIAL_WRITE_TIMEOUT_MS) < 7) {
+ sr_err("Unable to send identification string.");