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

Internal State changes of the SoftDevice

Hello,

I am wondering how the Softdevice works internally with state changes because that's important for error handling. Here's an example:

Let's say the Softdevice is Advertising and at the same time in a connection. Then it first receives a packet through a connection and right after that another Central answers to one of its advertising packets. Now there are two events in the event buffer: the packet received event and another event that that informs about the connection. If I process the first event and call sd_ble_gap_adv_stop, what will happen? Has the Softdevice changed its state internally and will give me INVALID_STATE or does it change states according to the current event in the buffer?

Thanks :-)

Parents
  • I am sorry, i do not know what i was thinking, maybe still have not booted up from the weekend, The answer I gave you is absolutely rubbish. Again sorry for that. You will get NRF_ERROR_INVALID_STATE error because there is no advertising state inside softdevice. You were right.

Reply
  • I am sorry, i do not know what i was thinking, maybe still have not booted up from the weekend, The answer I gave you is absolutely rubbish. Again sorry for that. You will get NRF_ERROR_INVALID_STATE error because there is no advertising state inside softdevice. You were right.

Children