<?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>NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37282/nus-central-and-dfu-using-serialization</link><description>Hi, 
 I&amp;#39;m using 2 nRF52832s in my project. One of them is connected to a PC serially and has NUS central running on it and the other nRF52 connects to this central. I was able to get the HRM example running with the connectivity firmware on the nRF52</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Sep 2018 06:44:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37282/nus-central-and-dfu-using-serialization" /><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/148903?ContentTypeID=1</link><pubDate>Mon, 17 Sep 2018 06:44:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67b1b5cd-4fd4-452f-a10b-c8ba63e54051</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Good to hear. I used the &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver/tree/release/v2.3.2"&gt;release/v.2.3.2 &lt;/a&gt;branch. &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver/releases"&gt;pc-ble-driver v2.x releases are for SD API v2 &amp;amp; v3, v3.x releases are for SD_API v2 &amp;amp; v5&lt;/a&gt;. nrfutil uses API v3 so it might simplify dfu integration if you use the same API version.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/148875?ContentTypeID=1</link><pubDate>Sat, 15 Sep 2018 14:34:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f96a518-8402-4807-a4f3-43288a22ac4c</guid><dc:creator>TS Gowtham</dc:creator><description>&lt;p&gt;Thank you, your code helped me fix my problem. I had initially assumed that calling the characteristic discovery function once would be enough. I also noticed that your code and pc_ble_driver_py both use the API version 3. Which branch of the pc_ble_driver should I use to get the API version 3?? Even the branch v3 contains sd_ap_v2 and sd_api_v5 in the hex folder. My end aim is to get NUS central and DFU working, so which API version should I use and which branch should I get it from?&lt;/p&gt;
&lt;p&gt;FYI, I am currently using sd_api_v5 from the master branch of pc_ble_driver&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/148685?ContentTypeID=1</link><pubDate>Thu, 13 Sep 2018 20:51:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a75d70b-acfb-4f97-9c25-1a6b01a16bde</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I think that must be a mistake in the documentation, will ask the author to confirm.&lt;/p&gt;
&lt;p&gt;I tried the pc-ble-driver v.2.3.2&amp;nbsp; with API version 3 and managed to hack together an example works with the standard ble_app_uart example. I.e., complete service discovery and receive notifications. Can you try to see if it works for you?&lt;/p&gt;
&lt;p&gt;Modified hrs_collector example:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-4c618fdb9665430d9dd6a1578a6c451b/main.c"&gt;devzone.nordicsemi.com/.../main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/148654?ContentTypeID=1</link><pubDate>Thu, 13 Sep 2018 14:09:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:450af07e-a00e-4958-9abf-6ad56cfe98c8</guid><dc:creator>TS Gowtham</dc:creator><description>&lt;p&gt;I did look at the link you suggested. The table says that the CCCD UUID is 0x2800 while the &amp;quot;Attributes types(UUIDs)&amp;quot; paragraph says that the CCCD UUID is 0x2902. Is that a mistake in the document?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I did use the existing discovery functions. The only change I made is that I kept calling the characteristic discovery function (after adding 1 to the start handle) the till I received the GATT status&amp;nbsp;BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, I connected to the peripheral using the nRFConnect app. In the app, it showed the&amp;nbsp;CCCD UUID as 0x2902. But the&amp;nbsp;descriptor discovery using serialization shows that one descriptor is found with UUID as 0x2803, but I haven&amp;#39;t added any descriptors to the peripheral other than CCCD. FYI, the peripheral is running a modified version of ble_app_uart example but without any changes to the characteristics or descriptors from the original example.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/148651?ContentTypeID=1</link><pubDate>Thu, 13 Sep 2018 13:56:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d45448d5-392b-43e4-a61b-ac7ce58d8c74</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;0x2803 is the characteristic declaration so&amp;nbsp;&amp;nbsp;seems that the value handle for the NUS TX Characteristic handle should be 0xE + 1.&amp;nbsp;Recommend to have a look at this blog post for a&amp;nbsp;better explanation of the attribute table layout&lt;/span&gt;:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/tutorials/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial"&gt;https://devzone.nordicsemi.com/tutorials/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have not verified it, but it looks like you can use the existing discovery functions used in heart rate collector example and just change the UUIDs to filter on, or is that what you have done already?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/148455?ContentTypeID=1</link><pubDate>Wed, 12 Sep 2018 14:41:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:390f485a-5577-419d-a84e-f020bb397926</guid><dc:creator>TS Gowtham</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Your last answer helped me quite a lot, thanks for that.&lt;/p&gt;
&lt;p&gt;I was able to reach till the characteristic descriptor discovery part, but I&amp;#39;m facing the following issues:&lt;/p&gt;
&lt;p&gt;1) I followed this&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/20247/sd_ble_gattc_characteristics_discover-only-discovers-one-characteristic"&gt;link&amp;#39;s&lt;/a&gt;&amp;nbsp;suggestion and incremented the handle by 1 and called the characteristic discover function. But I noticed that the characteristic handles are being allotted in increments of 2.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NUS RX Characteristic handle = 0x000C&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NUS TX Characteristic handle = 0x000E&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But the above link says to increment by 1 and the graph in the link just states a variable N. So is this value programmer dependent?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2) When calling the descriptor discovery function, I&amp;#39;m getting the&amp;nbsp;following CCCD details:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Handle = 0x000E&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;UUID = 0x2803&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is the handle supposed to be same as that of the TX characteristic&amp;#39;s handle? Also, from what I understood the CCCD UUID should always be 0x2902. If yes, then any specific reason why I am getting a wrong UUID?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/148132?ContentTypeID=1</link><pubDate>Tue, 11 Sep 2018 07:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6add0dc-d2f8-476b-a752-3b614d6fe54d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Yes you are right, notifications/indications will be reported through the on_hvx() function, and writes to the peripheral can be done by calling&amp;nbsp;&lt;span&gt;sd_ble_gattc_write() like you said. hrm_cccd_set() does this, but you may want to use write command instead of write request if you are writing to the NUS characteristic&amp;nbsp;because&amp;nbsp;it&amp;#39;s faster.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/148043?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 13:17:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a7310d3-8255-41a8-a357-6a9a3bcedf9f</guid><dc:creator>TS Gowtham</dc:creator><description>&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;I got an approximate idea from the on_notification() function. If I am right, I guess it&amp;#39;s function is similar to that of the function on_hvx()? This would solve the portion where the device receives data from the peripheral. But what about transmitting data from the nrf running the connectivity fw to the peripheral? Would just using&amp;nbsp;sd_ble_gattc_write() directly work?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/148035?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 13:11:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2f7fae8-4581-440c-9e22-b6723b69bc8e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Correct, you should use &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v3.0.0/group___b_l_e___c_o_m_m_o_n___f_u_n_c_t_i_o_n_s.html?cp=2_3_1_1_4_2_0_2_2_8#ga265b4251110a15120d0aa97e5152163b"&gt;sd_ble_uuid_vs_add()&lt;/a&gt;&lt;span&gt;&amp;nbsp;if you&amp;#39;re not using the python/js wrapper. UUID type needs to be set to&amp;nbsp;VENDOR_BEGIN.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/147978?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 09:59:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e027874c-ff3c-4534-9418-9c141746afa7</guid><dc:creator>TS Gowtham</dc:creator><description>&lt;p&gt;Hi, the link you provided was quite helpful. But now I am currently trying to use the pc ble driver in C++ by modifying the given HRS collector example. Is there a similar code snippet which shows how to add the UUID? I guess I should use the&amp;nbsp;&lt;span&gt;sd_ble_uuid_vs_add function but I am not sure about if the UUID type which should be passed to the function be of type UNKOWN or VENDOR_BEGIN&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/147963?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 09:19:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6e214b6-ab17-4452-9c03-eabc41a7dd25</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;No worries. I don&amp;#39;t think you&amp;#39;ll&amp;nbsp; need to modify the connectivity FW as you will be receiving the NUS notifications through the&amp;nbsp;on_notification() callback in your PC app. You could also use the nrfutil dfu ble transport implementation as reference in addition to the hrs collector example (&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/nordicsemi/dfu/dfu_transport_ble.py"&gt;https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/nordicsemi/dfu/dfu_transport_ble.py&lt;/a&gt;&lt;span&gt;). It shows how you can add 128 vendor specific UUIDs.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/147899?ContentTypeID=1</link><pubDate>Sun, 09 Sep 2018 09:14:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:134add8c-25c6-4ba0-aa96-7258d61133a3</guid><dc:creator>TS Gowtham</dc:creator><description>&lt;p&gt;For 1, I have switched from using the python wrapper to the C library. So how do I add the 128 bit address in C? Also, by adding the address am I correct in assuming that you are referring to adding the vendor ID to the BLE stack table done by calling the&amp;nbsp; &amp;#39;sd_ble_uuid_vs_add&amp;#39;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/147880?ContentTypeID=1</link><pubDate>Sat, 08 Sep 2018 11:50:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acb04d60-efff-4688-ba29-f7beeea95b61</guid><dc:creator>TS Gowtham</dc:creator><description>&lt;p&gt;Hi again and sorry for the delay in replying,&lt;/p&gt;
&lt;p&gt;As you suggested I am using the Heart Rate Collector example as the base of my project. But since I am trying to implement NUS, I will need to use UART to transmit the data from the NUS service to my PC. How should I go about this and what kind of effects and changes will this have on the connectivity firmware?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/145320?ContentTypeID=1</link><pubDate>Wed, 22 Aug 2018 12:50:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:840d046f-2626-4985-a815-cca925b63556</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;OTA DFU should work with other USB CDC devices. SWD should only be necessary if you use the optional&amp;nbsp;--flash_connectivity argument (programs connectivity FW over SWD). I recommend that you test DFU with your serial bridge to make sure it works as we only use the jlink bridge for our internal verification.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/145153?ContentTypeID=1</link><pubDate>Tue, 21 Aug 2018 13:53:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4dd72996-c833-4b20-b85e-78fdc224da4b</guid><dc:creator>TS Gowtham</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I was looking at the implementation of ble dfu as you suggested. In the function &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/blob/3592ca8c9e1df4bb0002720280c173f3e7fea7b0/nordicsemi/__main__.py#L796"&gt;ble()&lt;/a&gt;,one of the lines(line 813) mentions the device has to be connected using JLink CDC. I am not aware of how this works. My device will be connected using a serial to usb bridge. Will this work or do I only need to compulsorily use SWD ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS central and DFU using Serialization</title><link>https://devzone.nordicsemi.com/thread/143544?ContentTypeID=1</link><pubDate>Thu, 09 Aug 2018 11:14:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:775848ce-130b-40dd-ba1a-ca31bb94d7df</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1. Unfortunately, but the HRM example should be a good starting point for creating a NUS central. Just remember to add the 128-bit base UUID.&amp;nbsp;Should look something like this if you&amp;#39;re using the python wrapper:&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code&gt;BASE_UUID &lt;/code&gt;&lt;code&gt;=&lt;/code&gt; &lt;code&gt;BLEUUIDBase([&lt;/code&gt;&lt;code&gt;0xXX&lt;/code&gt;&lt;code&gt;, &lt;/code&gt;&lt;code&gt;0xXX&lt;/code&gt;&lt;code&gt;, ..&lt;/code&gt;&lt;code&gt;,&lt;/code&gt;&lt;code&gt;])&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; NUS&lt;/code&gt;&lt;code&gt;_RX_CHR&amp;nbsp; &lt;/code&gt;&lt;code&gt;=&lt;/code&gt; &lt;code&gt;BLEUUID(&lt;/code&gt;&lt;code&gt;0xXXXX&lt;/code&gt;&lt;code&gt;, BASE_UUID)&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&amp;nbsp; &amp;nbsp; NUS&lt;/code&gt;&lt;code&gt;_TX_CHR&amp;nbsp; &lt;/code&gt;&lt;code&gt;=&lt;/code&gt; &lt;code&gt;BLEUUID(&lt;/code&gt;&lt;code&gt;0xXXXX&lt;/code&gt;&lt;code&gt;, BASE_UUID)&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:monospace;"&gt;2.&lt;span style="font-family:arial, helvetica, sans-serif;"&gt; Yes, nrfutil uses the connectivity firmware as an intermediary to perform DFU. Source code is available here:&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/nordicsemi/dfu/dfu_transport_ble.py"&gt;https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/nordicsemi/dfu/dfu_transport_ble.py&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>