<?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>Node configuration from my own mobile application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85863/node-configuration-from-my-own-mobile-application</link><description>Hi! 
 I want to be able to configure my nodes (assign AppKeys) from my own mobile application. I would like to know if it was posible to provision the nodes from the nordic app (as I always do) and then configure the nodes adding, deleting or changing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 17 Mar 2022 17:02:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85863/node-configuration-from-my-own-mobile-application" /><item><title>RE: Node configuration from my own mobile application</title><link>https://devzone.nordicsemi.com/thread/358734?ContentTypeID=1</link><pubDate>Thu, 17 Mar 2022 17:02:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0911d323-aaad-481e-b4b6-5855fc50901e</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;To your first two questions: You can use the CDB for transferring info from one app to another app on the same phone, yes. The format of the json file is specified by Bluetooth SIG, see &lt;a href="https://www.bluetooth.com/specifications/specs/mesh-configuration-database-profile-1-0/"&gt;https://www.bluetooth.com/specifications/specs/mesh-configuration-database-profile-1-0/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please note that the nRF Mesh app is not intended for end customers, but rather is a development tool for use when creating and testing Bluetooth mesh devices. Instead of relying on import and export between the nRF Mesh app and a custom app, it would be better to build everything into your custom app. All of the needed mesh functionality should be present in our &lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library"&gt;iOS&lt;/a&gt; and &lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library"&gt;Android&lt;/a&gt; mesh libraries.&lt;/p&gt;
&lt;p&gt;Regarding the use of app keys for controlling the lights, this is using app keys for a purpose that is drastically different from what it was intended for. In order to set different dimming levels from different switches, I would use e.g. generic level models instead of generic on/off, and let each switch send a different level.&lt;/p&gt;
&lt;p&gt;In nRF Connect SDK, you can have a look at the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/mesh/light_ctrl/README.html"&gt;Bluetooth: Mesh light fixture&lt;/a&gt; example, which supports dimmable lights.&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: Node configuration from my own mobile application</title><link>https://devzone.nordicsemi.com/thread/358502?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 20:31:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b469439-3c95-41fb-97ad-7b256f46b9bc</guid><dc:creator>Carlos Galiana</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Terje,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;First, thanks for the previous message.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;strong&gt;&lt;span class="notion-enable-hover"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="notion-enable-hover"&gt;&amp;quot;It is not quite clear if you are talking about a mobile app or an nRF side app, for what you refer to as &amp;quot;my app&amp;rdquo;&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span class="notion-enable-hover"&gt;Answer:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span class="notion-enable-hover"&gt;- I am talking about creating my own mobile application to control de AppKey configuration.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="notion-enable-hover"&gt;&amp;quot;There is a json format for transferring the configuration database from one device to another, which is implemented for the nRF Mesh app. There you can import and export the configuration database (CDB), so that you can e.g. provision devices with one phone, export the CDB, copy it over to the second phone, and import it to the nRF Mesh app on that phone.&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span class="notion-enable-hover"&gt;Doubts:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span class="notion-enable-hover"&gt;- It is possible create a mobile app where I just assign AppKeys with my own interface and then export that configuration database(CDB) to the nRF Mesh App by creating my own json? (nRF Mesh App and my custom mobile app in the same phone)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="notion-enable-hover"&gt;&amp;quot;We do not have an implementation of this json format for the nRF side application, so if you need to transfer network details (including network keys and device keys) to and from an nRF device, then it does require a custom implementation from your side.&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span class="notion-enable-hover"&gt;Doubts:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span class="notion-enable-hover"&gt;- I have exported the json file from the mesh I have been working for. I was thinking about create an application that import that json file from the nRF Mesh App, modify the groups with my custom interface and exported to the nRF Mesh app again.&amp;nbsp;&lt;/span&gt;&lt;span class="notion-enable-hover"&gt;Do you think that this would be the best way to implement it?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="notion-enable-hover"&gt;&amp;quot;I have one comment regarding your figure. A mesh model, such as the server model in &amp;quot;Mesh Light 1&amp;quot;, is assigned to one application key, not multiple. Typically, with the set of nodes that you have there, you would set one application key for use with &amp;quot;Mesh Light 1&amp;quot;, and use that application key for all switches controlling that light. For addressing, the light would typically subscribe to a group address, and the switches controlling that light publish to that same group address.&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span class="notion-enable-hover"&gt;Answer:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span class="notion-enable-hover"&gt;It is true.&amp;nbsp;I have corrected that representation&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span class="notion-enable-hover"&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1647461979204v1.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="notion-enable-hover"&gt;Basically I want the client to decide, through my custom mobile application, what switches to use for light 1 and which for light 2, and they can change this configuration whenever they want.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="notion-enable-hover"&gt;&amp;quot;Further, unless there are any security reasons for using different application keys for the two lights, all of the lighting would use the same application key.&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span class="notion-enable-hover"&gt;Answer:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span class="notion-enable-hover"&gt;I have given the example with lights and switches but I am implementing the OnOff model to an application in which I need to know which client has set the status &amp;quot;On&amp;quot; to the server. That is the reason I am using different Appkeys, because although switch 1 and 3 control the same light, they dont have the same effect on it. An example with lights: switch 1 causes light one to turn on with a certain intensity and switch 3 causes it to turn on with a different intensity.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span class="notion-enable-hover"&gt;Doubt:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;- How would you approach this problem?&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;- Is there any model or example in the SDK to solve my problem?&lt;/p&gt;
&lt;p&gt;Again, thanks a lot for your time.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span style="text-decoration:underline;"&gt;&lt;span class="notion-enable-hover"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="notion-enable-hover"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Node configuration from my own mobile application</title><link>https://devzone.nordicsemi.com/thread/358455?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 14:23:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5e74832-4196-4093-8f5c-83b91144423c</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]- Can I do the provisioning process with the nordic app and the appkey configuration with my app?[/quote]
&lt;p&gt;It is not quite clear if you are talking about a mobile app or an nRF side app, for what you refer to as &amp;quot;my app&amp;quot;. In order to configure a node, including assigning app keys, you do need the device key for that node. You mustalso be part of the network.&lt;/p&gt;
&lt;p&gt;There is a json format for transferring the configuration database from one device to another, which is implemented for the nRF Mesh app. There you can import and export the configuration database (CDB), so that you can e.g. provision devices with one phone, export the CDB, copy it over to the second phone, and import it to the nRF Mesh app on that phone. We do not have an implementation of this json format for the nRF side application, so if you need to transfer network details (including network keys and device keys) to and from an nRF device, then it does require a custom implementation from your side.&lt;/p&gt;
[quote user=""]- If I change an AppKey configuration with my app ¿does the nordic app update itself because of that change in the mesh?[/quote]
&lt;p&gt;It depends on the type of application key change. If you add new application keys to the network, then that change must be propagated for instance through use of a CDB sharing mechanism. If you merely change which application key known to a node is used for a particular model on that node, then that&amp;#39;s stored in the node&amp;#39;s configuration, and any provisioner (or other device with that node&amp;#39;s device key) would be able to read that information through that node&amp;#39;s configuration server model.&lt;/p&gt;
[quote user=""]- Do you know of any good source of information that talk about how to send these packages?[/quote]
&lt;p&gt;What SDK are you using? nRF connect SDK?&lt;/p&gt;
[quote user=""]- If this is not the correct way, how should I implemented?[/quote]
&lt;p&gt;I have one comment regarding your figure. A mesh model, such as the server model in &amp;quot;Mesh Light 1&amp;quot;, is assigned to one application key, not multiple. Typically, with the set of nodes that you have there, you would set one application key for use with &amp;quot;Mesh Light 1&amp;quot;, and use that application key for all switches controlling that light. For addressing, the light would typically subscribe to a group address, and the switches controlling that light publish to that same group address.&lt;/p&gt;
&lt;p&gt;Further, unless there are any security reasons for using different application keys for the two lights, all of the lighting would use the same application key. The application key is intended for one &amp;quot;application&amp;quot;, where &amp;quot;lighting system&amp;quot; can be one such application, &amp;quot;door lock&amp;quot; another, and so on. The purpose of the application keys is to divide the systems into different security domains, so that physical tampering with one device from one system doesn&amp;#39;t grant access to the functionality of other systems running over the same mesh network. There are scenarios where one might consider using different application keys for different lights, for instance for a hotel where for instance each room can get its own application key to prevent the guest in one room from tampering with the nodes of other rooms.&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>