]> sigrok.org Git - libsigrok.git/commit
rdtech-tc: avoid too eager request retransmission
authorGerhard Sittig <redacted>
Sun, 19 Mar 2023 18:21:04 +0000 (19:21 +0100)
committerGerhard Sittig <redacted>
Sun, 19 Mar 2023 21:40:08 +0000 (22:40 +0100)
commit66d58fcb9fdd3a167b8fc6ca19f7f0a007c2ee8f
tree97d374cae2e8baa4b287e5e48425d55fd16b2f85
parentfde2cf218bf01ed4f0282accf855a2e4384d2f79
rdtech-tc: avoid too eager request retransmission

The sequence of a scan/probe (which exchanges exactly one request and
response pair) before an acquisition (which requests another response,
then keeps re-requesting periodically) resulted in the transmission of
more requests shortly after a request was sent and before any response
started receiving at all. Which then resulted in unexpected lengths and
failed consistency checks for the receive data. This condition stuck
because rdtech-tc does not support the re-synchronization to the input
stream as rdtech-um does.

Defer transmission of requests until after receive data was seen (or
an acquisition start forces their transmission). Tested by repeatedly
running:

  $ sigrok-cli -d rdtech-tc:conn=bt/dialog/$MAC --continuous
src/hardware/rdtech-tc/protocol.c
src/hardware/rdtech-tc/protocol.h