<?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>How to get a notification of ble event</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4609/how-to-get-a-notification-of-ble-event</link><description>Hi, 
 I want to get a notification when the BLE event is started, in order to start a timer just after.
How can I get that? 
 I want to clarify my question :
My board is acting like a broadcaster. Every second, it emits by BLE communication a packet</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Dec 2014 08:42:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4609/how-to-get-a-notification-of-ble-event" /><item><title>RE: How to get a notification of ble event</title><link>https://devzone.nordicsemi.com/thread/16325?ContentTypeID=1</link><pubDate>Thu, 04 Dec 2014 08:42:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cb49c8c-4474-4d05-8843-14835454b37a</guid><dc:creator>ting&amp;#178;</dc:creator><description>&lt;p&gt;The board is communication in BLE_GAP_ADV_TYPE_ADV_NONCONN_IND (non connectable Mode).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get a notification of ble event</title><link>https://devzone.nordicsemi.com/thread/16327?ContentTypeID=1</link><pubDate>Thu, 04 Dec 2014 08:26:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a087b44d-5bab-4654-84d9-35b0702e4797</guid><dc:creator>ting&amp;#178;</dc:creator><description>&lt;p&gt;I tried this. It&amp;#39;s working. But it is not what I exactly want.
My  BLE event is just started once, and all packets are sent by interruption every second. That&amp;#39;s why I did not get the &amp;quot;BLE_GAP_EVT_DECONNECTED&amp;quot;, because the event is always connected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get a notification of ble event</title><link>https://devzone.nordicsemi.com/thread/16330?ContentTypeID=1</link><pubDate>Tue, 02 Dec 2014 09:00:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b73084bf-c637-4b85-ab38-fdccebc6031b</guid><dc:creator>ting&amp;#178;</dc:creator><description>&lt;p&gt;I did this too, but it did not work.
When I did this, I checked that the &amp;quot;softdevice_ble_evt_handler_set(ble_evt_dispatch)&amp;quot; initialization  is successful. But the function &amp;quot;ble_evt_dispatch&amp;quot; is never called.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get a notification of ble event</title><link>https://devzone.nordicsemi.com/thread/16329?ContentTypeID=1</link><pubDate>Mon, 01 Dec 2014 18:05:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e6ed9ef-e57b-48a0-beca-17652b264267</guid><dc:creator>Chaiwat Sungkhobol</dc:creator><description>&lt;p&gt;By using that function it should have call your function.&lt;br /&gt;
From the Example code
err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch);
Which calls
static void ble_evt_dispatch(ble_evt_t * p_ble_evt)
And that is where it gets process and that is were you should have been able to do it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get a notification of ble event</title><link>https://devzone.nordicsemi.com/thread/16328?ContentTypeID=1</link><pubDate>Thu, 27 Nov 2014 12:50:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6867fc99-0fc8-4ea0-9768-2df2115320f7</guid><dc:creator>ting&amp;#178;</dc:creator><description>&lt;p&gt;thank you for you answer!
I am using &amp;quot;softdevice_ble_evt_handler_set()&amp;quot;, but it is not working.
What i am trying to do is to turn on a led, every time there is a BLE communication interruption.&lt;/p&gt;
&lt;p&gt;Solution found:
[https://devzone.nordicsemi.com/question/21796/is-there-a-way-to-detect-or-be-notified-when-an-advertisment-is-about-to-be-sent/]&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get a notification of ble event</title><link>https://devzone.nordicsemi.com/thread/16326?ContentTypeID=1</link><pubDate>Wed, 26 Nov 2014 23:16:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a44dffad-cd43-45f0-ae00-a53eb65b722e</guid><dc:creator>Chaiwat Sungkhobol</dc:creator><description>&lt;p&gt;I would use &amp;quot;softdevice_ble_evt_handler_set()&amp;quot; and put your function for the argument.&lt;br /&gt;
It should call that when some BLE event happen.&lt;/p&gt;
&lt;p&gt;You can check the example project at the ble_stack_init.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get a notification of ble event</title><link>https://devzone.nordicsemi.com/thread/16324?ContentTypeID=1</link><pubDate>Wed, 26 Nov 2014 23:09:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66c26515-2a0e-4af4-affa-e71208a118b2</guid><dc:creator>Chaiwat Sungkhobol</dc:creator><description>&lt;p&gt;What BLE event are you looking for?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>