<?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>RESET command value via bluetooth</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103667/reset-command-value-via-bluetooth</link><description>Hello, 
 I&amp;#39;m new to the Nordic world, so please have mercy 
 I&amp;#39;m developing a React Native mobile app for my client which needs a feature to send a RESET command to the device. 
 I saw on the nRF Connect Android app that there&amp;#39;s the option to send this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Oct 2023 07:42:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103667/reset-command-value-via-bluetooth" /><item><title>RE: RESET command value via bluetooth</title><link>https://devzone.nordicsemi.com/thread/448448?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2023 07:42:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34c3913c-2bcf-41f7-be65-e40c72d91cfc</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;It&amp;#39;s great to know that you got it. Please feel free to close this ticket at your convenience then &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RESET command value via bluetooth</title><link>https://devzone.nordicsemi.com/thread/448420?ContentTypeID=1</link><pubDate>Sat, 30 Sep 2023 15:39:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b99a2a9-7364-4524-9bfc-4e4ee5fb6b99</guid><dc:creator>fran_ce</dc:creator><description>&lt;p&gt;Thank you very much! &lt;br /&gt;After some tries I finally managed it!&amp;nbsp;&lt;br /&gt;I was encoding the payload in the wrong way, but your guide has been very helpful with this, very appreciate.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Francesco&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RESET command value via bluetooth</title><link>https://devzone.nordicsemi.com/thread/445897?ContentTypeID=1</link><pubDate>Wed, 13 Sep 2023 15:41:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c681297-0471-4ad8-b11e-6235c745d282</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Francesco,&lt;/p&gt;
&lt;p&gt;The specification for the SMP commands can be found here:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.2/zephyr/services/device_mgmt/smp_protocol.html"&gt;SMP Protocol Specification — Zephyr Project documentation (nRF Connect SDK) (nordicsemi.com)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As far as I can see, the value from the nRF Connect App for Android that you noted down looks correct.&lt;/p&gt;
&lt;p&gt;A thing to note is that, as noted in the protocol specification, the Sequence Number is supposed to increment with each subsequent command. &lt;br /&gt;In my tests, I see that&amp;nbsp;it doesn&amp;#39;t seem to matter, so it might not explain your setup not working. Nonetheless, please try to increment the Sequence Number appropriately in your future attempts.&lt;/p&gt;
&lt;p&gt;Finally, the Data&amp;nbsp;is a CBOR encoded, and is just empty. The encoding library used in the app simply encodes empty data, &lt;span style="background-color:rgba(128, 128, 128, 1);color:rgba(255, 255, 255, 1);font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;{}&lt;/span&gt;&amp;nbsp;as a &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;BF FF&lt;/span&gt;, with a Data Length of 2. You can keep it as is.&lt;/p&gt;
&lt;p&gt;So, the command you will want is:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;02-00-00-02-00-00-&amp;lt;Sequence Number&amp;gt;-05-BF-FF&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;I am not familiar with the react-native-ble-plx library. If you really want someone to join you looking into it, I can.&amp;nbsp;As of right now, I can only make these suggestions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family:inherit;"&gt;Please see if it is possible to enable logging to see what the library tries to send to the device.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family:inherit;"&gt;Please check if the&amp;nbsp;&lt;/span&gt;byte order is handled differently in that library.
&lt;ul&gt;
&lt;li&gt;For a quick test, you can try to get it to talk with the Nordic UART Service instead. This service handles notifications as ASCII strings.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the device end,&amp;nbsp;you can configure the following Kconfig to get logging from the BLE Transport of the SMP module:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_MCUMGR_TRANSPORT_LOG_LEVEL_DBG=y
CONFIG_LOG_MAX_LEVEL=4

# Need immediate logging or the device will reset 
# before the hex dump of the command is printed
# For debugging purpose only
CONFIG_LOG_MODE_IMMEDIATE=y

# Set SMP Transport work queue stack size unreasonably large 
# to prevent stack overflow due to immediate logging
# For debugging purpose only
CONFIG_MCUMGR_TRANSPORT_WORKQUEUE_STACK_SIZE=8192

# Optionally switching logging backend to UART
CONFIG_LOG_BACKEND_RTT=n 
CONFIG_LOG_BACKEND_UART=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;With that, I was able to log that the device reset at&amp;nbsp;the same command you found:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1694617596476v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RESET command value via bluetooth</title><link>https://devzone.nordicsemi.com/thread/445686?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 16:39:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bee77084-ede6-48d6-ac99-6be9539d1cd7</guid><dc:creator>fran_ce</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;thank you for your fast reply.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You&amp;#39;re correct, the GATT Service I&amp;#39;m using is the SMP Server you linked.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to figure out the format of the string to encode in Base64 to pass as value&amp;nbsp;of the write function&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RESET command value via bluetooth</title><link>https://devzone.nordicsemi.com/thread/445558?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 08:54:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:193d6411-1edf-4afc-9286-49f8e892ec4a</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Francesco,&lt;/p&gt;
&lt;p&gt;Welcome to DevZone!&lt;/p&gt;
&lt;p&gt;In the nRF Connect SDK, our default BLE GATT Service for device management is &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.2/zephyr/services/device_mgmt/smp_transport.html"&gt;the SMP Server&lt;/a&gt;. However, it&amp;nbsp;seems like you have a certain communication protocol going on.&lt;/p&gt;
&lt;p&gt;The details don&amp;#39;t appear familiar to me. Could you please tell me what GATT Service you are using?&lt;/p&gt;
&lt;p&gt;Regards,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>