This article describes what is the role of each of the advertising sets that are used by the Bluetooth Mesh stack. The advertising sets are briefly documented on the source code comments of the Bluetooth Mesh SDK examples, see following snippet from main.c:
// Bluetooth advertisement set configuration // // At minimum the following is required: // * One advertisement set for Bluetooth LE stack (handle number 0) // * One advertisement set for Mesh data (handle number 1) // * One advertisement set for Mesh unprovisioned beacons (handle number 2) // * One advertisement set for Mesh unprovisioned URI (handle number 3) // * N advertisement sets for Mesh GATT service advertisements // (one for each network key, handle numbers 4 .. N+3) // #define MAX_ADVERTISERS (4 + MESH_CFG_MAX_NETKEYS)
Here is a more verbose explanation for each set:
handle 0 - Bluetooth LE stack
This advertising set is reserved for "normal" BLE operation. For example, if user application starts advertising using command gecko_cmd_le_gap_set_mode (deprecated), then advertising set 0 is used. The mesh stack does not use this advertising set at all, it is reserved for user application.
handle 1 - Mesh data
This set is used for BLE Mesh data traffic. The stack is in control of the advertising data and the advertising parameters for this set, and the user application must not override the parameters or use this set for anything else.
handle 2 - Mesh unprovisioned beacons
This set is used for unprovisioned beacons (PB-ADV) by the mesh stack. The data advertised using this set is generated by the mesh stack, but the advertising parameters can be modified by the user application to control the cadence used in unprovisioned beacon advertising.
handle 3 - Mesh unprovisioned URI
Used only in case the device supports OOB data retrieval over URI. In that case, this set is used to advertise the URI (interleaved with the unprovisioned beacons). As with the unprovisioned beacons set, the stack generates the data to be advertised, but the user application is free to set the parameters controlling the advertising cadence.
handle 4 - Mesh GATT service advertisements
This handle is used for Mesh GATT service advertisements. If device is unprovisioned, then this handle is used for unprovisioned beacons (PB-GATT). For provisioned devices this handle is used for advertising the proxy service (if enabled).
Following article shows how to start your own BLE advertisements in a BLE mesh application: