<?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 diagnostics API in nCS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96791/ble-diagnostics-api-in-ncs</link><description>Hello, 
 
 Can you please help me with any API available in nRF Connect SDK, which will tell me if the BLE communication / BLE hardware on my nRF52833 is faulty or functional..? 
 
 Thanks,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 Mar 2023 14:23:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96791/ble-diagnostics-api-in-ncs" /><item><title>RE: BLE diagnostics API in nCS</title><link>https://devzone.nordicsemi.com/thread/414164?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 14:23:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cec44fd-e9e0-4cbb-9d2b-8ab7adcb2f53</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Ubaid_M"]How will I find out if no BLE activity has happened..?[/quote]
&lt;p&gt;This could be anything, really, but one simple way would be to extend the DFU functionality so that after the device has been upgraded, the DFU controller must send a message (over BLE) to tell the device to confirm the upgrade. When receiving such a message, the device confirms the upprade. If not receiving such a message, the device will automatically revert to the older firmware after the next reset, since the upgrade has not been confirmed.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE diagnostics API in nCS</title><link>https://devzone.nordicsemi.com/thread/413379?ContentTypeID=1</link><pubDate>Sun, 05 Mar 2023 10:12:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:428be54a-47bc-4c9a-af17-b08c8b825c77</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;span&gt;Terje,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="8164" url="~/f/nordic-q-a/96791/ble-diagnostics-api-in-ncs/412574"]The DFU solution already have safeguards for switching permanently to the new application only if the new application is valid and functional.[/quote]
&lt;p&gt;I have enabled the test upgrade only from mcuboot which is fine.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="8164" url="~/f/nordic-q-a/96791/ble-diagnostics-api-in-ncs/412574"]confirmation after confirmed BLE reception.[/quote]
&lt;p&gt;My problem lies with this, if BLE is not functional, I cannot connect to the device.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="8164" url="~/f/nordic-q-a/96791/ble-diagnostics-api-in-ncs/412574"]Returning to the previous application can be done for instance through watchdog timer, or trigger reset after a timeout if no BLE activity has happened[/quote]
&lt;p&gt;How will I find out if no BLE activity has happened..?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE diagnostics API in nCS</title><link>https://devzone.nordicsemi.com/thread/412574?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 15:50:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da506fd3-7017-4163-9862-f13828b1d4c8</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In the scenario that you describe, you have upgraded from a functioning Bluetooth mesh application to a malfunctioning Bluetooth mesh application. The error would be in the application itself.&lt;/p&gt;
&lt;p&gt;The DFU solution already have safeguards for switching permanently to the new application only if the new application is valid and functional.&lt;/p&gt;
&lt;p&gt;Basically, the DFU process is as follows: Using two slots, the existing image is in the first slot and the new image is uploaded to the second slot. The slots are then swapped and the device runs the new image. After the next reset the slots are swapped back, leaving you back with the old (known to be working) image. In order to stay on the new image, the new image must actively confirm the swap. This is done from the application itself. You can for instance do the confirmation after confirmed BLE reception. Returning to the previous application can be done for instance through watchdog timer, or trigger reset after a timeout if no BLE activity has happened, or manually repowering the device, or a number of other methods.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE diagnostics API in nCS</title><link>https://devzone.nordicsemi.com/thread/412438?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 09:26:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:588ce603-cbf8-4a43-8d2c-85911f095a27</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello Terje,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Apologies, let me rephrase&amp;nbsp;&lt;/p&gt;
[quote userid="8164" url="~/f/nordic-q-a/96791/ble-diagnostics-api-in-ncs/412042"]I do not think I completely understand what you are asking for. Can you please try to explain in other words what you want to check for, and for what purpose?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My device is a BLE-mesh device I am developing firmware for it over nCS.&lt;br /&gt;&lt;br /&gt;Now, my device working fine and supposing that I perform a DFU over BLE&amp;nbsp; on my device and post DFU, I lost the device from the BLE-Mesh.&lt;/p&gt;
&lt;p&gt;with the previous image BLE-Mesh was functional in the device, now with the DFU updated image, device is not on scannable or detectable on BLE-Mesh.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here I just need to understand if my device&amp;#39;s BLE hardware is functional or it is an issue with my updated image. Hence, I need to diagnose if BLE controller is healthy or not..?&lt;br /&gt;&lt;br /&gt;Thanks,&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE diagnostics API in nCS</title><link>https://devzone.nordicsemi.com/thread/412042?ContentTypeID=1</link><pubDate>Fri, 24 Feb 2023 15:48:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ced3c802-0fc0-4e57-8c9b-5860c146c26d</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I do not think I completely understand what you are asking for. Can you please try to explain in other words what you want to check for, and for what purpose?&lt;/p&gt;
&lt;p&gt;Do you want to know if BLE has been disabled, or do you want to know if the node is hanging, or do you want to know something else?&lt;/p&gt;
&lt;p&gt;If what you look for is an alert when &amp;quot;some unknown error has happened on the device which makes BLE not work any more&amp;quot; then I am afraid that is not something it will be possible to self-test for. The only available option then is to try to communicate over BLE. If you get successful communication, then you can conclude that BLE is working. If you do not get any communication, it may either be that something is wrong locally on the device, or there are no BLE devices within range, but there is no way to know which one of the two it is. Most likely however the device does not suddenly stop working.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE diagnostics API in nCS</title><link>https://devzone.nordicsemi.com/thread/411241?ContentTypeID=1</link><pubDate>Wed, 22 Feb 2023 06:52:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f73110f7-2cfb-4ddf-834e-995ee2a08b86</guid><dc:creator>Ubaid_M</dc:creator><description>[quote userid="8164" url="~/f/nordic-q-a/96791/ble-diagnostics-api-in-ncs/411183"]Since you are using Bluetooth mesh, then you can look into the health model, which is a foundation model where the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/mesh/health_srv.html"&gt;server model&lt;/a&gt; is mandatory and therefore already implemented for all mesh nodes. You can add the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/mesh/health_cli.html"&gt;health client&lt;/a&gt; model to one node, for instance a gateway, and from there monitor the other nodes.[/quote]
&lt;p&gt;Hello&amp;nbsp;&lt;span&gt;Terje,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Agreed with you, But a device in mesh, I can either way find out if BLE-Mesh opcodes are not being responded by the device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;So, rather my requirement is how&amp;nbsp; will I make the device aware of BLE functional or not without any external (mobile app) effort..?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE diagnostics API in nCS</title><link>https://devzone.nordicsemi.com/thread/411183?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2023 16:46:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a99359f-a90d-42a2-bac2-3f6102808c4a</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Direct Test Mode is for production testing, not for use in the field. It is not suited for an end product at all.&lt;/p&gt;
&lt;p&gt;Since you are using Bluetooth mesh, then you can look into the health model, which is a foundation model where the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/mesh/health_srv.html"&gt;server model&lt;/a&gt; is mandatory and therefore already implemented for all mesh nodes. You can add the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/mesh/health_cli.html"&gt;health client&lt;/a&gt; model to one node, for instance a gateway, and from there monitor the other nodes.&lt;/p&gt;
&lt;p&gt;You can also use the health model for sending fault messages from a device, which are broadcasted at a higher frequency than normal health messages.&lt;/p&gt;
&lt;p&gt;Another diagnostic tool for Bluetooth mesh networks is &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/mesh/heartbeat.html"&gt;Heartbeat&lt;/a&gt;, which is part of the configuration model (also a foundation model and the server is mandatory and implemented for all nodes.) The main function of Heartbeat is to determine the distance (in number of hops) between two nodes and provide some statistics for network communication.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE diagnostics API in nCS</title><link>https://devzone.nordicsemi.com/thread/411066?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2023 10:28:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2686293f-d9e5-44d3-b9aa-27e63872bf3c</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello Terje,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can I use something on the grounds of DTM:&amp;nbsp;&lt;a id="" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/direct_test_mode/README.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/direct_test_mode/README.html&lt;/a&gt;&amp;nbsp;..............?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Are you aware of something similar or some API..?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE diagnostics API in nCS</title><link>https://devzone.nordicsemi.com/thread/411050?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2023 09:21:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1b9e18d-bc8c-462c-adc5-390ad7f36106</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&amp;nbsp;&lt;span&gt;Terje,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="8164" url="~/f/nordic-q-a/96791/ble-diagnostics-api-in-ncs/410639"]There is no dedicated API for self-diagnosing whether BLE works or not, no, neither on a hardware nor software level[/quote]
&lt;p&gt;Noted with thanks,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However, can you kindly suggest how do I got about diagnosing BLE health..?&lt;br /&gt;&lt;br /&gt;Because I will be left at the mercy of BLE-Mesh in my case, OPCODES for which I trigger once a week maybe.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So that should not mean for a week I am unaware that BLE hardware/functionality is not working..?!&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE diagnostics API in nCS</title><link>https://devzone.nordicsemi.com/thread/410639?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2023 12:44:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2b0265a-9fdb-4706-bbe2-06ebf4c20391</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is no dedicated API for self-diagnosing whether BLE works or not, no, neither on a hardware nor software level. I am afraid you must rely on the existing API calls returning errors if something is wrong, as well as rely on the fact that successful BLE communication indicates that BLE is working.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>