<?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>Something is wrong when I merge BLE OTA and NUS together (with source code)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89320/something-is-wrong-when-i-merge-ble-ota-and-nus-together-with-source-code</link><description>Hi, 
 I want to get a sample that supports both BLE OTA and NUS functions, so I find the following two samples as reference and merge them together. 
 ...\zephyr\samples\subsys\mgmt\mcumgr\smp_svr 
 ...\nrf\samples\bluetooth\peripheral_uart 
 When finished</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 01 Jul 2022 09:42:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89320/something-is-wrong-when-i-merge-ble-ota-and-nus-together-with-source-code" /><item><title>RE: Something is wrong when I merge BLE OTA and NUS together (with source code)</title><link>https://devzone.nordicsemi.com/thread/375040?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2022 09:42:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44821ece-e788-4135-8b05-f991ec541982</guid><dc:creator>Joyop</dc:creator><description>&lt;p&gt;Hi Hung Bui，&lt;/p&gt;
&lt;p&gt;I added dfu again following the tutorial, it works well. Thank you!&lt;/p&gt;
&lt;p&gt;Best wishes,&lt;/p&gt;
&lt;p&gt;Joyop&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Something is wrong when I merge BLE OTA and NUS together (with source code)</title><link>https://devzone.nordicsemi.com/thread/374588?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 14:36:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c21ffd82-c388-4d5b-b10f-b261b46d0119</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Yao Jiao,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I won&amp;#39;t be able to test your application right now.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But please check the return code from&amp;nbsp;bt_nus_send() to see why it&amp;#39;s printing out&amp;nbsp;Failed to send data over BLE.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please try to test using nRF Connect app, make sure you enable notification.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please try to follow the tutorial that I pointed to.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Something is wrong when I merge BLE OTA and NUS together (with source code)</title><link>https://devzone.nordicsemi.com/thread/374469?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 08:18:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:954299da-93be-4ff5-99a5-9cbd1e1206dc</guid><dc:creator>Joyop</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/89320/something-is-wrong-when-i-merge-ble-ota-and-nus-together-with-source-code/374339"]Have you tried to follow the tutorial here:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu" data-contentid="fb6f7e6c9e8d462b9fd72295665391e7" data-contenttypeid="f7d226abd59f475c9d224a79e3f0ec07" class="ui-contentpeek internal-link"&gt;Add DFU support to your application&lt;/a&gt;&amp;nbsp;[/quote]
&lt;p&gt;I will tried to add DFU again&amp;nbsp;by following this tutorial.&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/89320/something-is-wrong-when-i-merge-ble-ota-and-nus-together-with-source-code/374339"]Could you explain what exactly happened when &amp;quot;&lt;span&gt;NUS function is abnormal, sending over BLE failed.&amp;quot; we need to know what exactly happened. Do you have any assertion&amp;nbsp; ?&amp;nbsp;&lt;/span&gt;[/quote]
&lt;p&gt;Here in main.c, when BLE sending failed this log will be printed:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;LOG_WRN(&amp;quot;Failed to send data over BLE connection %d.&amp;quot;, test_data_len);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I saw this log and didn&amp;#39;t receive anything on my phone, so I judged that the sending is failed.&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/89320/something-is-wrong-when-i-merge-ble-ota-and-nus-together-with-source-code/374339"]Did you test the application using a phone ? Please also try to test using a different phone because the phone may cache the att table and may not update the attribute table and this may explain why the NUS service doesn&amp;#39;t work.[/quote]
&lt;p&gt;Yes, I tested&amp;nbsp; using my phone. I also tried other phones, it didn&amp;#39;t work either.&lt;/p&gt;
&lt;p&gt;Also, I would appreciate it if you could try to reproduce the problem based on&amp;nbsp;main.c and prj.conf above.&lt;/p&gt;
&lt;p&gt;Thanks again!&lt;/p&gt;
&lt;p&gt;Best wishes,&lt;/p&gt;
&lt;p&gt;Joyop&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Something is wrong when I merge BLE OTA and NUS together (with source code)</title><link>https://devzone.nordicsemi.com/thread/374339?ContentTypeID=1</link><pubDate>Mon, 27 Jun 2022 11:52:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63163922-827a-4461-8b4a-17887220845a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Yao Jiao,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried to follow the tutorial here:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu"&gt;Add DFU support to your application&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you explain what exactly happened when &amp;quot;&lt;span&gt;NUS function is abnormal, sending over BLE failed.&amp;quot; we need to know what exactly happened. Do you have any assertion&amp;nbsp; ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Did you test the application using a phone ? Please also try to test using a different phone because the phone may cache the att table and may not update the attribute table and this may explain why the NUS service doesn&amp;#39;t work. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please use nRF Connect app for testing and you can try to turn off and on Bluetooth to clear the cache.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>