I'm new to BLE mesh SDK and I'm trying to explore available feature.
I'm referring to Generic on/off application and I would like to increase/ change the advertisement interval.
I tried by changing "BEARER_ADV_INT_DEFAULT_MS" macro but it dint change in the power consumption.
While going through doc I found one more "MESH_ADV_INTERVAL_DEFAULT" and I dint understand why this 2 are used.
Can you please suggest a user manual to understand completely this MESH SDK.
I see so many other packet interval related marcro like "NRF_MESH_PROV_BEARER_ADV_UNPROV_BEACON_INTERVAL_MSm, MESH_ADV_INTERVAL_DEFAULT" what about these 2?
In Bluetooth mesh there are several different cases of advertising, depending on the status of the device and what features are enabled on the node. E.g. provisioned or not, friend feature, relay feature, GATT proxy, etc. BLE advertisements are also used for the main "bearer" layer in the Bluetooth mesh stack. Hence a number of different advertising parameter settings.
For an overview of how Bluetooth mesh works, basic concepts, including a paragraph or two on power consumption, please have a look at Basic Bluetooth Mesh concepts from our online documentation.
BEARER_ADV_INT_DEFAULT_MS sets the general advertising interval for the ADV bearer.
NRF_MESH_PROV_BEARER_ADV_UNPROV_BEACON_INTERVAL_MS sets the advertising interval to use for the provisioning beacon, which is advertisements sent when the node is not part of any network yet, for it to be found by a provisioner.
Note that if the node is part of a network, and the relay feature is enabled, changing advertising parameters have negligible impact on power consumption as the node will use all non-TX time in RX.
Thanks for the reply.
In the example code I have not changed anything related to feature enable/disable part.I'm just using as is (BTW what feature are enabled by default in client and server example) and the device is in unprovisioned state.
By changing "NRF_MESH_PROV_BEARER_ADV_UNPROV_BEACON_INTERVAL_MS " macro value I can see the interval is getting changed in sniffer.
After provisioning, I see some packet it's sending out for every 6-8 seconds. How do I change this and packet scan/listen interval in provisioned and unprovisioned state.
Standard settings are set in mesh/core/api/nrf_mesh_config_core.h, and you can override them either in a specific config header for the particular project, or by preprocessor defines. See e.g. examples/light_switch/include/light_switch_example_common.h and examples/light_switch/client/include/nrf_mesh_config_app.h for the light switch client example.
What packets are sent from a node (and how often) depend on what models the node has, and their configuration.
All nodes will send packets according to the configuration of their models, which in practice means when a model has data to send. Either because the model is configured to periodically send status updates, because it responds to a request from another node, or because it gets triggered from the application (e.g. button press.) In addition to the models you put on the node there are also foundation models such as the configuration model and the health model.
Not really a model per se, but potentially sending packets is heartbeat, which is also subject to configuration through the configuration model.
Last but not least, there is the Secure Network beacon, which is collectively sent by the network every 10 seconds. That is, every tenth second on average one node in the network transmits the Secure Network beacon, which then gets relayed as any other packet through the network. (So if it is a relay node, it will send or retransmit a Secure Network beacon message every 10 second. If it is not a relay node it will send a Secure Network beacon message at an interval inversely proportional to the number of nodes in the network, clamped at 10 s minimum and 600 s maximum.)
Regarding scanning, nodes using the ADV bearer are constantly in RX when not in TX. The exception is "low power nodes", which communicates with the rest of the network via a "friend node" which buffers incoming messages for it. Nodes connecting to the network over the GATT bearer, through a GATT proxy node, use standard BLE connections with a TX/RX pattern given from the connection parameters.