/dev/ttyUSB0 + "broken pipe": how to force re-discovery?
Hello,
I'm operating an EVB (evaluation board) through a
USB<=>SERIAL bridge (TUSB3410) and PerlTk script
which sends/receives message strings to/from the EVB.
The USB bridge is detected as /dev/ttyUSB*. Once in a while
the EVB (or the firmware on it responsible for the
communication) got "stuck" and on the LINUX side I'm getting
the "broken pipe" messages when attempting "sysread/syswrite".
If I go to the EVB, disconnect the USB connector and re-connect it
I cause the device first to disappear then to be re-discovered
and communication resuls. But I'm looking for some solution that
can be done programmatically, without me physically going to the
EVB and disconnecting and reconnecting the USB.
Can I somehow "force" linux to disconnect a stuck USB device and
to re-discover it again, as if the USB connector had been
disconnected and reconnected again?
TIA for any help,
|