Intermittent Error code: 32773 (0x8005, NRF_ERROR_SD_RPC_NO_RESPONSE) when using pc-ble-driver

We use the pc-ble-driver with the nRF52840-Dongle and we experience intermittent issues where communication with the dongle will just stop and result in a NRF_ERROR_SD_RPC_NO_RESPONSE error.

We found we could reproduce the problem by forcing continuous UART traffic and then copying large folders on the PC to change the timing of things.

The issue ended up being how sequence numbers were tracked in the h5 transport layer:

    pc-ble-driver\src\common\transport\h5_transport.cpp

const auto err_code = nextTransportLayer->send(lastPacket);

if (err_code != NRF_SUCCESS)
{
    return err_code;
}

// The sequence number before is saved off after the message is sent and
// we periodically see the sequence number increment before we save it off.
uint8_t seqNumBefore;
{
    std::unique_lock<std::recursive_mutex> seqNumLck(seqNumMutex);
    seqNumBefore = seqNum;
}

Saving the before sequence number before the send call resulted in our intermittent issues going away.

Parents Reply Children
No Data
Related