In circumstances where the host system running gpsd does not implement udev or similar (for example, Android), or where the gps is connected via a bus that does not generate plug events, when a gps is removed and later re-added, gpsd may lose track of that device and be unable to re-add it.
Specifically, when gpsd observes that a device is not present, it removes that device from the list of attached devices.
To solve this, I have the following patch:
When a client connects to gpsd, if the device list is empty, and if there were devices specified on the commandline, then gpsd will attempt to re-add those devices to the list.