Once upon a time, Jonathan Ryshpan jonrysh@pacbell.net said:
I have a system with a device (a Davis VantagePro2 weather console) attached to a USB port. When the system starts, the device is visible as /dev/ttyUSB0. A wview server attaches to /dev/ttyUSB0 and runs fine till suddenly the device disappears from /dev/ttyUSB0 and appears as /dev/ttyUSB1, at which time the server fails.
I've had this happen on occasion (not often) with a GPS receiver used for NTP. The reason the reconnected USB device gets a different node/name is that your service is still connected to the old device node, so it can't be reused.
Your service should notice that the serial device went away and exit. I'm not sure if there's a way to have udev run a script or send a signal when a device goes away.