Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Commissioning my nRF52840 based thread device by starting joiner role as default

Hello, 

I am using nRF5 SDK for Thread v4.1 for thread implementation using nRF52840 SOC. I have used mqtt-sn sleepy publisher as my base example to develop my software. 

I would like to know the step by step procedure  of how i can commission my device with USB disabled. In general scenario and in docs we start joiner role from thread joiner device using thread CLI interface. But my final product won't have cli to save power. So i would like to know how could it start it from  the my code. 

So here is what i wish for : 

Fresh Thread Device -> If thread device not commissioned Starts Joiner Role from software (if not commissioned already)  -> than using thread app i scan the QR code to commission the device.  

Here is a video link by google: https://www.youtube.com/watch?v=JPXw5Hw--4M&list=PL6ZGUO-7lngtBO-jeUnc3-4obV4fkv70g at 35:40 minute in video you can see thread commissioning video from Mrs Vaas. In the video, the device is already in joiner state if not commissioned already.  

I would like to implement something like that as i am at the end of my software development, this seamless commissioning is my final task. 

Secondly i would also like to know how can i delete all the commissioned data from the end device in case i want to re-commission my device. 

So can anyone please help me with the code implementation of how can i achieve this .

Parents
  • Hello,

    I am not sure how to guide you in this question. You can tell from our examples how to commission devices. How you transfer data from a phone app, via IP to a border router and back to the thread leader is something you need to look into. Unfortunately, this is not my area of expertise. 

    The app from the video that you linked is from openthread. I suggest you see if you can find some information from there. Perhaps there is some guide in the border router documentation on openthread.io.

    If you have any questions on the nRF side of this, I will try to look into this, but I believe that your question is more related to the mobile app and "internet" side of openthread.

    Best regards,

    Edvin

  • Hello,

    I want to know how to start the joiner role when auto-commisioning is set to false from the code instead of manually typing in thread device cli. 

  • Do you mean how to call otThreadSetEnabled()? 

    That depends on your device. Do you have a button that you can use to trigger this call? Or you can say that this is called when you power on the device. In the video you can see that there are two different approaches. One where you scan a QR code, which probably just holds some information on the device, pulling it into the network, and the other has a touch screen that probably starts the commissioning process from the node. 

Reply
  • Do you mean how to call otThreadSetEnabled()? 

    That depends on your device. Do you have a button that you can use to trigger this call? Or you can say that this is called when you power on the device. In the video you can see that there are two different approaches. One where you scan a QR code, which probably just holds some information on the device, pulling it into the network, and the other has a touch screen that probably starts the commissioning process from the node. 

Children
  • Yes i am talking about the QR scan method. And for that i have to start joiner role on my end device. So i am asking how to start joiner role. 

    Do you mean how to call otThreadSetEnabled()? 

    yes this will be called after my device gets active dataset info. I have looked at NFC meshcop example to start joiner role with the PSK but my external commissioner my mobile device running thread app is not able to add device. It just says adding thread device to network. 

    I also followed this link for refference :electronut.in/.../

Related