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

Reading command payload in zigbee callback

Hello all! 

I have been modifying the door_lock_nus example to add the set pin command (0x05 from zcl reference). So I have modified the zigbee callback to read the new command, and I am doing it right with:

switch (cmd_info -> cmd_id)
{
    case ZB_ZCL_CMD_DOOR_LOCK_SET_PIN_CODE:
    ...
    break;
}

The procces is as follows:

1.- Start the coordinator and establish connection between the boards.

2.- Bind the devices and send lock/unlock commands.

3.- Try to send the set pin code command by sending: zcl cmd f4ce3693d838e02b 1 0101 -p 0104 05 0x000000001234

4.- The device enters the ZB_ZCL_CMD_DOOR_LOCK_SET_PIN_CODE case but I'm stuck in getting thee payload.

My problem is that the set pin code command has a payload and I can't figure out how to read it. Do I need to use "ZB_ZCL_GENERAL_GET_NEXT_READ_ATTR_RES"? What's the way to go?

Parents Reply Children
No Data
Related