bytedreamer / OSDP.Net

A .NET Core control panel implementation of the Open Supervised Device Protocol(OSDP)
Apache License 2.0
47 stars 19 forks source link

Introduce a device discovery capability #107

Closed dxm007 closed 1 year ago

dxm007 commented 1 year ago

Given a presence of a physical PD, add an ability to discover...

  1. Baud rate the PD is configured for
  2. Address the PD is listening on
  3. PDs ID and capabilities
  4. Whether or not it is configured to communicate securely
  5. If secure, whether or not it is using a default setup encryption key

Additional requirements:

  1. Make corresponding changes to the Console project so that we can exercise and demo the discovery capability of the library
  2. As the discovery method will have to sequentially cycle through 0-127 address space (and several possible baud rates) and for each one issue a poll and then wait for a response which may or may not arrive, the caller needs to be able to...
    1. specify response timeout to use for the discovery process
    2. pass in a cancellation handle to interrupt the discovery process
  3. Provide an option for the caller to subscribe for progress notifications so that they can be notified as to what the discovery method is doing

Not part of this work, but what we are thinking down the road...

  1. In console when device is discovered, but we determine that it is using non-default encryption key...
    1. ask the user if they have a security key to use
    2. If they do not have a key, give them the option to reset the device back to factory defaults