Improve device serial number consistency
nefarius opened this issue · 0 comments
nefarius commented
Currently the hex-encoded MAC address of the remote device is spliced into the Device ID string to enforce uniqueness and consistency. This behaviour changed slightly with the introduction of the DMF_Pdo module. Suggested new design:
- Check the drivers
Parameters
registry key if a sub-key with the hex-encoded device MAC address exists.- If it exists, attempt to read the DWORD value
SerialNo
and assign it to the PDO - If it doesn't exist, find the next free serial, create the key and store the serial in the DWORD value
SerialNo
- If it exists, attempt to read the DWORD value
- Once the device is reconnected, it is ensured to end up in the same slot again by using the registry-cached information.
- Save and restore the slots value as a REG_BINARY in the registry as well to avoid duplicate assignments