<?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>Radio Notification Context</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63356/radio-notification-context</link><description>Hello, 
 I have a problem using the radio notifications. I use the softdevice V. 15.3.0. 
 I would like to have an interrupt every time I send an advertisement, which I can achieve using: 
 
 While this is working fine on its own, the interrupt is not</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Jul 2020 13:02:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63356/radio-notification-context" /><item><title>RE: Radio Notification Context</title><link>https://devzone.nordicsemi.com/thread/260371?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 13:02:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e40b21a-91e6-4a58-8fd1-8faaa62cf093</guid><dc:creator>LukasKl</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;after trying a bit around I decided to just stop the scanner for some short time and then send the advertisement which gives me the possibility to use the radio notifications.&lt;/p&gt;
&lt;p&gt;Thanks for your help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Notification Context</title><link>https://devzone.nordicsemi.com/thread/259445?ContentTypeID=1</link><pubDate>Fri, 10 Jul 2020 12:44:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e2ffef7-5993-4de0-872c-aed66a006526</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Oh well, I see.. The thing with using radio notifications is that it&amp;#39;s totally agnostic over what happens on the higher layer, it only cares if the radio is Active or not. There isn&amp;#39;t a specific event that is generated when the nRF are advertising. You can always do this indirectly by setting a flag once you&amp;#39;ve started advertising in the application, but it won&amp;#39;t necessarily be precise as the Softdevice has to schedule the task i.e put in the queue and execute it. But it will in most cases work fine &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Notification Context</title><link>https://devzone.nordicsemi.com/thread/259416?ContentTypeID=1</link><pubDate>Fri, 10 Jul 2020 11:38:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abc8cee2-55ce-45d3-8c96-d2b503f3d379</guid><dc:creator>LukasKl</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;After reading the post you sent me I think there was a misunderstanding. I would like to get an interrupt when sending an advertisement, not when sending a notification. I&amp;#39;ve mistaken the two terms, sorry for that.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So the actual question I had was if I can get an interrupt after an advertisement. And I could already do this with&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;ble_radio_notification_init(2, NRF_RADIO_NOTIFICATION_DISTANCE_2680US, interrupt_fun);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But this interrupt also fires when doing a scan. So is there a way to only do this after advertising and not when performing a scan?&lt;/p&gt;
&lt;p&gt;Sorry for my mistake.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Notification Context</title><link>https://devzone.nordicsemi.com/thread/259344?ContentTypeID=1</link><pubDate>Fri, 10 Jul 2020 07:24:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2341feb-d049-40a3-b3f9-bed48dbef6ed</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;See step 3 in our &lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial"&gt;BLE characteristics tutorial&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Notification Context</title><link>https://devzone.nordicsemi.com/thread/259161?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 11:54:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6685360c-7911-43a3-8cec-54cc2ce15c46</guid><dc:creator>LukasKl</dc:creator><description>&lt;p&gt;Sorry I do not get what you mean by &amp;quot;enable notifcations&amp;quot;. Could you please elaborate?&lt;/p&gt;
&lt;p&gt;Edit: If i understand correctly you mean&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ble_radio_notification_init(2, NRF_RADIO_NOTIFICATION_DISTANCE_2680US, NULL);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;which I did indeed initialize.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Notification Context</title><link>https://devzone.nordicsemi.com/thread/259156?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 11:35:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c71f68d2-8dc0-439c-9804-8e9c039bf11f</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Did you enable notifications first?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Notification Context</title><link>https://devzone.nordicsemi.com/thread/259120?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2020 09:16:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd1dcfe6-795f-4c13-a7e9-8fd5a9926ae0</guid><dc:creator>LukasKl</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;Thanks for your help. Since I know it should work for S132 I tried but could not make it work.&lt;/p&gt;
&lt;p&gt;I initialize the following modules&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void init(void)
	nrf_pwr_mgmt_init();
	ble_stack_init();
	gap_params_init();
	nrf_ble_gatt_init(&amp;amp;m_gatt, NULL);
	advertising_init();
	scan_init();
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The ble_evt_handler looks as follows&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;void ble_evt_handler(ble_evt_t const* p_ble_evt, void* p_context)
{
	NRF_LOG_INFO(&amp;quot;%d&amp;quot;, p_ble_evt-&amp;gt;header.evt_id);
	NRF_LOG_PROCESS();
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I run it I can see the advertisements are sent using my phone, also I get only 29 in the logs which corresponds to the scan report. Unfortunately I do not get any other evt_ids in the handler, e.g.&amp;nbsp;BLE_GATTS_EVT_HVN_TX_COMPLETE does not appear.&lt;/p&gt;
&lt;p&gt;I was trying to follow the example:&amp;nbsp;ble_peripheral/experimental/ble_app_hids_keyboard_pairing_nfc, where&amp;nbsp;BLE_GATTS_EVT_HVN_TX_COMPLETE is used.&lt;/p&gt;
&lt;p&gt;best regards,&lt;/p&gt;
&lt;p&gt;Lukas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Notification Context</title><link>https://devzone.nordicsemi.com/thread/258915?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 07:05:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee6b9f98-e6ee-49c9-a1b1-b5206108647e</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Well, &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.0.1/group___b_l_e___g_a_t_t_s___h_v_n___m_s_c.html"&gt;it should still work for S132&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Notification Context</title><link>https://devzone.nordicsemi.com/thread/258849?ContentTypeID=1</link><pubDate>Tue, 07 Jul 2020 15:26:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:227ba76d-fe22-45a0-8b37-234409ca4601</guid><dc:creator>LukasKl</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;Thank you for your response.&lt;/p&gt;
&lt;p&gt;unfortunately I&amp;#39;m using S132, since I use it as central and peripheral. Is there a way to make it work with S132?&lt;/p&gt;
&lt;p&gt;best regards,&lt;/p&gt;
&lt;p&gt;Lukas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Notification Context</title><link>https://devzone.nordicsemi.com/thread/258799?ContentTypeID=1</link><pubDate>Tue, 07 Jul 2020 12:48:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37e604f4-6cee-4fff-a6a4-34155f33e2b7</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;The function that you&amp;#39;re referring to is apart of the radio notifications API, which will notify the application every time the radio is in use. The S112 softdevice will produce a&amp;nbsp;BLE_GATTS_EVT_HVN_TX_COMPLETE event every time a BLE notification is sent. You can implement the event in the switch case in the gatt handler in your project.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;best regards&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Jared&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>