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

Interactive PyACI : Group Publish/subscribe with server and client not working properly ?

Hello,

I am working with the Interactive PyACI (nRF_SDK_for_Mesh 4.0.0 with boards nRF52832). I followed the tutorial "demo_configuration" present in the doc folder.
Every works fine, I can scan, provision, bind servers and clients.
Now I want to have a set up where a server send "notification" and other boards, which are client I guess, will get the information = state change (with a genericOnOff).
So I think that correspond to the last point of the tutorial : #### Publishing and subscribing @anchor pyaci_demo_configuration_starting_configuration_5_publishing.
I did as said in the tutorial, It looks like server and client are well configured because I get all correct return message and the the Json file looks correct (see attach).
But when I set the server with gc.set(True), the led on the server board turn on but nothing happen on the client board.
Yet I suppose the led on the client board must turn on since in the tutorial it is written : "You should now be able to use the Generic OnOff client to change the state of the server and observe
that the client also changes its state accordingly".
Is it normal that nothing happen on the client board ? How can we make a proper publishing/subscribing to a group please ? :)

Wainting for an answer, Thank you very much !

{
  "$schema": "",
  "appKeys": [
    {
      "boundNetKey": 0,
      "index": 0,
      "key": "4f68ad85d9f48ac8589df665b6b49b8a",
      "name": "lights"
    },
    {
      "boundNetKey": 0,
      "index": 1,
      "key": "2aa2a6ded5a0798ceab5787ca3ae39fc",
      "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": "18eed9c2a56add85049ffc3c59ad0e12",
      "minSecurity": "low",
      "name": "root",
      "phase": 0
    }
  ],
  "nodes": [
    {
      "UUID": "1578bc42364ea4409a9b364acb9bf093",
      "cid": "0059",
      "configComplete": false,
      "crpl": 40,
      "deviceKey": "eb9f7f71eafde62a9998e37ce8b80005",
      "elements": [
        {
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000"
            },
            {
              "modelId": "0002"
            }
          ]
        },
        {
          "index": 1,
          "location": "0000",
          "models": [
            {
              "bind": [
                0
              ],
              "modelId": "1001",
              "subscribe": [
                49153
              ]
            }
          ]
        },
        {
          "index": 2,
          "location": "0000",
          "models": [
            {
              "modelId": "1001"
            }
          ]
        }
      ],
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 0,
        "relay": 0
      },
      "netKeys": [
        0
      ],
      "pid": "0000",
      "security": "low",
      "unicastAddress": 16,
      "vid": "0000"
    },
    {
      "UUID": "eb1be75149de7d4ea9f4e67a497feaaf",
      "cid": "0059",
      "configComplete": false,
      "crpl": 40,
      "deviceKey": "4a811697dfeed1c4a7652e5b49f26f91",
      "elements": [
        {
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000"
            },
            {
              "modelId": "0002"
            },
            {
              "bind": [
                0
              ],
              "modelId": "1000",
              "publish": {
                "address": 49153,
                "credentials": 0,
                "index": 0,
                "period": 0,
                "retransmit": {
                  "count": 0,
                  "interval": 50
                },
                "ttl": 1
              }
            }
          ]
        }
      ],
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 0,
        "relay": 0
      },
      "netKeys": [
        0
      ],
      "pid": "0000",
      "security": "low",
      "unicastAddress": 19,
      "vid": "0000"
    }
  ],
  "provisioners": [
    {
      "UUID": "00000000000000000000000000000000",
      "allocatedGroupRange": [
        {
          "highAddress": 65279,
          "lowAddress": 49152
        }
      ],
      "allocatedUnicastRange": [
        {
          "highAddress": 32767,
          "lowAddress": 16
        }
      ],
      "name": "BT Mesh Provisioner"
    }
  ],
  "timestamp": "2020-06-04 14:21:52.297678"
}

Parents
  • Hi ValentinL, 

    It's would be nice to get some more logging in formation on the client side and the server side. 
    We would need to know at which step it failed. 

    Please note that the client only listen to the status replied directly to it, not the status change broadcast by the server (AFAIK) . So if you send the command to change the LED state from the client (by click the button on the client) you should see LED get updated on both the client and the server. 


  • Hi,

    I'll provide you some logging information monday. But when you say "Please note that the client only listen to the status replied directly to it, not the status change broadcast by the server (AFAIK)", do you mean that if It is normal in my set up that there is no led change on the client ?
    I recall my set up : I have my provisionner which change state of the server (with gc.set()) and this server publish to a group. The client subscribe to this group. What should happen on the client when I do gc.set(True) ?
    Now I the led turn on on the server board (logic) but nothing happen on the client board.

    Yes I tried with a client by clicking on the button, the server also update. But is that note possible the other way around ? 
    The server publish and the client state change by subscribing ?

    I send you the log on monday,

    Thank you

  • Hi Valentin, 

    If you also set the client to subscribe to the same publication address of the server then you should be able to receive the status message on the client. 
    Please check the logging on the client. 
    Note that the guide in the .md could be a bit out of date. The new implementation of the light switch client in SDK v4.x doesn't update LEDs but only printout log. 

    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v4.1.0/md_examples_light_switch_client_README.html?cp=7_2_3_0_1

Reply Children
Related