USB Device needs to be unplugged and plugged in to work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I posted this question in Stack Overflow, and somebody recommended that I post it here.

I'm using an IMU (Inertial Measurement Unit) which connects via USB. I have to unplug it and plug it again to be able to use it. The IMU is used to get acceleration and positioning data (among other things). I have an example driver code from the manufacturer (I'll call it driver A), and another driver I found on github (driver B). Both have the same problem.

If I plug in the device everything works. If the computer starts, and the IMU is already plugged in, I have to unplug it and plug it again. This is unacceptable because the IMU will be used in a robot, so we cannot just unplug it every time the robot starts.

With driver A I get some basic information from the device like model number, but it freezes when I request data. With driver B, it just won't even start. Until, like I said, I unplug it and plug it again and then everything works.

I found this code to "reset" a usb device via the OS (I'm using linux, ubuntu 14.04). When I run it dmesg gives the following output:

[ 2443.165898] usb 3-1: reset full-speed USB device number 2 using xhci_hcd
[ 2443.182281] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880036bed700
[ 2443.182290] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff880036bed740
[ 2443.182295] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff88003687e600
[ 2443.182310] usb 3-1: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[ 2443.182695] cdc_acm 3-1:1.0: This device cannot do calls on its own. It is not a modem.
[ 2443.182725] cdc_acm 3-1:1.0: ttyACM0: USB ACM device 

If I run lsusb, the IMU is shown. But the IMU is still not working. The blinking of the led on its cover says its in idle mode as it was before. I still have to manually unplug it and plug it again for it to work. Maybe is a power issue? Has anyone reading this have had issues like this before?

This data is to be published using ROS if that is of any help. The device is a microstrain 3DM-GX4-25 IMU.

EDIT: When I say I have two drivers, what I mean is that I have two programs that can read data from the device. They may not necessarily be in a "driver format". I'm going over this right now.


Jose Colmenares.
Software Engineer.
Dynamic Legged Systems, Advanced Robotics. 
Italian Institute of Technology.
+39 010 717 818 18--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux