Hello,
I'm trying to publish values using a predefined message context.
This works fine when using bt_mesh_onoff_srv_pub or bt_mesh_lvl_srv_pub, but I get a crash as soon as I use bt_mesh_lightness_srv_pub.
So using this mesage context:
This works fine:
But this crashes:
I was able to somewhat track down the crash and the first crash seems to appear in the function ccm_auth in aes_ccm.c.
Sadly as I'm working with the nRF Dongle I don't get any output before the crash unless I'm adding a significant delay (2 seconds) at specific points before the crash. Doing this I was able to dig deeper and deeper into the SDK and find the abovementioned function.
But why would the encryption crash here? And why doesn't it crash for generic level and generic onoff models just the same?
I'm using a valid lightness server that is configured exactly the same as all other server models. Getting and setting works just fine from the app as well as from a client on the same chip. But publishing crashes.
Thanks in advance
EDIT:
I've tried to reduce potential error sources and thereby removed the context entirely. Instead I used the nRF Mesh App to set publication parameters.
These were set as follows:
I also reduced the input value to a constant, which kleaves the call as follows:
The node was reset, only the lightness server and a lightness client got an appkey assigned, publication was only set for lightness server.
The problem still stands, the chip crashes somewhere in bt_mesh_lightness_srv_pub, likely somewhere in the encryption part.
SDK used: nRF Connect SDK 1.9.1
EDIT2:
Actually I've just found out, that this seems to be a problem when using both