It is stored in a 32 bits C type but we copy into a 32 bits array for sending which is wrong. Code is changed to copy into 24bits structure
Further fixing would include sending back a shorter length as the function sends back 4 bytes length instead of 3 bytes.
I suspect the other structure like 40bits and 56bits have the same issue
Orignal issue was that when sending 0x123456 was ending up as 0x345600 on the zigbee sniffer
It is stored in a 32 bits C type but we copy into a 32 bits array for sending which is wrong. Code is changed to copy into 24bits structure Further fixing would include sending back a shorter length as the function sends back 4 bytes length instead of 3 bytes. I suspect the other structure like 40bits and 56bits have the same issue Orignal issue was that when sending 0x123456 was ending up as 0x345600 on the zigbee sniffer