I have a modified version of the Mesh 'serial' example to which I have already added 5 custom models without any problems, but encountered a problem when attempting to integrate the "pb_remote_client" model to my project. Everything compiles and appears to function correctly, but in operation after receiving a multi-segment (3) message on one of my custom models, it appears to fail to send an ACK, then drop an "Application memory access" error crashing out.
<t: 6806>, main.c, 316, Bluetooth Mesh Serial Interface Application started! <t: 185583>, transport.c, 931, Got segment 0 <t: 189125>, transport.c, 931, Got segment 1 <t: 192468>, transport.c, 931, Got segment 2 <t: 192473>, transport.c, 611, Sending ACK... <t: 192488>, transport.c, 1045, Message decrypted <t: 192508>, access.c, 253, RX: [aop: 0x00C0] <t: 192513>, access.c, 276, RX: Msg: 1115011205000000000000FFFFFFFFFFFFFFFF04FF <t: 192530>, access.c, 425, TX: [aop: 0x00C1] <t: 192535>, access.c, 426, TX: Msg: 00E000E0C0F3 <t: 192539>, main.c, 227, message_handle callback called <t: 195822>, transport.c, 931, Got segment 0 <t: 199219>, transport.c, 931, Got segment 1 <t: 202803>, transport.c, 931, Got segment 2 <t: 202808>, transport.c, 611, Sending ACK... <t: 289214>, transport.c, 931, Got segment 0 <t: 292533>, transport.c, 931, Got segment 1 <t: 296043>, transport.c, 931, Got segment 2 <t: 296048>, transport.c, 611, Sending ACK... <t: 378580>, transport.c, 931, Got segment 0 <t: 382094>, transport.c, 931, Got segment 1 <t: 385631>, transport.c, 931, Got segment 2 <t: 385636>, transport.c, 611, Sending ACK... <t: 563597>, app_error_weak.c, 99, Application memory access: 375680:1073741824
I rolled back to my previous working save before trying to add the "pb_remote_client" model, and the minimum change I need to make to my code to reproduce the error is simply increasing the ACCESS_MODEL_COUNT defined in 'nrf_mesh_config_app.h' from 7 (5+2) to 8. Recompiling with the increased ACCESS_MODEL_COUNT definition recreates this issue, even with no references to the new model.
From the comment before ACCESS_MODEL_COUNT, it sounds like this is a define that should be allowed to be too high, it just needs to be "equal at least to the number of models needed by the application plus two", but is is possible that this number must match and my issue is that I wasn't implementing "pb_remote_client" correctly?
I currently have all 7 models on a single element, and was trying to fit the new model there as well. Is there some maximum number of models per element I missed somewhere? All of my models are unique, so I'd like to stick to a single element for the addressing simplicity if possible.
Thanks,
Jeremy
Edit: This 3-segment message that causes the fault is also the very first message received by my custom model after provisioning. Provisioning still works without issue, but I'm not sure if the error is due to the message being multi-segmented, or potentially any message received by the custom model would trigger this behavior once ACCESS_MODEL_COUNT is incremented.