<?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>Distinguish, which of the Services triggered the BLE event &amp;quot;Notification enabled&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47104/distinguish-which-of-the-services-triggered-the-ble-event-notification-enabled</link><description>Hi all, 
 I am using SDK for mesh v. 3.1.0 next to SDK 15.2, nRF52832 DK. I have two services, NUS and Mesh Proxy Service. For both of the services there is registered a BLE observer. When the Notification in the NUS Service for TX Characteristic is enabled</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 May 2019 09:46:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47104/distinguish-which-of-the-services-triggered-the-ble-event-notification-enabled" /><item><title>RE: Distinguish, which of the Services triggered the BLE event "Notification enabled"</title><link>https://devzone.nordicsemi.com/thread/187478?ContentTypeID=1</link><pubDate>Thu, 16 May 2019 09:46:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:536c1bf1-b31b-43a7-8d12-cd3349183f8b</guid><dc:creator>Patrik</dc:creator><description>&lt;p&gt;Could you please give me some hint? It is easy to distinquish which characteristic triggered the BLE event using:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
{
    uint32_t err_code;
    ble_nus_t * p_nus = (ble_nus_t *)p_context;

    switch (p_ble_evt-&amp;gt;header.evt_id)
    {
        case BLE_GATTS_EVT_WRITE:
        {
            if(p_ble_evt-&amp;gt;evt.gatts_evt.params.write.uuid.uuid == 0x0002)
            {
                //0x0002 is UUID for NUS UART characteristic, so fine it is 
                //filtered
                
                ....some action....
            }break;
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But in the case of writing to CCCD descriptor, which has the SIG defined UUID = 0x2902, I dont know how to filter from which service was enabled notification.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>