<?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>Purpose of on_connect function in ble_nus.c?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60382/purpose-of-on_connect-function-in-ble_nus-c</link><description>Hello, I am studying the peripheral/ble_app_uart and peripheral/ble_app/template examples to understand the proper way to build a peripheral with our own set of services and characteristics. I&amp;#39;m also studying this tutorial: 
 https://devzone.nordicsemi</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 25 Apr 2020 23:37:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60382/purpose-of-on_connect-function-in-ble_nus-c" /><item><title>RE: Purpose of on_connect function in ble_nus.c?</title><link>https://devzone.nordicsemi.com/thread/246637?ContentTypeID=1</link><pubDate>Sat, 25 Apr 2020 23:37:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a217355-c4b7-4bb3-95ff-6c2c30c47482</guid><dc:creator>riceman0</dc:creator><description>&lt;p&gt;thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Purpose of on_connect function in ble_nus.c?</title><link>https://devzone.nordicsemi.com/thread/245491?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 10:58:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d9ebd7d-a309-451a-b8de-dc4547728a36</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The on_connect function is there to handle the BLE_GAP_EVT_CONNECTED event from the SoftDevice when the ble_nus_on_ble_evt() function is called. When using other services than NUS, this function is called from ble_conn_params.c, so it should be handled by the SDK when creating your own characteristics as well.&lt;/p&gt;
&lt;p&gt;You can check out the ble_custom_service example over at our GitHub for a more complete tutorial on how to set up custom services and characteristics &lt;a href="https://github.com/NordicPlayground/nRF5x-custom-ble-service-tutorial"&gt;here&lt;/a&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>