Closed sidcha closed 3 months ago
This issue been addressed in 182f049e0791b73a886b494a77f3b6551da18610:
cp: Introduce "probe" state for PDs that don't respond
When a PD does not respond, CP pushes it to offline state and then
retries after a timeout. This timeout is exponentially increased to not
POLL devices that have been plugged out of the socket entirely. This was
working fine but some users don't like the random SC discards due to
some PDs not responding withing the 200ms time frame per-packet. This is
especially pronounced when there is a file transfer operation in-flight.
Apart form those details, the OSDP Specification says the CP has to
maintain the PD to be online for up to 8 seconds or inactivity before
marking the PD as unresponsive.
This patch adds support for a new state in which a PD can be: probe. In
this state, the CP is probing to see if the PD will become active again
by sending the last command repeatedly for 8 seconds and then gives up
and marks the PD as offline. This also means that we can get rid of the
exponential back-off that was employed in this path before.
Discussed in https://github.com/goToMain/libosdp/discussions/186