I saw in this reply that the number of friendships a friend node can handle was limited by available RAM on the friend node. I set MESH_FRIEND_FRIENDSHIP_COUNT to 50 and after building the memory usage window in SES showed I still had 100KB of RAM free. After downloading and running, NRF_MESH_ASSERT on line 219 of core_tx.c was triggered:
NRF_MESH_ASSERT(m_bearer_count < CORE_TX_BEARER_COUNT_MAX);
core_tx.h had the following comment:
/** Maximum number of concurrent bearers. Limited by the number of bits in the * core_tx_bearer_bitmap_t type. */ #define CORE_TX_BEARER_COUNT_MAX 32
It seems like setting MESH_FRIEND_FRIENDSHIP_COUNT to anything over 29 triggers this mesh assert.
Does this mean 29 is the max LPN's a friend node can establish friendship with at one time regardless of available RAM?
Are there any other limitations on the number of friendships a friend node can handle?
Development Setup:
Custom development board using Fanstel BT840F module based on nRF52840
nRF5 SDK 16.0.0
nRF5 SDK for Mesh 4.0.0
SoftDevice 7.0.1 S140: Bluetooth 5