<?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>Controlling the nRF52833 dk using serial communication, without the Python application.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95215/controlling-the-nrf52833-dk-using-serial-communication-without-the-python-application</link><description>I am using the following setup: 
 
 A nRF52833 dk, running the serial example from the mesh sdk. 
 A nRF52840, running the light switch server example from the mesh sdk. 
 A pc running an application, which will send and receive serial commands to and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Jan 2023 19:40:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95215/controlling-the-nrf52833-dk-using-serial-communication-without-the-python-application" /><item><title>RE: Controlling the nRF52833 dk using serial communication, without the Python application.</title><link>https://devzone.nordicsemi.com/thread/403254?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 19:40:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6d3662c-45eb-49a1-9c47-e2424ebb285f</guid><dc:creator>Hieu</dc:creator><description>[quote user="SiemV"]I was wondering if you know how to determine the payload of this command, and the ones in my previous comment, or if I&amp;#39;m doing something else wrong entirely.[/quote]
&lt;p&gt;I merely know the concept that the ECDH Secret is going to be a&amp;nbsp;key sharing procedure to encrypt&amp;nbsp;messages. Thus, it makes sense that the payload has to be different each time.&amp;nbsp;(See more in &lt;a href="https://www.bluetooth.com/blog/provisioning-a-bluetooth-mesh-network-part-1/"&gt;this article&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;As for the implementation details of how exactly that key, and subsequently the message&amp;#39;s payload, is calculated/generated, I&amp;#39;m afraid that I don&amp;#39;t know.&lt;/p&gt;
&lt;p&gt;There are two directions I would recommend here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Modify the PyACI script into some sort of library that generates commands for your application&lt;br /&gt;This is the approach I better recommended, since it should save you a lot of time.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;Reverse engineering the ECDH Secret command of the PyACI script&lt;br /&gt;The ECDH Secret command is most likely involved in the /mesh/provisioning.py folder. But you probably know that.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="text-decoration:line-through;"&gt;For both approaches,&amp;nbsp;the PyACI source code is available here:&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/tree/master/scripts/interactive_pyaci"&gt;https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/tree/master/scripts/interactive_pyaci&lt;/a&gt;. But you probably already have that from the installation of the script.&lt;/span&gt;&lt;br /&gt;I embarrassed myself here, the script is available with the SDK.&lt;/p&gt;
&lt;p&gt;How&amp;nbsp;feasible do you think those approaches are for you?&lt;/p&gt;
&lt;p&gt;By the way, I am out of office for the rest of the week. If you need urgent&amp;nbsp;support, please mention and we will try to find an alternative.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Controlling the nRF52833 dk using serial communication, without the Python application.</title><link>https://devzone.nordicsemi.com/thread/403177?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 12:30:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2c877d6-3c28-4f03-b898-b4d61ef38d05</guid><dc:creator>SiemV</dc:creator><description>&lt;p&gt;The PyACI script and the PC application don&amp;#39;t do exactly the same thing yet. This is because some commands are different each time I provision the nRF52840, so they require a different payload every time. One of the commands that has this &amp;quot;issue&amp;quot; is the ECDH secret command.&lt;/p&gt;
&lt;p&gt;I was wondering if you know how to determine the payload of this command, and the ones in my previous comment, or if I&amp;#39;m doing something else wrong entirely.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Controlling the nRF52833 dk using serial communication, without the Python application.</title><link>https://devzone.nordicsemi.com/thread/402977?ContentTypeID=1</link><pubDate>Tue, 03 Jan 2023 13:51:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47e932b5-c02c-4ca5-91f4-6984082c978f</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;It seems you have&amp;nbsp;researched into this very thoroughly.&lt;/p&gt;
&lt;p&gt;Which makes it really strange to me that, are you saying even though both the PyACI script and your custom PC application are doing the same thing, your application doesn&amp;#39;t work, while the PyACI script works?&lt;/p&gt;
&lt;p&gt;Just double checking since that would be very strange.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Controlling the nRF52833 dk using serial communication, without the Python application.</title><link>https://devzone.nordicsemi.com/thread/402872?ContentTypeID=1</link><pubDate>Mon, 02 Jan 2023 20:23:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7443795e-3aa6-4198-ab73-5d50a02f584f</guid><dc:creator>SiemV</dc:creator><description>&lt;p&gt;Hey there,&lt;/p&gt;
&lt;p&gt;The nRF52833 dk is running the serial example from the nRF5 sdk for mesh.&lt;/p&gt;
&lt;p&gt;I have checked out both the serial commands and events documentation. On top of that, I have reviewed the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v5.0.0%2Fmd_doc_user_guide_modules_provisioning_implementing.html&amp;amp;cp=8_2_2_4_8_1" rel="noopener noreferrer" target="_blank"&gt;provisioning documentation&lt;/a&gt;. These pages allowed me to succesfully send various commands (Echo, provisioning scan start/stop Provisioning provision and various other provisioning related commands). I have also received various events from the nRF52833 (Provisioning unprovisioned received, Provisioning link established, Provisioning ECDH request and various other related events).&lt;/p&gt;
&lt;p&gt;What I do not understand is exactly which commands to send, in what order, and with what payload. I have tried following the Implementing provisioning documentation (linked above), by sending the commands displayed in the &amp;quot;provisioning procedure&amp;quot; diagram. In this order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Provisioning scan start&lt;/li&gt;
&lt;li&gt;(After an Unprovisioned received event is received) Provisioning scan stop&lt;/li&gt;
&lt;li&gt;Provisioning provision&lt;/li&gt;
&lt;li&gt;(After a Provisioning capabilities event is received) Provisioning OOB Use&lt;/li&gt;
&lt;li&gt;(After a Provisioning ECDH request event is received) Provisioning ECDH secret&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After sending the Provisioning ECDH secret command, a Provisioning link cloded event is received.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Controlling the nRF52833 dk using serial communication, without the Python application.</title><link>https://devzone.nordicsemi.com/thread/402865?ContentTypeID=1</link><pubDate>Mon, 02 Jan 2023 17:19:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b04c6f81-983f-47e1-bebc-aa3c69bb775b</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi SiemV,&lt;/p&gt;
&lt;p&gt;Sorry for the&amp;nbsp;wait.&lt;/p&gt;
&lt;p&gt;What kind of application are you running on your nRF52833 DK?&lt;/p&gt;
&lt;p&gt;Did you check out the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v5.0.0/md_doc_user_guide_modules_serial_cmd.html"&gt;Serial Commands&lt;/a&gt; and &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v5.0.0/md_doc_user_guide_modules_serial_evt.html"&gt;Serial Events&lt;/a&gt; documentation pages? I would expect them to provide more information than reverse engineering the PyACI script&amp;#39;s communications.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Controlling the nRF52833 dk using serial communication, without the Python application.</title><link>https://devzone.nordicsemi.com/thread/402462?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2022 16:44:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef22d4b7-a1f6-4cda-bce3-111fd11114a5</guid><dc:creator>SiemV</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;Thank you for your answer and sorry for not being complete with my information.&lt;/p&gt;
&lt;p&gt;I intend not to use the PyACI script. My goal is to communicate exclusively using a desktop application I&amp;#39;m working on, which will be using regular serial communication.&lt;/p&gt;
&lt;p&gt;I have used the PyACI script and through this way, I have been able to make the nRF52833 dk provision and control the connected nRF52840 node. In other words, I have achieved all desired functionality (see original post) that needs to be implemented in the desktop application using the PyACI script.&lt;/p&gt;
&lt;p&gt;I have also been able to provision the nRF52840 (running the same light switch server example) using the nRF mesh mobile app. However, I have not been able to provision the nRF52833 dk (running the same serial example) with the mesh app. This is because&amp;nbsp;the nRF52833&amp;nbsp;dk requires some setting up before it can be provisioned, and I&amp;nbsp;cannot figure out how to do that succesfully, either through the PyACI script or regular serial communication.&lt;/p&gt;
&lt;p&gt;Using a serial port monitor, I have analysed the traffic back and forth between the PyACI script and the nRF52833 dk during the provisioning process. I have tried to recreate this process manually, but failed to do so because some of the commands (like for example the provisioning ECDH secret) are different each time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Controlling the nRF52833 dk using serial communication, without the Python application.</title><link>https://devzone.nordicsemi.com/thread/402460?ContentTypeID=1</link><pubDate>Wed, 28 Dec 2022 16:19:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1db5c09e-19e4-4522-979c-e4413e998e88</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi SiemV,&lt;/p&gt;
&lt;p&gt;In this thread&amp;#39;s title, you&amp;nbsp;mention you don&amp;#39;t want to use the Python library. However, in your post, you don&amp;#39;t mention this. So, to be on the same page, are you&amp;nbsp;willing to use the Interactive PyACI Script?&lt;/p&gt;
&lt;p&gt;If you are willing to use or are using the script, here is what &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v5.0.0/md_scripts_interactive_pyaci_README.html"&gt;its documentation&lt;/a&gt; says:&lt;/p&gt;
[quote user=""]&lt;p&gt;Commands available in the interface can be found in aci/aci_cmd.py. They are imported through the cmd namespace, for example cmd.Echo. Similarly, available events are found in aci/aci_evt.py and available in the evt namespace, for example evt.MeshMessageReceivedSubscription.&lt;/p&gt;[/quote]
&lt;p&gt;I have not tried this script myself, but based on the text above, you ought to be able to find the commands you need in aci_cmd.py.&lt;/p&gt;
&lt;p&gt;Have you also tried to provision the devices using a different method, like the &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nrf-mesh/getstarted"&gt;nRF Mesh Mobile App&lt;/a&gt; yet? It might be helpful to first try to get your mesh working as desired without using the Serial Interface yet; that would give you an idea of what to expect, as well as be sure that the rest of your setup works.&lt;/p&gt;
&lt;p&gt;If&amp;nbsp;my suggestions above can&amp;#39;t work for you,&amp;nbsp;let me know and we can figure something else out.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;em&gt;Due to Christmas &amp;amp; New Year Holidays, our team is currently understaffed and will take longer than usual for responses and follow-ups. Our apologies for the inconvenience.&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>