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

Queued message count at start of Connection Interval

If we want to make certain that a particular message goes first on a connection interval. Is there a way to check that there is none already internally queued?

Is this possible? Pseudo code below

app_ble_radio_notification_handler (active)

    if active

         if 0 == queued_tx_messages()

             queue_message(handle)

The reason I'm asking is because we can control the messages that we synchronously send to Central but messages that are generated by Central, example read request of a particular characteristic, will generate an internal response that will be transparent to peripheral.

Parents
  • Hello,

    I'm afraid this is not something you can control as a Bluetooth connection events are being started by the GAP Central. The internal Softdevice protocol queue isn't exposed to the application either.

    I may be able to provide some other suggestions, but I think would need to understand the background for this requirement first.

  • Hi,

    There is a message that on a particular connection intervals we need to be able to guarantee that it will go first, ahead of any other message ... is there any way to queue a message to the HEAD of the FIFO or only way to insert is to the TAIL?

    We have used PPI to get access to the NRF_RADIO->EVENTS_END and once we get to the RADIO_STATE_STATE_TxDisable == NRF_RADIO->STATE

    All we do know is that a given messages has made it all the way out to the air, but we not have any context about which one is the one that made it out (which handle) ... so for us TWO possible solutions (perhaps you have more)

    #1 Get context as to what message did go out when we get the RADIO_STATE_STATE_TxDisable == NRF_RADIO->STATE state (timing is very very important)

    #2 Be able to guarantee that a particular message gets in front of the transmit queue once the Connectoin interval is about to start.

Reply
  • Hi,

    There is a message that on a particular connection intervals we need to be able to guarantee that it will go first, ahead of any other message ... is there any way to queue a message to the HEAD of the FIFO or only way to insert is to the TAIL?

    We have used PPI to get access to the NRF_RADIO->EVENTS_END and once we get to the RADIO_STATE_STATE_TxDisable == NRF_RADIO->STATE

    All we do know is that a given messages has made it all the way out to the air, but we not have any context about which one is the one that made it out (which handle) ... so for us TWO possible solutions (perhaps you have more)

    #1 Get context as to what message did go out when we get the RADIO_STATE_STATE_TxDisable == NRF_RADIO->STATE state (timing is very very important)

    #2 Be able to guarantee that a particular message gets in front of the transmit queue once the Connectoin interval is about to start.

Children
Related