The application will run for many hours without a detach, and then we will see several over a few hours. In extreme cases, the Phidgets will not re-attach, and so our data collection halts.
Having turned on Phidgets logging, we see the following types of entries:
Code: Select all
ERR: ReadThread exiting - unexpected timeout (could be an ESD event)
WARN: PHIDGET_USB_ERROR_FLAG is set - cycling device through a detach
WARN: PHIDGET_USB_ERROR_FLAG is set - resetting device.
ERR: WriteThread exiting - CPhidget_write returned : 3
INFO: New device in CUSBBuildList: 1/24
INFO: Using Control Endpoint for Host->Device communication.
INFO: WriteThread running
INFO: ReadThread running
When the detach events occur, they do so typically while the RPi is doing I/O, either to the network (we use a wired connection) or to the SD card.
The implication from the error log seems to be that the detach events are caused by electomagnetic interference. We have tried situating the Phidgets far away from the RPi (a few feet), but this did not help.