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

[Proxy] Sending messages from nrf mesh app to nrf board

Hi all,

I am working on sending messages from nrf mesh app (proxy client) to proxy server (nrf 52832 DK : running light switch example from nrf5 sdk for mesh v. 3.1.0).  After provisioning and configuration of the light switch server example we are ready to send messages from nrf mesh app:

This control is really nice, but when I have my own model implemented, there is no such a nice control interface for sending messages. To use the light switch server example for simplicity, I just changed the model id to get the following: 

In the first line there is necessary to input "Opcode without company id" - so I typed 0x8203 as it is opcode for GENERIC_ONOFF_OPCODE_SET_UNACKNOWLEDGED. In the second line there are necessary "Parameters". The parameters for Unacknowledged SET message are packed in the structure as follows: 1 byte onoff value, 1 byte transaction id, 1 byte transition time, 1 byte delay:

typedef struct __attribute((packed))
{
    uint8_t on_off;                                         /**< State to set */
    uint8_t tid;                                            /**< Transaction number for application */
    uint8_t transition_time;                                /**< Encoded transition time value */
    uint8_t delay;                                          /**< Encoded message execution delay in 5 millisecond steps */
} generic_onoff_set_msg_pkt_t;

As the SET message can be without items transition_time and delay, in the second line I typed: 0x0105 (0x01 as ON value, 0x05 as some transaction ID). But the LED on the board did not light up. The question is, what to type into those two lines to make the LED turn on/turn off. I ask, because this knowledge is necessary for controlling my own model from nrf mesh app.

Related