<?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 - NUS and characteristics</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76757/ble---nus-and-characteristics</link><description>Hi, 
 I&amp;#39;m little confused regarding BLE NUS and characteristics. 
 I know that the characteristics are used to expose data, but we also have BLE nus which is used to send and receive data. 
 Is there any connection between them? 
 Do they use the same</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 Jul 2021 09:00:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76757/ble---nus-and-characteristics" /><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/319957?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 09:00:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bb0c5da-9f31-473d-8ae8-3bc92357fffc</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Roei"]OK, now it&amp;#39;s more cleared, thanks![/quote]
&lt;p&gt;Great! :)&lt;/p&gt;
[quote user="Roei"]What about changes in the values? Let&amp;#39;s say - a temperature value which is changed from time to time - how does the server sends this update to the client?[/quote]
&lt;p&gt;Normally, the client have to poll the characteristics it would like to see, by reading them from time to time. This might however lead to a lot of unnecessary long transmissions, because the value has not changed. &lt;br /&gt;This is where&amp;nbsp;&lt;em&gt;notifications&amp;nbsp;&lt;/em&gt;and&amp;nbsp;&lt;em&gt;indications&lt;/em&gt; comes into play. By enabling notification on a characteristic, the client asks the server to&amp;nbsp;&lt;em&gt;notify&lt;/em&gt; it whenever the value changes.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You can read more &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/99/notification-indication-difference"&gt;about notifications and indications here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/319883?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 16:14:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80a0e1e2-e4f7-44c6-b166-541ebbbb6906</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;OK, now it&amp;#39;s more cleared, thanks!&lt;/p&gt;
&lt;p&gt;What about changes in the values? Let&amp;#39;s say - a temperature value which is changed from time to time - how does the server sends this update to the client?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/319881?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 15:58:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ced06583-63fa-4530-8bb6-fa2a5d0d15b9</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Roei"]the video is very helpful![/quote]
&lt;p&gt;I am happy to hear that! :)&lt;/p&gt;
[quote user="Roei"]I didn&amp;#39;t understand how does the attributes which represents service/characteristics are sent to the client.[/quote][quote user="Roei"]For example - if we have the heart rate service - how does it send its attributes and rate data? How often? Does it send the whole attributes in the same message (service, characteristics, value, descriptors)?[/quote]
&lt;p&gt;When the a connection is made, the GATT client will initiate attribute discovery of the GATT server, to learn what the GATT server is offering (what profiles, services and characteristics it exposes).&lt;br /&gt;You can read more about this in &lt;a href="https://www.novelbits.io/deep-dive-ble-packets-events/"&gt;the Attribute Discovery section of this blogpost&lt;/a&gt;(almost at the bottom).&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/319877?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 15:28:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0123984-a7ba-41a2-8ea9-eac3b4a334d2</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Thanks, the video is very helpful!&lt;/p&gt;
&lt;p&gt;After watching the GATT part of the video, I didn&amp;#39;t understand how does the attributes which represents service/characteristics are sent to the client.&lt;/p&gt;
&lt;p&gt;For example - if we have the heart rate service - how does it send its attributes and rate data? How often? Does it send the whole attributes in the same message (service, characteristics, value, descriptors)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/319738?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 09:33:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2354c2a3-6104-471f-919a-58aa235da1fb</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
[quote user="Roei"]Thanks, it helped me a lot![/quote]
&lt;p&gt;I am happy to hear that you found it helpful! :)&lt;/p&gt;
[quote user="Roei"]I know that attributes contain data, but what kind of data Rx and Tx characteristics contain? Those characteristics should be attributes as well, right?[/quote]
&lt;p&gt;&amp;nbsp;Yes, all sections in the GATT (general attribute) table are attributes. Please see &lt;a href="https://stackoverflow.com/questions/30754183/difference-between-attributes-and-services-in-ble#:~:text=Inside%20the%20characteristic%2C%20you%20have,like%20service%2C%20characteristic%20and%20descriptors."&gt;this stack overflow answer&lt;/a&gt;&amp;nbsp;for an elaboration on this. The answer also contains a link to one of our videos which covers the essential parts of the whole BLE protocol more in depth. You can skip to the parts of the video that covers the GATT section, to learn more in depth about it.&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if you should have any more questions about this, or any other related topic!&lt;br /&gt;&lt;br /&gt;Sorry for my short answers, the summer holidays have already begun here in Norway, and we are thus operating DevZone with reduced staffing.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/319720?ContentTypeID=1</link><pubDate>Tue, 13 Jul 2021 08:18:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc849844-a364-40d3-aaf4-8bc1aff0f55d</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Thanks, it helped me a lot!&lt;/p&gt;
&lt;p&gt;I still have a question regarding Rx and Tx characteristics - how does it align with attributes?&lt;/p&gt;
&lt;p&gt;I know that attributes contain data, but what kind of data Rx and Tx characteristics contain? Those characteristics should be attributes as well, right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/319451?ContentTypeID=1</link><pubDate>Fri, 09 Jul 2021 18:01:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a504f6f7-a73a-4c13-86c3-746eefd3f0da</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Please &lt;a href="https://www.novelbits.io/bluetooth-gatt-services-characteristics/"&gt;have a look at this blogpost&lt;/a&gt;&amp;nbsp;for an in-depth explanation of how ATT and GATT relates to any service that a peripheral may be offering. The theory part in the beginning covers the topic very well, but you wont need to complete the tutorial part.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/319370?ContentTypeID=1</link><pubDate>Fri, 09 Jul 2021 12:25:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b199b1fe-4b18-43cb-8303-9da98d16a5fc</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How does attribute protocol related to this UART service? Can you please clarify that?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/317487?ContentTypeID=1</link><pubDate>Mon, 28 Jun 2021 12:45:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49d390ea-fd77-45bf-9d23-3f6a05e21128</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Roei"]now it&amp;#39;s cleared - thanks![/quote]
&lt;p&gt;Great, I am happy to hear that!&lt;br /&gt;&lt;br /&gt;Please do not hesitate to open another ticket if you should encounter any issues or questions in the future.&lt;br /&gt;&lt;br /&gt;Good luck with your development!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/317466?ContentTypeID=1</link><pubDate>Mon, 28 Jun 2021 11:58:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4e34e0b-10a7-4184-af1f-8bafb663b32f</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Ok, now it&amp;#39;s cleared - thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/317465?ContentTypeID=1</link><pubDate>Mon, 28 Jun 2021 11:56:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a8d811c-d796-408d-af34-febc33609205</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Roei"]Does discovery service related to NUS or device information service? Or is it a separate service which doesn&amp;#39;t need to be declared?[/quote]
&lt;p&gt;There is no separate &amp;#39;discovery service&amp;#39;, the &lt;em&gt;service discovery is a process&lt;/em&gt; for discovering what services that a connected device provide and support.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/317454?ContentTypeID=1</link><pubDate>Mon, 28 Jun 2021 11:37:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cabaea71-624e-4f59-89ef-d5cbd38a6746</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Does discovery service related to NUS or device information service? Or is it a separate service which doesn&amp;#39;t need to be declared?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/317441?ContentTypeID=1</link><pubDate>Mon, 28 Jun 2021 10:58:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14709422-441f-4f9f-929b-c810b829dc1e</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Roei"]&lt;p&gt;I think the service discovery is the thing I don&amp;#39;t understand well.&lt;/p&gt;
&lt;p&gt;How does it happen?&lt;/p&gt;[/quote]
&lt;p&gt;The discovery of services and characteristics happens the same way as most other exchanges in the BLE communication - one of the devices sends a request packet to the other device, which fulfills the request by providing information about its services and characteristics. This is done until the entire GATT database has been discovered.&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.2.0/group___b_l_e___g_a_t_t_c___c_h_a_r___d_i_s_c___m_s_c.html"&gt;This sequence diagram shows how the exchanges for discovering characteristics work&lt;/a&gt;, for example.&lt;/p&gt;
[quote user="Roei"]Or via advertisement channels?[/quote]
&lt;p&gt;Service and characteristics discovery does not happen on the advertising channels, no. This only happens when already in a connection.&lt;br /&gt;The primary thing transferred on the advertisements channels is advertisements, scan responses, scan requests and connection requests.&lt;/p&gt;
[quote user="Roei"]Should the other side ask for the Nordic device to transmit this data?[/quote]
&lt;p&gt;Yes, the central device will need to initiate the discovery, like shown in the message sequence charts I referenced earlier.&lt;br /&gt;You can see this done in most of the central examples from the SDK as part of the&amp;nbsp;BLE_GAP_EVT_CONNECTED event handler.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/317146?ContentTypeID=1</link><pubDate>Fri, 25 Jun 2021 08:12:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69e9b923-abb2-4cd1-b152-f33d0bb343ce</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;I think the service discovery is the thing I don&amp;#39;t understand well.&lt;/p&gt;
&lt;p&gt;How does it happen? Does the Nordic device transmit those services via data channels, so they will be discovered? Or via advertisement channels? Should the other side ask for the Nordic device to transmit this data?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/317145?ContentTypeID=1</link><pubDate>Fri, 25 Jun 2021 08:07:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63eeb684-5cff-4e17-9019-e050b5076e46</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Roei"]Thanks for your answer, it helps me a lot![/quote]
&lt;p&gt;No problem at all, I am happy to help!&amp;nbsp;&lt;/p&gt;
[quote user="Roei"]What about other characteristics which are discovered by other side? How can they be transmitted if not via BLE NUS?[/quote]
&lt;p&gt;I am not sure that I understand your questions here. Could you elaborate?&lt;br /&gt;The services and characteristics are discovered during the &amp;quot;service discovery&amp;quot; phase of the connection, and afterwards the devices may for example&amp;nbsp;&lt;em&gt;enable notification&amp;nbsp;&lt;/em&gt;on a characteristics (such as done in the BLE NUS examples).&amp;nbsp;&lt;em&gt;Notifications / notify&amp;nbsp;&lt;/em&gt;means that the connected device will be sent the new value of the characteristic any time it is updated.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/317141?ContentTypeID=1</link><pubDate>Fri, 25 Jun 2021 07:58:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56c9bdec-d762-4805-b1ac-8c074a94907c</guid><dc:creator>Roei</dc:creator><description>&lt;p&gt;Thanks for your answer, it helps me a lot!&lt;/p&gt;
&lt;p&gt;Actually - I have another question:&lt;/p&gt;
&lt;p&gt;What about other characteristics which are discovered by other side? How can they be transmitted if not via BLE NUS?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE - NUS and characteristics</title><link>https://devzone.nordicsemi.com/thread/317126?ContentTypeID=1</link><pubDate>Fri, 25 Jun 2021 07:32:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b5b3d3d-55df-40b2-8c93-eefe46a7b49e</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]&lt;p&gt;I know that the characteristics are used to expose data, but we also have BLE nus which is used to send and receive data.&lt;/p&gt;
&lt;p&gt;Is there any connection between them?&lt;/p&gt;[/quote]
&lt;p&gt;Yes, BLE NUS is actually short for BLE &lt;em&gt;Nordic UART Service&lt;/em&gt;, which implements a service with two characteristics simulating the RX and TX pins of a physical UART interface. You can see&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/ble_sdk_app_nus_eval.html"&gt;the BLE NUS demonstrated in the BLE NUS example from the SDK&lt;/a&gt;.&lt;br /&gt;The&amp;nbsp;&lt;em&gt;service&lt;/em&gt; contains the two&amp;nbsp;&lt;em&gt;characteristics&lt;/em&gt; which are used to actually exchange the information between the devices, by notifying data on the two RX and TX characteristics.&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if anything still should be unclear, or if you have further questions!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>