<?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>I want to know the specification of NUS advertising and response data packet.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102683/i-want-to-know-the-specification-of-nus-advertising-and-response-data-packet</link><description>hi! 
 
 I am developing BLE communication with NUS. 
 
 I want to check the detailed specifications of advertising and response data packets of peripheral and central, but I can&amp;#39;t find them. 
 I found what is briefly explained in the academy of the link</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Aug 2023 06:36:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102683/i-want-to-know-the-specification-of-nus-advertising-and-response-data-packet" /><item><title>RE: I want to know the specification of NUS advertising and response data packet.</title><link>https://devzone.nordicsemi.com/thread/440399?ContentTypeID=1</link><pubDate>Wed, 09 Aug 2023 06:36:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1aa3f71-9072-47db-b58b-07a7d0ae7020</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can modify both the advertisement packet and the UUID at will. In fact, we recommend that you modify the UUID so that it is easier to distinguish your devices from other BLE products.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t really recommend changing the UUID for the NUS, as it will affect all applications that you build that are using the NUS service. What I recommend that you do is to create your own file with your own service, and you can look at the Nordic UART Service for reference, as an example on how to do it. If you continue a bit further down the devacademy course, you will eventually reach the lesson and exercises where you will learn how to create your own custom service. Please see:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://academy.nordicsemi.com/topic/blefund-lesson-4-exercise-1/"&gt;Lesson 4 Exercise 1&lt;/a&gt;&amp;nbsp;(But also do the other parts up until this point, as they are also useful.&lt;/p&gt;
&lt;p&gt;We also recommend to use something like &lt;a href="https://www.uuidgenerator.net/"&gt;this UUID generator&lt;/a&gt; to ensure a unique UUID.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To actually answer your questions, please see nus.c and nus.h found in:&lt;/p&gt;
&lt;p&gt;NCS\nrf\subsys\bluetooth\services\nus.c&lt;br /&gt;NCS\nrf\include\bluetooth\services\nus.h&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;nus.h holds the actual UUID definitions, while nus.c is responsible for setting up the service and characteristics. The advertisement is set up in main.c in the NCS\nrf\samples\bluetooth\peripheral_uart sample.&lt;/p&gt;
&lt;p&gt;Look at how the&amp;nbsp;&lt;/p&gt;
&lt;p&gt;static const struct bt_data ad[], and&lt;br /&gt;static const struct bt_data sd[] are set up, where the initial advertising message (ad) contains the flags and the device name. The scan response data (sd) holds the list of the NUS&amp;#39; UUID.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>