bluetooth: mesh: pb_adv: Fix resending Generic Transaction Ack PDU

The Generic Provisioning protocol requires that a transaction must be
acknowledged before the next Generic Provisioning PDU is processed
(section 5.3.3, MshPRT_v1.1).

In the current PB-ADV implementation, if there is an ongoing transaction
(link.tx.adv points to a valid advertisement), any received Generic
Provisioning Start and Continuation PDUs are ignored.

This creates a scenario where a remote device misses the Transaction
Acknowledgment PDU and retransmits the last PDUs, but they are ignored
by the local device because the local device has already started sending
the next Provisioning PDU.

In particular, in the observed failure, the Provisioner missed the
Generic Transaction Acknowledgment PDU during the transmission of the
Provisioning Data PDU.

This commit modifies the processing logic for Generic Provisioning Start
and Continuation PDUs by checking if the received PDU has already been
received. If so, it attempts to re-send the Generic Transaction
Acknowledgment PDU.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
1 file changed