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

SDK17.0.2 code wierd thing, code doesn't execute

Hi,

I'm playing 52832 ble_app_hrs_c Central example with latest SDK 17.0.2 and SD7.2.0.

The wierd thing is that after the service discovered, next enable cccd. But nrf_ble_gq_item_add  is  not executing.

See the info below, I put a log just before it, you can see from the RTT viewer that it executed, but the following log "Adding item to the queue...." doesn't show up.

I tried many times, almost crazy, the new SDK use a QUEUE thing that make the code a bit complicate. Is there any benefit for this?

Tks.

  • Notice the dual "<debug>" in the next line? The debug message was lost due to buffer full.

    The queue allows for printing messages in timing sensitive code. I recommend either printing fewer messages or increasing the log buffer size.

  • Hello,

    See the info below, I put a log just before it, you can see from the RTT viewer that it executed, but the following log "Adding item to the queue...." doesn't show up.

    Are you only using the deferred logging option? Have you changed your default logger severity level, since you are using DEBUG level severity for your statements? Are you using a nRF52 Developement Kit, or a custom board?

    I tried many times, almost crazy, the new SDK use a QUEUE thing that make the code a bit complicate. Is there any benefit for this?

    The GATT queue is used to buffer GATT requests to the SoftDevice, so it may process them at a more opportune time.
    This is very useful when frequent requests are made to the SoftDevice.

    Best regards,
    Karl

Related