Allow auto-reconnecting to device after it's reconnected.

Separate pins config into DeviceConfig.
Find devices by serial number.