Cannot bind app key for one of the model with PYACI Script

Hello

I am trying to bind app key for one of the models with the help of PYACI Python script. I am using latest version v5.0.0 for PYACI script and downloaded it here: https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh , also with same version of documentation for commands https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v2.1.1%2Fmd_scripts_interactive_pyaci_README.html.  And I am using Raspberry pi where my py script is running and nRF52840 with Serial Script running connected to Raspberry Pi with Ports /dev/ttyACM0 (or) /dev/ttyACM1. I am trying to bind app key for Sensor_Server Example and i get like this where all the earlier commands works well.

NOTE: examples are connected to Laptop which is obvious where we can run with bluetooth

 I also tried with Mesh Chat sample like above and get same problem

Another Question: we can identify the sample with last model ID where vendor Setup Model ID bound to "0059000a" which is 8 bit and where it should be 4 bit. Even in app i get the same ID

which is ok to setup in app but in this command - cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x1000)) it should have only 4 bit right?

Please help me as soon as possible. I really in need of help to continue my work further

Regards

Parents
  • Hi Sai,

    While getting the PyACI script to work, I ran into the same error.

    The cause of the error, for my case, was that the nodes at index 0 (db.nodes[0]) was not the Light Bulb node that I am trying to interact with.
    When I determine and use the correct node index, things work as it

    should.

    Could you please check your database.json and see if the nodes you want to talk with are not at index 0?

    If you need help with checking that, you could copy the content of the file into a code block here.

    Regards,

    Hieu

  • Hello

    I apologise for my late response. Here is my content and i am trying to provision Sensor Server Example from nordic samples. Still not able to resolve this issue.

    Regards

  • I have tested the Mesh Chat sample in another DevZone question 1-2 weeks ago and it worked just fine. The nodes can talk to each other correctly. Do you expect them to speak to each other or to the PyACI script?

    Regards,

    Hieu

  • I expect to speak each other not to PyACI script, but as i told you there is problems to index numbers for me can u explain me in detail how to provision them with commands here please

    Just curious is there a way they can speak to PyACI too?

    Regards

  • I was not able to reproduce the index problem. I will try again today, but I'd like to answer quickly about the PyACI part. I doubt that the PyACI script is able to speak to the Mesh Chat devices out of the box. To talk with the Mesh Chat devices, a device needs the Mesh Chat vendor model, which the script doesn't have.

    You can consider building that model yourself.

    I will try to get to the index problem again in the afternoon. So far that has been very weird. I have a theory that maybe the index value expected is not the index in the node database but the index in the list of devices scanned/currently found...

    In your earlier report, I understand that the second device needs index == 0, but what about the first one? Does it also work with index == 0?

  • In your earlier report, I understand that the second device needs index == 0, but what about the first one? Does it also work with index == 0?

    Yes first one also works with index==0 but i could not complete the provisioning process as i have problem in publication step, command number: 26.

    Regards

  • I still cannot reproduce the problem where the second node provisioned need to use index 0 to work.

    I am wondering if you are using the correct parameters with publish_set() part...

    Could you please post the full log of your attempt, in text form. In addition to the normal steps, each time before you call model_app_bind(), please also you run the following:

    len(db.nodes)
    db.nodes[0]
    db.nodes[1]

    Remember to redact the device key from the output of db.nodes[x].


    I checked the printing scanned device address topic. This is currently not possible, because the serial firmware on the interface device does not send this information back to the script. See: Serial Event Details > Prov Unprovisioned Received.

    If this is very important, I think you can look into the Serial example and see if you can update both the device firmware and the PyACI script to send, receive, and parse the advertising name in the Unprovisioned Received event.


    SaSu said:
    but i could not complete the provisioning process as i have problem in publication step, command number: 26.

    The publication step is a part of the configuration, not the provisioning. I suspect this might have the same root cause as the index mix up. 

Reply
  • I still cannot reproduce the problem where the second node provisioned need to use index 0 to work.

    I am wondering if you are using the correct parameters with publish_set() part...

    Could you please post the full log of your attempt, in text form. In addition to the normal steps, each time before you call model_app_bind(), please also you run the following:

    len(db.nodes)
    db.nodes[0]
    db.nodes[1]

    Remember to redact the device key from the output of db.nodes[x].


    I checked the printing scanned device address topic. This is currently not possible, because the serial firmware on the interface device does not send this information back to the script. See: Serial Event Details > Prov Unprovisioned Received.

    If this is very important, I think you can look into the Serial example and see if you can update both the device firmware and the PyACI script to send, receive, and parse the advertising name in the Unprovisioned Received event.


    SaSu said:
    but i could not complete the provisioning process as i have problem in publication step, command number: 26.

    The publication step is a part of the configuration, not the provisioning. I suspect this might have the same root cause as the index mix up. 

Children
  • Can you help me with the model id how to use 8 digit to 4 digit id:

    I suspect this might have the same root cause as the index mix up. 

    yes i also have the same idea

  • SaSu said:
    Can you help me with the model id how to use 8 digit to 4 digit id:

    Look at the ModelId class __init__ method, you can see that it accepts both the model_id and the company_id.

    The company_id is relevant and should not be left default for the case of Vendor Models, and the Chat Model is one. Thus, instead of calling mt.ModelId() with the full four-byte ID, please call it with the two-byte Model ID and then the two-byte Company ID.

  • The company_id is relevant and should not be left default for the case of Vendor Models, and the Chat Model is one. Thus, instead of calling mt.ModelId() with the full four-byte ID, please call it with the two-byte Model ID and then the two-byte Company ID.

    still says invalid model

    {
      "$schema": "",
      "appKeys": [
        {
          "boundNetKey": 0,
          "index": 0,
          "key": "REDACTED",
          "name": "lights"
        },
        {
          "boundNetKey": 0,
          "index": 1,
          "key": "REDACTED",
          "name": "locks"
        }
      ],
      "groups": [
        {
          "address": 49153,
          "name": "Room 1",
          "parentAddress": 0
        },
        {
          "address": 49154,
          "name": "Room 2",
          "parentAddress": 0
        }
      ],
      "ivIndex": 0,
      "ivUpdate": 0,
      "meshName": "BT Mesh",
      "meshUUID": "01020304050607080102030405060708",
      "netKeys": [
        {
          "index": 0,
          "key": "REDACTED",
          "minSecurity": "low",
          "name": "root",
          "phase": 0
        }
      ],
      "nodes": [
        {
          "UUID": "7faea34d1484433380515cb2eb7b8ccc",
          "appKeys": [
            0
          ],
          "cid": "0059",
          "configComplete": false,
          "crpl": 10,
          "deviceKey": "REDACTED",
          "elements": [
            {
              "index": 0,
              "location": "0001",
              "models": [
                {
                  "modelId": "0000"
                },
                {
                  "modelId": "0002"
                },
                {
                  "modelId": "0059000a"
                }
              ]
            }
          ],
          "features": {
            "friend": 0,
            "lowPower": 2,
            "proxy": 0,
            "relay": 0
          },
          "name": "chat",
          "netKeys": [
            0
          ],
          "pid": "0000",
          "security": "low",
          "unicastAddress": 16,
          "vid": "0000"
        }
      ],
      "provisioners": [
        {
          "UUID": "00000000000000000000000000000000",
          "allocatedGroupRange": [
            {
              "highAddress": 65279,
              "lowAddress": 49152
            }
          ],
          "allocatedUnicastRange": [
            {
              "highAddress": 32767,
              "lowAddress": 16
            }
          ],
          "name": "BT Mesh Provisioner"
        }
      ],
      "timestamp": "2023-04-04 18:29:38.250859"
    }

  • Your parameters order is backwards. 0x0059 is the Company ID for Nordic, and 0x000A is the Vendor Model ID for the Chat Model that Nordic decided.

    See: Chat sample walk-through — nRF Connect SDK 2.3.0 documentation (nordicsemi.com)

  • Oh yes right thank you.

    Could you please post the full log of your attempt, in text form. In addition to the normal steps, each time before you call model_app_bind(), please also you run the following:

    ## This is 1st and 2nd node provisioning ##
    
    In [1]: db = MeshDB("database/example_database.json")
    
    In [2]: db.provisioners
    Out[2]: [{'name': 'BT Mesh Provisioner', 'UUID': _UUID(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), 'allocated_unicast_range': [{'low_address': 0010, 'high_address': 7fff}], 'allocated_group_range': [{'low_address': c000, 'high_address': feff}]}]
    
    In [3]: p = Provisioner(device, db)
    
    In [4]: 2023-04-04 21:54:47,078 - INFO - COM6: Success
    2023-04-04 21:54:47,080 - INFO - COM6: Success
    2023-04-04 21:54:47,084 - INFO - COM6: SubnetAdd: {'subnet_handle': 0}
    2023-04-04 21:54:47,088 - INFO - COM6: AppkeyAdd: {'appkey_handle': 0}
    2023-04-04 21:54:47,091 - INFO - COM6: AppkeyAdd: {'appkey_handle': 1}
    In [4]:
    
    In [4]: p.scan_start()
    
    2023-04-04 21:54:53,633 - INFO - COM6: Success
    In [5]: 2023-04-04 21:54:53,754 - INFO - COM6: Received UUID 7faea34d1484433380515cb2eb7b8ccc with RSSI: -50 dB
    In [5]:
    
    In [5]: p.scan_stop()
    
    2023-04-04 21:55:00,198 - INFO - COM6: Success
    In [6]: p.provision(name="chat")
    
    In [7]: 2023-04-04 21:55:13,857 - INFO - COM6: Provision: {'context': 0}
    2023-04-04 21:55:13,917 - INFO - COM6: Link established
    2023-04-04 21:55:14,053 - INFO - COM6: Received capabilities
    2023-04-04 21:55:14,054 - INFO - COM6: Number of elements: 1
    2023-04-04 21:55:14,058 - INFO - COM6: OobUse: {'context': 0}
    2023-04-04 21:55:14,311 - INFO - COM6: ECDH request received
    2023-04-04 21:55:14,317 - INFO - COM6: EcdhSecret: {'context': 0}
    2023-04-04 21:55:14,927 - INFO - COM6: Provisioning complete
    2023-04-04 21:55:14,927 - INFO - COM6:  Address(es): 0x10-0x10
    2023-04-04 21:55:14,929 - INFO - COM6:  Device key: REDACTED
    2023-04-04 21:55:14,930 - INFO - COM6:  Network key: REDACTED
    2023-04-04 21:55:14,932 - INFO - COM6: Adding device key to subnet 0
    2023-04-04 21:55:14,932 - INFO - COM6: Adding publication address of root element
    2023-04-04 21:55:14,936 - INFO - COM6: DevkeyAdd: {'devkey_handle': 8}
    2023-04-04 21:55:14,937 - INFO - COM6: AddrPublicationAdd: {'address_handle': 0}
    2023-04-04 21:55:15,105 - INFO - COM6: Provisioning link closed
    In [7]:
    
    In [7]: cc = ConfigurationClient(db)
    
    In [8]: device.model_add(cc)
    
    In [9]: cc.publish_set(8, 0)
    
    In [10]: cc.composition_data_get()
    
    In [11]: 2023-04-04 21:55:42,796 - INFO - COM6: PacketSend: {'token': 1}
    2023-04-04 21:55:42,825 - INFO - COM6: {event: MeshTxComplete, data: {'token': 1}}
    In [11]:
    
    In [11]: cc.composition_data_get()
    
    In [12]: 2023-04-04 21:55:52,327 - INFO - COM6: PacketSend: {'token': 2}
    2023-04-04 21:55:52,350 - INFO - COM6: {event: MeshTxComplete, data: {'token': 2}}
    2023-04-04 21:55:52,503 - INFO - COM6.ConfigurationClient: Received composition data (page 0x00): {
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": 10,
      "features": {
        "relay": 0,
        "proxy": 0,
        "friend": 0,
        "low_power": 2
      },
      "elements": [
        {
          "index": 0,
          "location": "0001",
          "models": [
            {
              "modelId": "0000"
            },
            {
              "modelId": "0002"
            },
            {
              "modelId": "0059000a"
            }
          ]
        }
      ]
    }
    In [12]:
    
    In [12]: cc.appkey_add(0)
    
    In [13]: 2023-04-04 21:55:55,314 - INFO - COM6: PacketSend: {'token': 3}
    2023-04-04 21:55:55,367 - INFO - COM6: {event: MeshTxComplete, data: {'token': 3}}
    2023-04-04 21:55:55,436 - INFO - COM6.ConfigurationClient: Appkey status: AccessStatus.SUCCESS
    2023-04-04 21:55:55,438 - INFO - COM6.ConfigurationClient: Appkey add 0 succeded for subnet 0 at node 0010
    In [13]:
    
    In [13]: cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x0059,0x000a))
    
    In [14]: 2023-04-04 21:56:12,008 - INFO - COM6: PacketSend: {'token': 4}
    2023-04-04 21:56:12,031 - INFO - COM6: {event: MeshTxComplete, data: {'token': 4}}
    2023-04-04 21:56:12,043 - INFO - COM6.ConfigurationClient: Model app bind status: AccessStatus.INVALID_MODEL
    In [14]:
    
    In [14]: cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x0059,0x000a,0x0059))
    ---------------------------------------------------------------------------
    TypeError                                 Traceback (most recent call last)
    Cell In[14], line 1
    ----> 1 cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x0059,0x000a,0x0059))
    
    TypeError: ModelId.__init__() takes from 2 to 3 positional arguments but 4 were given
    
    In [15]: cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x000a,0x0059))
    
    In [16]: 2023-04-04 21:56:40,723 - INFO - COM6: PacketSend: {'token': 5}
    2023-04-04 21:56:40,749 - INFO - COM6: {event: MeshTxComplete, data: {'token': 5}}
    2023-04-04 21:56:40,757 - INFO - COM6.ConfigurationClient: Model app bind status: AccessStatus.SUCCESS
    2023-04-04 21:56:40,761 - INFO - COM6.ConfigurationClient: Appkey bind 0 to model 0059000a at 0010
    In [16]:
    
    In [16]: p.scan_start()
    
    2023-04-04 21:57:30,853 - INFO - COM6: Success
    In [17]: 2023-04-04 21:57:35,388 - INFO - COM6: Received UUID 3442243ef35a46a58bbddbc10ca5395a with RSSI: -66 dB
    In [17]:
    
    In [17]: p.scan_stop()
    
    2023-04-04 21:57:42,453 - INFO - COM6: Success
    In [18]: p.provision(name="chat1")
    
    In [19]: 2023-04-04 21:57:54,168 - INFO - COM6: Provision: {'context': 0}
    2023-04-04 21:57:54,245 - INFO - COM6: Link established
    2023-04-04 21:57:54,382 - INFO - COM6: Received capabilities
    2023-04-04 21:57:54,382 - INFO - COM6: Number of elements: 1
    2023-04-04 21:57:54,385 - INFO - COM6: OobUse: {'context': 0}
    2023-04-04 21:57:54,666 - INFO - COM6: ECDH request received
    2023-04-04 21:57:54,674 - INFO - COM6: EcdhSecret: {'context': 0}
    2023-04-04 21:57:57,268 - INFO - COM6: Provisioning complete
    2023-04-04 21:57:57,277 - INFO - COM6:  Address(es): 0x11-0x11
    2023-04-04 21:57:57,282 - INFO - COM6:  Device key: REDACTED
    2023-04-04 21:57:57,286 - INFO - COM6:  Network key: REDACTED
    2023-04-04 21:57:57,288 - INFO - COM6: Adding device key to subnet 0
    2023-04-04 21:57:57,290 - INFO - COM6: Adding publication address of root element
    2023-04-04 21:57:57,294 - INFO - COM6: DevkeyAdd: {'devkey_handle': 9}
    2023-04-04 21:57:57,297 - INFO - COM6: AddrPublicationAdd: {'address_handle': 1}
    2023-04-04 21:57:57,445 - INFO - COM6: Provisioning link closed
    In [19]:
    
    In [19]: cc.publish_set(9, 1)
    
    In [20]: cc.composition_data_get()
    
    In [21]: 2023-04-04 21:58:10,288 - INFO - COM6: PacketSend: {'token': 6}
    2023-04-04 21:58:10,313 - INFO - COM6: {event: MeshTxComplete, data: {'token': 6}}
    In [21]: cc.composition_data_get()
    
    In [22]: 2023-04-04 21:58:18,670 - INFO - COM6: PacketSend: {'token': 7}
    2023-04-04 21:58:18,693 - INFO - COM6: {event: MeshTxComplete, data: {'token': 7}}
    2023-04-04 21:58:18,847 - INFO - COM6.ConfigurationClient: Received composition data (page 0x00): {
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": 10,
      "features": {
        "relay": 0,
        "proxy": 0,
        "friend": 0,
        "low_power": 2
      },
      "elements": [
        {
          "index": 0,
          "location": "0001",
          "models": [
            {
              "modelId": "0000"
            },
            {
              "modelId": "0002"
            },
            {
              "modelId": "0059000a"
            }
          ]
        }
      ]
    }
    In [22]:
    
    In [22]: cc.appkey_add(0)
    
    In [23]: 2023-04-04 21:58:22,615 - INFO - COM6: PacketSend: {'token': 8}
    2023-04-04 21:58:22,681 - INFO - COM6: {event: MeshTxComplete, data: {'token': 8}}
    2023-04-04 21:58:22,753 - INFO - COM6.ConfigurationClient: Appkey status: AccessStatus.SUCCESS
    2023-04-04 21:58:22,755 - INFO - COM6.ConfigurationClient: Appkey add 0 succeded for subnet 0 at node 0011
    In [23]:
    
    In [23]: cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x0059,0x000a))
    
    In [24]: 2023-04-04 21:58:34,760 - INFO - COM6: PacketSend: {'token': 9}
    2023-04-04 21:58:34,791 - INFO - COM6: {event: MeshTxComplete, data: {'token': 9}}
    2023-04-04 21:58:34,804 - INFO - COM6.ConfigurationClient: Model app bind status: AccessStatus.INVALID_ADDRESS
    In [24]:
    
    In [24]: cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x000a,0x0059))
    
    In [25]: 2023-04-04 21:58:50,665 - INFO - COM6: PacketSend: {'token': 10}
    2023-04-04 21:58:50,686 - INFO - COM6: {event: MeshTxComplete, data: {'token': 10}}
    2023-04-04 21:58:50,694 - INFO - COM6.ConfigurationClient: Model app bind status: AccessStatus.INVALID_ADDRESS
    In [25]:
    
    In [25]: cc.model_app_bind(db.nodes[1].unicast_address + 1, 0, mt.ModelId(0x000a,0x0059))
    
    In [26]: 2023-04-04 22:01:04,558 - INFO - COM6: PacketSend: {'token': 11}
    2023-04-04 22:01:04,580 - INFO - COM6: {event: MeshTxComplete, data: {'token': 11}}
    2023-04-04 22:01:04,592 - INFO - COM6.ConfigurationClient: Model app bind status: AccessStatus.INVALID_ADDRESS
    In [26]:
    
    In [26]: cc.model_app_bind(db.nodes[0].unicast_address + 1, 0, mt.ModelId(0x000a,0x0059))
    
    In [27]: 2023-04-04 22:01:14,926 - INFO - COM6: PacketSend: {'token': 12}
    2023-04-04 22:01:14,952 - INFO - COM6: {event: MeshTxComplete, data: {'token': 12}}
    2023-04-04 22:01:14,962 - INFO - COM6.ConfigurationClient: Model app bind status: AccessStatus.SUCCESS
    2023-04-04 22:01:14,964 - INFO - COM6.ConfigurationClient: Appkey bind 0 to model 0059000a at 0011
    
    *********************************************************************************************************************************************************************************************************************************
    ## This is 3rd node provisioning ##
    In [1]: db = MeshDB("database/example_database.json")
    
    In [2]: db.provisioners
    Out[2]: [{'name': 'BT Mesh Provisioner', 'UUID': _UUID(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), 'allocated_unicast_range': [{'low_address': 0010, 'high_address': 7fff}], 'allocated_group_range': [{'low_address': c000, 'high_address': feff}]}]
    
    In [3]: p = Provisioner(device, db)
    
    In [4]: 2023-04-04 22:19:31,223 - INFO - COM6: Success
    2023-04-04 22:19:31,225 - INFO - COM6: Success
    2023-04-04 22:19:31,229 - INFO - COM6: SubnetAdd: {'subnet_handle': 0}
    2023-04-04 22:19:31,233 - INFO - COM6: AppkeyAdd: {'appkey_handle': 0}
    2023-04-04 22:19:31,237 - INFO - COM6: AppkeyAdd: {'appkey_handle': 1}
    In [4]:
    
    In [4]: p.scan_start()
    
    2023-04-04 22:19:42,574 - INFO - COM6: Success
    In [5]: 2023-04-04 22:19:44,391 - INFO - COM6: Received UUID 3442243ef35a46a58bbddbc10ca5395a with RSSI: -57 dB
    In [5]:
    
    In [5]: p.scan_stop()
    
    2023-04-04 22:19:52,264 - INFO - COM6: Success
    In [6]: p.provision(name="chat2")
    
    In [7]: 2023-04-04 22:20:23,601 - INFO - COM6: Provision: {'context': 0}
    2023-04-04 22:20:23,676 - INFO - COM6: Link established
    2023-04-04 22:20:23,813 - INFO - COM6: Received capabilities
    2023-04-04 22:20:23,813 - INFO - COM6: Number of elements: 1
    2023-04-04 22:20:23,816 - INFO - COM6: OobUse: {'context': 0}
    2023-04-04 22:20:26,155 - INFO - COM6: ECDH request received
    2023-04-04 22:20:26,163 - INFO - COM6: EcdhSecret: {'context': 0}
    2023-04-04 22:20:26,760 - INFO - COM6: Provisioning complete
    2023-04-04 22:20:26,760 - INFO - COM6:  Address(es): 0x12-0x12
    2023-04-04 22:20:26,761 - INFO - COM6:  Device key: REDACTED
    2023-04-04 22:20:26,761 - INFO - COM6:  Network key: REDACTED
    2023-04-04 22:20:26,763 - INFO - COM6: Adding device key to subnet 0
    2023-04-04 22:20:26,764 - INFO - COM6: Adding publication address of root element
    2023-04-04 22:20:26,768 - INFO - COM6: DevkeyAdd: {'devkey_handle': 8}
    2023-04-04 22:20:26,769 - INFO - COM6: AddrPublicationAdd: {'address_handle': 0}
    2023-04-04 22:20:26,930 - INFO - COM6: Provisioning link closed
    In [7]:
    
    In [7]: cc = ConfigurationClient(db)
    
    In [8]: device.model_add(cc)
    
    In [9]: cc.publish_set(8, 0)
    
    In [10]: cc.composition_data_get()
    
    In [11]: 2023-04-04 22:29:09,505 - INFO - COM6: PacketSend: {'token': 1}
    2023-04-04 22:29:09,534 - INFO - COM6: {event: MeshTxComplete, data: {'token': 1}}
    2023-04-04 22:29:09,686 - INFO - COM6.ConfigurationClient: Received composition data (page 0x00): {
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": 10,
      "features": {
        "relay": 0,
        "proxy": 0,
        "friend": 0,
        "low_power": 2
      },
      "elements": [
        {
          "index": 0,
          "location": "0001",
          "models": [
            {
              "modelId": "0000"
            },
            {
              "modelId": "0002"
            },
            {
              "modelId": "0059000a"
            }
          ]
        }
      ]
    }
    In [11]:
    
    In [11]: cc.appkey_add(0)
    
    In [12]: 2023-04-04 22:29:21,802 - INFO - COM6: PacketSend: {'token': 2}
    2023-04-04 22:29:21,863 - INFO - COM6: {event: MeshTxComplete, data: {'token': 2}}
    2023-04-04 22:29:21,933 - INFO - COM6.ConfigurationClient: Appkey status: AccessStatus.SUCCESS
    2023-04-04 22:29:21,936 - INFO - COM6.ConfigurationClient: Appkey add 0 succeded for subnet 0 at node 0012
    In [12]:
    
    In [12]: len(db.nodes)
    Out[12]: 3
    
    In [13]: db.nodes[0]
    Out[13]: {'UUID': _UUID(b'\x7f\xae\xa3M\x14\x84C3\x80Q\\\xb2\xeb{\x8c\xcc'), 'device_key': Key(REDACTED), 'unicast_address': 0010, 'net_keys': [{'index': 0}], 'config_complete': False, 'name': 'chat', 'security': <SecurityLevel.LOW: 'low'>, 'cid': 0059, 'vid': 0000, 'pid': 0000, 'crpl': 000a, 'features': {'relay': <FeatureState.DISABLED: 0>, 'proxy': <FeatureState.DISABLED: 0>, 'friend': <FeatureState.DISABLED: 0>, 'low_power': <FeatureState.NOT_SUPPORTED: 2>}, 'elements': [{'index': 0, 'location': 0001, 'models': [{'model_id': 0000, 'subscribe': [], 'publish': None, 'bind': []}, {'model_id': 0002, 'subscribe': [], 'publish': None, 'bind': []}, {'model_id': 0059000a, 'subscribe': [], 'publish': None, 'bind': [0]}], 'name': ''}], 'app_keys': [0], 'secure_network_beacon': None, 'network_transmit': None, 'relay_retransmit': None, 'default_TTL': None}
    
    In [14]: db.nodes[1]
    Out[14]: {'UUID': _UUID(b'4B$>\xf3ZF\xa5\x8b\xbd\xdb\xc1\x0c\xa59Z'), 'device_key': Key(REDACTED), 'unicast_address': 0011, 'net_keys': [{'index': 0}], 'config_complete': False, 'name': 'chat1', 'security': <SecurityLevel.LOW: 'low'>, 'cid': 0059, 'vid': 0000, 'pid': 0000, 'crpl': 000a, 'features': {'relay': <FeatureState.DISABLED: 0>, 'proxy': <FeatureState.DISABLED: 0>, 'friend': <FeatureState.DISABLED: 0>, 'low_power': <FeatureState.NOT_SUPPORTED: 2>}, 'elements': [{'index': 0, 'location': 0001, 'models': [{'model_id': 0000, 'subscribe': [], 'publish': None, 'bind': []}, {'model_id': 0002, 'subscribe': [], 'publish': None, 'bind': []}, {'model_id': 0059000a, 'subscribe': [], 'publish': None, 'bind': [0]}], 'name': ''}], 'app_keys': [0], 'secure_network_beacon': None, 'network_transmit': None, 'relay_retransmit': None, 'default_TTL': None}
    
    In [15]: db.nodes[2]
    Out[15]: {'UUID': _UUID(b'4B$>\xf3ZF\xa5\x8b\xbd\xdb\xc1\x0c\xa59Z'), 'device_key': Key(REDACTED), 'unicast_address': 0012, 'net_keys': [{'index': 0}], 'config_complete': False, 'name': 'chat2', 'security': <SecurityLevel.LOW: 'low'>, 'cid': 0059, 'vid': 0000, 'pid': 0000, 'crpl': 10, 'features': {'relay': <FeatureState.DISABLED: 0>, 'proxy': <FeatureState.DISABLED: 0>, 'friend': <FeatureState.DISABLED: 0>, 'low_power': <FeatureState.NOT_SUPPORTED: 2>}, 'elements': [{'index': 0, 'location': 0001, 'models': [{'model_id': 0000, 'subscribe': [], 'publish': None, 'bind': []}, {'model_id': 0002, 'subscribe': [], 'publish': None, 'bind': []}, {'model_id': 0059000a, 'subscribe': [], 'publish': None, 'bind': []}], 'name': ''}], 'app_keys': [0], 'secure_network_beacon': None, 'network_transmit': None, 'relay_retransmit': None, 'default_TTL': None}
    
    In [16]:
    
    *********************************************************************************************************************************************************************************************************************************
    ## This is 3 nodes database file ##
    
    {
      "$schema": "",
      "appKeys": [
        {
          "boundNetKey": 0,
          "index": 0,
          "key": "REDACTED",
          "name": "lights"
        },
        {
          "boundNetKey": 0,
          "index": 1,
          "key": "REDACTED",
          "name": "locks"
        }
      ],
      "groups": [
        {
          "address": 49153,
          "name": "Room 1",
          "parentAddress": 0
        },
        {
          "address": 49154,
          "name": "Room 2",
          "parentAddress": 0
        }
      ],
      "ivIndex": 0,
      "ivUpdate": 0,
      "meshName": "BT Mesh",
      "meshUUID": "01020304050607080102030405060708",
      "netKeys": [
        {
          "index": 0,
          "key": "REDACTED",
          "minSecurity": "low",
          "name": "root",
          "phase": 0
        }
      ],
      "nodes": [
        {
          "UUID": "7faea34d1484433380515cb2eb7b8ccc",
          "appKeys": [
            0
          ],
          "cid": "0059",
          "configComplete": false,
          "crpl": "000a",
          "deviceKey": "REDACTED",
          "elements": [
            {
              "index": 0,
              "location": "0001",
              "models": [
                {
                  "modelId": "0000"
                },
                {
                  "modelId": "0002"
                },
                {
                  "bind": [
                    0
                  ],
                  "modelId": "0059000a"
                }
              ]
            }
          ],
          "features": {
            "friend": 0,
            "lowPower": 2,
            "proxy": 0,
            "relay": 0
          },
          "name": "chat",
          "netKeys": [
            0
          ],
          "pid": "0000",
          "security": "low",
          "unicastAddress": 16,
          "vid": "0000"
        },
        {
          "UUID": "3442243ef35a46a58bbddbc10ca5395a",
          "appKeys": [
            0
          ],
          "cid": "0059",
          "configComplete": false,
          "crpl": "000a",
          "deviceKey": "REDACTED",
          "elements": [
            {
              "index": 0,
              "location": "0001",
              "models": [
                {
                  "modelId": "0000"
                },
                {
                  "modelId": "0002"
                },
                {
                  "bind": [
                    0
                  ],
                  "modelId": "0059000a"
                }
              ]
            }
          ],
          "features": {
            "friend": 0,
            "lowPower": 2,
            "proxy": 0,
            "relay": 0
          },
          "name": "chat1",
          "netKeys": [
            0
          ],
          "pid": "0000",
          "security": "low",
          "unicastAddress": 17,
          "vid": "0000"
        },
        {
          "UUID": "3442243ef35a46a58bbddbc10ca5395a",
          "appKeys": [
            0
          ],
          "cid": "0059",
          "configComplete": false,
          "crpl": 10,
          "deviceKey": "REDACTED",
          "elements": [
            {
              "index": 0,
              "location": "0001",
              "models": [
                {
                  "modelId": "0000"
                },
                {
                  "modelId": "0002"
                },
                {
                  "modelId": "0059000a"
                }
              ]
            }
          ],
          "features": {
            "friend": 0,
            "lowPower": 2,
            "proxy": 0,
            "relay": 0
          },
          "name": "chat2",
          "netKeys": [
            0
          ],
          "pid": "0000",
          "security": "low",
          "unicastAddress": 18,
          "vid": "0000"
        }
      ],
      "provisioners": [
        {
          "UUID": "00000000000000000000000000000000",
          "allocatedGroupRange": [
            {
              "highAddress": 65279,
              "lowAddress": 49152
            }
          ],
          "allocatedUnicastRange": [
            {
              "highAddress": 32767,
              "lowAddress": 16
            }
          ],
          "name": "BT Mesh Provisioner"
        }
      ],
      "timestamp": "2023-04-04 22:29:21.933455"
    }
    

    uploaded all three nodes log and also database file looks like all three nodes also taking index "0".

    Regards

Related