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
  • Hi,

    Can you give me more details about your use-case/what you are trying to do? Why do you want to add the serial example to the light switch example?

    You might want to look at this.

  • 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

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

Reply
  • 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

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

Children
No Data
Related