Hello,
I am new to BLE Mesh and working with Zephyr. However, I've found the supported BLE Mesh samples to be very helpful in understanding the protocol and the environment.
I am working on evaluating BLE Mesh by modifying the mesh_demo sample. My goal is to create a two device types, each of which should self provision. The first device is a publisher and the second a subscriber.
For both device types I used the vendor model definition and related initialization.
Right now the data being sent is arbitrary and the publisher is working just fine with no issues. However, the subscription device has a strange issue. From my testing I have found that the custom vendor model appkey is being set successfully but the appkey index value for the custom model structure is not being updated during the self provisioning process.
Doing some further debug and extra print statements, I see that the subscription device is receiving packets from the publisher but at the access layer the issue is revealed:
To me, this looks like the appkey index for the subscription device model is 0xFFFF which would indicate that it has not been updated. The relevant code for this setup is here:
None of the configure functions returns any type of error, and, if I manually update the model structure the appkey index does work: