This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is there a way to control the unprovisioned device (a light) with nrf5 sdk for mesh?

Hi support team,

I am a beginner with Nordic nrf5 sdk for mesh.  I begin with the sample light_switch. Currently I want to toggle the status (on/off) of the unprovisioned light by phone APP.

Is there a method to implement it?

I have read the source code and understood the sdk, but not clearly.   I just think that the APP can send the scan request after receiving the advertisement for provisioning service, 

and then at light side it will receive the scan request and BLE_GAP_EVT_SCAN_REQ_REPORT event can be handled.   I plan to toggle the status of the unprovisioned light when received 

the BLE_GAP_EVT_SCAN_REQ_REPORT  event. Is this method practicable? or Is there another way to implement this functionality? 

Any suggestion will be appreciated. 

Parents
  • Hi Hung,

    Thanks so much for your quick reply.

    As you said, there are 10 unprovisoned nodes A1-A10 (10 lights). Now I just want to provision for A4, but I don't know which one is A4, so before provisioning, I need to find A4.  Maybe it is more clearly.

  • What you can do is to click on the App to select A4 , then when it's connected to the phone (nRF Mesh app) you click on Identity. Then A4 will start to blink (if you implement that on a nRF52 DK kit the LED 1 to LED4 will start blinking). Then you would know which in the 10 nodes is A4 and can take the device. 

  • Please correct me if I'm wrong. So the problem here is that all of the nodes look identical from the outside, there is no serial number or anything. And you want to provision a particular node and you don't know the MAC address or the serial number of the node , correct  ? 

    If it's the case you can use RSSI (Received Signal Strength Indicator) . So if you want to provision a device, you can just pick it up , and bring it close to the phone. On the phone you only show the device with the RSSI higher than a certain level (very close to the phone). This way you can provision the device without the need to connect to every single one.

  • Hi Hung,

    Thanks so much for your patience for my question. Yes, you're right. 

    We're trying to figure out a solution for the situation like this: 

    In the manufactory, there are 100 same lights. We plan to create 5 mesh networks and each mesh network will include 20 lights. After these lights are powered up, we will use smartphone (nRF5 mesh app) to provision for every light and make each light into the corresponding network. If connect to every light to identify, maybe it would take too much time, so we meet the original question.

    If there isn't another way, the sample way (connect and identify) we have to use. 

  • Have you considered the RSSI solution I mentioned about ? If you want to set 20 pcs the light to one network, you just bring them closer to the phone, then you should be able to select only them. 

  • Hi Hung,

    Thanks for your suggestion.

    I noticed that the way (blink) to identify the unprovisioned device is implemented in light_switch example, but not implemented in light_lightness, light_ctl examples. so how to identify the unprovisioned device with these examples? Maybe I missed much about the sdk, but could you pls  give any suggestion? Thank you in advance!

  • Hi, 

    You just need to define the function to be called when the provisioner send "identify" . It's the input to mesh_provisionee_prov_start() function that's called inside start(). You can find device_identification_start_cb() is provided. You just need to provide the function (to blink an LED for example) into .prov_device_identification_start_cb

Reply Children
Related