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

To configure un-provisioned node using nrf mesh Serial integrated in light Switch example

I want to integrate nrf mesh serial example in light Switch example to configure other un-provisioned node

I am using following nrf SDK:
>> nrf : nRF5_SDK_15.2.0_9412b96
>> mesh : nrf5_SDK_for_Mesh_v3.2.0_src

The following Serial API as per serial example as been used in light Switch example:
- mesh_opt_prov_ecdh_offloading_set(true)
- nrf_mesh_serial_init(NULL)
- nrf_mesh_serial_enable()

I want to provision node using serial interface and interactive_pyaci.py
>> I am trying to provision a node but i am get continuously ERROR_REJECTED status code on send Provision data using opcode 0x63

But with only serial example its working fine, but if I integrate serial with light Switch example I am getting ERROR_REJECTED status code

I have checked both example's SDK_config.h, the only difference in light Switch example is GATT is enable and GATT parameters are defined.

Does anyone has on solution this.......

Parents Reply Children
  • Thank you for asking

    In my network there are 10 light switch server node and one client node. This client node is connected to my serial interface.

    It is simple light switch client example provided in nrf SDK, but in addition to it I also want to control and provision nodes in network via serial interface and also set/get data from provisioned node.

    If I use only serial example I can easily provision or control node in network

    But if ingratiated serial in light switch client node it gives ERROR_REJECTED

    like This

    1) db = MeshDB("database/example_database.json") >> ok response

    2) db.provisioners >> ok response

    3) p = Provisioner(device, db) >> ok response

    4) p.scan_start() >> Received UUID 0059ffff000000008007abda46190f5e with RSSI: -15 dB response

    5) p.scan_stop() >> ok response

    6) p.provision(name="Light bulb") >> ERROR_REJECTED

  • Can you instead of "p.provision(name="Light bulb")" use "p.provision(uuid="[UUID of the device]")? does this help?

  • Thank you fro relpying, yet not working in below both way

    In [10]: p.provision(uuid="6dc44d35fb9b8849bd4d30c83dbde258")

    In [11]: 2020-02-01 20:21:47,915 - ERROR - COM8: Provision: ERROR_REJECTED

    ---------------------------------------------------------------------------------------------------------------------------------------------

    2020-02-01 20:18:36,080 - INFO - COM8: Received UUID 6dc44d35fb9b8849bd4d30c83dbde258 with RSSI: -47 dB
    In [5]: p.scan_stop()

    In [6]: 2020-02-01 20:18:46,690 - INFO - COM8: Success
    In [6]: p.provision(uuid="[6dc44d35fb9b8849bd4d30c83dbde258]")
    ---------------------------------------------------------------------------
    ValueError Traceback (most recent call last)
    C:\nrf5_SDK_for_Mesh_v3.2.0_src\scripts\interactive_pyaci\interactive_pyaci.py in <module>
    ----> 1 p.provision(uuid="[6dc44d35fb9b8849bd4d30c83dbde258]")

    C:\nrf5_SDK_for_Mesh_v3.2.0_src\scripts\interactive_pyaci\mesh\provisioning.py in provision(self, uuid, key_index, name, context_id, attention_duration_s)
    266 uuid = self.unprov_list.pop(0)
    267 elif isinstance(uuid, str):
    --> 268 uuid = bytearray.fromhex(uuid)
    269 elif not isinstance(uuid, bytearray):
    270 raise TypeError("UUID must be string or bytearray")

    ValueError: non-hexadecimal number found in fromhex() arg at position 0

    ---------------------------------------------------------------------------------------------------------------------------------------------

  • Hi Mttrinh,

    I have debugged into mesh serial stack, I get this  "ERROR_REJECTED" because internal serial handler get the following error continuously 

    >> NRF_ERROR_NOT_SUPPORTED

    Please give me solution to over come this error

    Thank you in advance

  • Could you try disabling the GATT feature and see if that changes anything?

Related