[myahrs+] Restarting device over command line gives CRC errors

Author
Peter
Date
2021-05-18 20:18
Views
391
Hello,

We are using the myhars+ IMU in our devices. In one of our devices, the IMU is sometimes not recognized (does not show up on lsusb or ls /dev/). A simple soft reboot of the PC fixes this problem.
I would like to avoid the slow restart by unbinding and rebinding the IMU USB device. I do this with:

echo '3-1' > /sys/bus/usb/drivers/usb/unbind
sleep 3
echo '3-1' > /sys/bus/usb/drivers/usb/bind

This does seem to re-bind the device, however when I then check the USB output I get the following error:
"~error,ERROR,no crc field in '@'*08"
Is there any way to get past this error without soft rebooting the entire device?

Thanks,

Peter