BeagleBone - Ubuntu 12.04 - sr: Rejecting I/O to Offline Device

Hey all,

I’ve attached a Huawei E372 USB modem to the Beagle, and it works great. I have a simple setup with a sensor being fed to an Arduino, through a 3.3v regulator to UART 5 on the Beagle. The setup runs great for hours and hours, but once the 12 - 16 hour mark hits, all of a sudden the Huawei becomes unresponsive and dmesg output continually prints:

sr: Rejecting I/O to offline device.

Once I reboot the Beagle everything returns to normal, and I can obviously poll the dmesg output looking for this message and reboot, but I’m curious why this is happening. General Googling has shown that this message typically shows up for users (not for Beagle users) when they first insert the USB device, not after a long period of use.

The power to the BeagleBone is being supplied from a benchtop power supply, and it has ample amperage to draw what it needs.

Any suggestions?

This could be the result of the modem going offline it’s self. There might be some kind of internal memory leak or causes a crash. Not a solution but I had the though.

Good luck

Cheers,

Gregg

sr: Rejecting I/O to offline device.

I had the same problem with an Huawei E122 and a Beagleboard xM: after a few hours, it stopped working and gave the same message.

That "sr" is related to "disk emulation" that those USB-devices show at boot (the "option" kernel module and the "usb_modeswitch" activate the modem section; I had to switch from Angstrom to Ubuntu because Angstrom Linux kernel does not yet include the "option.ko" module), meaning that the USB peripheral has been reset. In my case it was actually a power problem.

Yeah I tracked down that it was the CD-ROM auto-run that was causing the problem.

I ran a test yesterday where I did:

eject /dev/sr0
sdparm --command=eject /dev/sr0

eject /dev/sg0
sdparm --command=eject /dev/sg0

eject /dev/sg1
sdparm --command=eject /dev/sg1

And I did this before the USB mode switch occurs. So far I have about 16 hours of run time and no issues. I hope this fixes it.