This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Creating and sending messages to group in mesh using Serial Example (nRF Mesh v5.0.0)

Hardware: 

  • Raspberry Pi Zero W
  • nRF52840 DK running Serial Example and connected to RPi via USB
  • Custom nRF52840 board acting as a Vendor Model Server x 2

Software:

  • nRF SDK for Mesh v5.0.0

I realise there are multiple tickets with the same topic but I'd like a response to a more recent version of the SDK. I have two provisioned vendor server models that I want to make a group of but no documentation is provided in the Interactive PyACI tutorial. I'd then like to send a message to this group and hopefully receive acknowledged replies. It is not exactly clear where to start. 

From what I understand I need to:

1) Create a group

2) Give it a group address id and get the address handle

3) Use the configuration client to make the Servers subscribe to messages from the group

4) Send the message to the group address handle

How do I do this using interactive_pyaci and the serial example?

Parents
  • Hi again

    We took a closer look at this on our end, and it seems like you've stumbled upon a bug in our types.py file in the SDK. In line 296, the MAX = 3780000 should actually be MAX = 37800000. The biggest possible step value (max_steps, that is 0x3F) times the largest possible multiplier (10 * 60 * 1000). If you either add a 0 to the MAX value on your end or if you set MAX = 0x3F * 10 * 60 * 1000 that should fix this error message for you.

    Thank you for reporting this so we were able to find it. It's now been reported internally and we'll be looking to fix it in a future release.

    Best regards,

    Simon

Reply
  • Hi again

    We took a closer look at this on our end, and it seems like you've stumbled upon a bug in our types.py file in the SDK. In line 296, the MAX = 3780000 should actually be MAX = 37800000. The biggest possible step value (max_steps, that is 0x3F) times the largest possible multiplier (10 * 60 * 1000). If you either add a 0 to the MAX value on your end or if you set MAX = 0x3F * 10 * 60 * 1000 that should fix this error message for you.

    Thank you for reporting this so we were able to find it. It's now been reported internally and we'll be looking to fix it in a future release.

    Best regards,

    Simon

Children
  • Thanks this solved that particular issue for me. I also needed help from this ticket to get publishing to pyaci working, in particular:

    [1]: device.send(cmd.AddrSubscriptionAdd(db.groups[0].address))
    2021-09-02 09:56:21,114 - INFO - ttyACM0: AddrSubscriptionAdd: {'address_handle': 2}

    helped to enable the pyaci client subscribe to messages from that group. In addition:

    if event._opcode == Event.MESH_MESSAGE_RECEIVED_UNICAST or event._opcode == Event.MESH_MESSAGE_RECEIVED_SUBSCRIPTION:

     helped to direct the subscribed messages to the event handler. Now all the nodes publish to that address and send messages happily. Special thanks to timvan and AdamWaterman in that ticket.

    I have another problem now. When I do:

    [3]: gc.publish_set(0, db.groups[0].address)
    [4]: gc.set(True)
    2021-09-02 11:37:24,488 - ERROR - ttyACM0: PacketSend: ERROR_REJECTED

    My intention is to send the set message to all nodes that correspond to that group address however, I am getting this rejected message. Is this wrong in some way?

  • Please create a new ticket where you describe your issue in detail, as this isn't really related to the initial ticket. Here on DevZone we strive to keep each ticket to its original subject so it's easier to search for what you're looking for in the future.

    Best regards,

    Simon

Related