-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Labels
Description
Scenario for this problem:
- Host (using min.py) sends some frames to client (which is Arduino with min.c)
- Arduino listens for incoming frames and sends "keep alive" frames to notify host that everything is OK
- At that point Arduino client is restarted (hard-reset)
- Host keeps sending ACK frames for some old seq, client prints "Received spurious ACK" and basically stops working
- Due to lack of "keep alive" frames, Host decides to perform transport_reset() - that resets client, but unfortunately Host keeps sending "spurious ACK"
To fix that I've added self._rn = 0 to _transport_fifo_reset, it seems to work OK, but need to be confirmed by someone with expertise.
def _transport_fifo_reset(self):
self._transport_fifo = []
self._last_received_anything_ms = self._now_ms()
self._last_sent_ack_time_ms = self._now_ms()
self._last_sent_frame_ms = 0
self._last_received_frame_ms = 0
self._sn_min = 0
self._sn_max = 0
self._rn = 0