This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Understanding NRF_ERROR_BUSY

I am using the s120 soft device v2.2.1 as a center communicating with a peer using a s110 soft device. The peer is a black box an all I have is the documented protocol. The protocol is simple.

  1. Write a command to enable indications on the peer and wait for a Write response from the peer as the indication the command was received. Send the next enable indications Command.
  2. Write a command to a given characteristic on the peer and wait for a Write response followed by an HVX indication as the response to the command that I sent. Send the next Command.

I am basing my implementation on the S120 Heart Rate monitor project and all seem to be working well. From time to time I am receiving a NRF_ERROR_BUSY from sd_ble_gattc_write even though I am waiting for a write request and an HVX indication before sending the next command.

Even though I attempt to resend the command the NRF_ERROR_BUSY status is still reported and the peer disconnects because I am no longer communicating with it. Based on the documentation the soft device is busy processing a message. Is there some way to debug this NRF_ERROR_BUSY status or receive an indication that the soft device is no longer BUSY?

Related