<?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>BLE Custom Services - nRF52840 - SDK15.3</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60083/ble-custom-services---nrf52840---sdk15-3</link><description>Hi, 
 I want to implement a Single Base UUID with 3 Custom Characteristics. I followed the instructions which are mentioned in the https://github.com/maidenone/custom_ble_service_example - GitHub link to develop custom services. So I followed and implemented</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Apr 2020 22:18:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60083/ble-custom-services---nrf52840---sdk15-3" /><item><title>RE: BLE Custom Services - nRF52840 - SDK15.3</title><link>https://devzone.nordicsemi.com/thread/244557?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2020 22:18:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ff70e9b-0e34-417b-af44-9f3150e1280c</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;If you want to &lt;strong&gt;send (notify) data from the server&lt;/strong&gt; ( often a peripheral) to the client (often a central), you use the call&amp;nbsp;&lt;em&gt;&lt;strong&gt;sd_ble_gatts_hvx()&lt;/strong&gt;. &lt;/em&gt;Take a look at the example &lt;em&gt;\examples\ble_peripheral\ble_app_blinky&amp;nbsp;&lt;/em&gt;and the function&amp;nbsp;&lt;em&gt;ble_lbs_on_button_change()&lt;/em&gt; in&amp;nbsp;&lt;em&gt;\nRF5_SDK_15.3\components\ble\ble_services\ble_lbs\ble_lbs.c&lt;/em&gt; for guidance how to use this.&amp;nbsp;In your case, the server is the nRF52840 device and the client is the phone (Bluetooth terminal)&lt;/p&gt;
&lt;p&gt;In order to &lt;strong&gt;receive the data&lt;/strong&gt; (written from client to server), you have to &lt;strong&gt;create a BLE observer function through&amp;nbsp;NRF_SDH_BLE_OBSERVER()&lt;/strong&gt; and then&lt;strong&gt; look for the event&amp;nbsp;BLE_GATTS_EVT_WRITE in the observer function&lt;/strong&gt;. Take a look at the file&amp;nbsp;&lt;em&gt;\components\ble\ble_services\ble_lbs\ble_lbs.h&lt;/em&gt;,&lt;em&gt;&amp;nbsp;&lt;/em&gt;where&amp;nbsp;&lt;em&gt;ble_lbs_on_ble_evt()&amp;nbsp;&lt;/em&gt;is added as a BLE observer, and at the file&amp;nbsp;&lt;em&gt;\components\ble\ble_services\ble_lbs\ble_lbs.c&lt;/em&gt;, where the function&amp;nbsp;&lt;em&gt;ble_lbs_on_ble_evt()&lt;/em&gt; is implemented. The received data is located in&amp;nbsp;&lt;em&gt;&amp;amp;p_ble_evt-&amp;gt;evt.gatts_evt.params.write-&amp;gt;data[0]&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>