<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Internal State changes of the SoftDevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11654/internal-state-changes-of-the-softdevice</link><description>Hello, 
 I am wondering how the Softdevice works internally with state changes because that&amp;#39;s important for error handling. Here&amp;#39;s an example: 
 Let&amp;#39;s say the Softdevice is Advertising and at the same time in a connection. Then it first receives a packet</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Feb 2016 16:04:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11654/internal-state-changes-of-the-softdevice" /><item><title>RE: Internal State changes of the SoftDevice</title><link>https://devzone.nordicsemi.com/thread/44044?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2016 16:04:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:490f6b34-880e-44fc-a6aa-d6b3e4f7e072</guid><dc:creator>Marius Heil</dc:creator><description>&lt;p&gt;Alright, thanks. That was what I was expecting to hear :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Internal State changes of the SoftDevice</title><link>https://devzone.nordicsemi.com/thread/44043?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2016 10:41:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d693e409-6d17-4501-8784-95eff880ed13</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;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.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Internal State changes of the SoftDevice</title><link>https://devzone.nordicsemi.com/thread/44041?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2016 10:33:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6a4a29b-db6a-4c72-86c0-01ff3ee8eb1a</guid><dc:creator>Marius Heil</dc:creator><description>&lt;p&gt;Mhh, but if it does not have anything to do with the event Buffer, then I would expect to get an INVALID_state error, because it is not in the advertising state anymore. As soon as It enters the connection it leaves the advertising state if I understand your answer correctly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Internal State changes of the SoftDevice</title><link>https://devzone.nordicsemi.com/thread/44042?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2016 09:30:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0eac6a2c-e303-42b4-ac21-ff31e5612c27</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The softdevice maintains event slots for all type of air-traffic. And these events are differentiated from the handles. The scenario you mentioned is quite normal and happens in most multi role examples in SDK. When you call sd_ble_gap_adv_stop, the softdevice will mark its advertising state to stop. That means the next allocated slot(s) for the advertisement ar all cancelled. It does not have any relation with what is in in the event buffer.&lt;/p&gt;
&lt;p&gt;Also I do not think we are allowed to discuss in deep details about how softdevice works internally. All I can say is that the scenario you mentioned is handled very gracefully.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>