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.

  • Hello,

    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.

    It does indeed sound very strange to me that copying large folders internally on the windows PC should cause issues with the UART transfers. I will let our pc-ble-driver developers know about this so that they can investigate it further. 

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

    I am glad to hear that you already have found a workaround for this issue.
    I can unfortunately not make any guarantee for when this will be, but I will let you know what our developers say when they have had a chance to look into this!

    Thank you for bringing this to our attention!

    Best regards,
    Karl

  • We have seen this same problem and indeed it seems that under high cpu load this is very easy to reproduce.

    My steps to reproduce:

     * Do write commands in a loop with pc-ble-driver-py which uses pc-ble-driver under the hood

     * At the same time, start doing something CPU intensive, for example compiling some big project with all cores

  • Thank you for letting us know that this affects you too. I have notified the developers about this as well.
    You could try to implement the fix described by mkincaid in their initial ticket and see if this resolves your issue - just note that we have not confirmed this to be a workaround internally yet.

    Best regards,
    Karl

  • I tested this kind of fix, built pc-ble-driver-py with the fix and it indeed seems to fix the problem in our use case.

    Do you have any estimate when could we get new pc-ble-driver and pc-ble-driver-py releases with the fix?

  • Matias Karhumaa said:
    I tested this kind of fix, built pc-ble-driver-py with the fix and it indeed seems to fix the problem in our use case.

    I am happy to hear that this seems to resolve your issue.

    Matias Karhumaa said:
    Do you have any estimate when could we get new pc-ble-driver and pc-ble-driver-py releases with the fix?

    We may not discuss future releases or roadmaps here on DevZone, but if you have questions about this I recommend that you reach out to your Regional Sales Manager (RSM) with these questions.
    If you do not know who your RSM is please send me a direct message with your location so that I may provide you with their contact information.

    Best regards,
    Karl

Related