49 #include "nrf_mesh_defines.h" 50 #include "nrf_mesh_config_core.h" 63 #define NRF_MESH_INITIAL_TOKEN 0x00000000ul 65 #define NRF_MESH_SERVICE_BORDER_TOKEN 0xF0000000ul 73 #define NRF_MESH_FRIEND_TOKEN_BEGIN 0xFFFFFE00ul 75 #define NRF_MESH_FRIEND_TOKEN_END 0xFFFFFEFFul 77 #define NRF_MESH_FRIEND_POLL_TOKEN 0xFFFFFFF8ul 78 #define NRF_MESH_FRIEND_REQUEST_TOKEN 0xFFFFFFF9ul 79 #define NRF_MESH_FRIEND_CLEAR_TOKEN 0xFFFFFFFAul 80 #define NRF_MESH_SUBMAN_ADD_TOKEN 0xFFFFFFFBul 81 #define NRF_MESH_SUBMAN_REMOVE_TOKEN 0xFFFFFFFCul 82 #define NRF_MESH_HEARTBEAT_TOKEN 0xFFFFFFFDul 83 #define NRF_MESH_SAR_TOKEN 0xFFFFFFFEul 84 #define NRF_MESH_RELAY_TOKEN 0xFFFFFFFFul 284 #if MESH_FEATURE_GATT_PROXY_ENABLED 433 #if (defined(S140) || defined(S130) || defined(S132) || defined(S112) || defined(S113) || defined(HOST)) 434 nrf_clock_lf_cfg_t lfclksrc;
436 nrf_clock_lfclksrc_t lfclksrc;
438 #error "Unknown target softdevice version" 442 const uint8_t * p_uuid;
538 uint32_t *
const p_packet_reference);
uint8_t observation_count
Counter of broadcast intervals.
uint32_t nrf_mesh_init(const nrf_mesh_init_params_t *p_init_params)
Initializes the Bluetooth Mesh stack.
uint32_t nrf_mesh_packet_send(const nrf_mesh_tx_params_t *p_params, uint32_t *const p_packet_reference)
Queues a mesh packet for transmission.
uint32_t nrf_mesh_disable(void)
Starts disabling the Mesh.
uint16_t data_id
ID for this particular event.
const uint8_t * p_virtual_uuid
128-bit virtual label UUID, will be NULL if type is not NRF_MESH_ADDRESS_VIRTUAL .
bool force_segmented
See Bluetooth Mesh Profile Specification (MshPRFv1.0.1) section 3.7.5.2.
#define NRF_MESH_KEY_SIZE
Size (in octets) of an encryption key.
uint16_t value
Address value.
Network security material structure.
Selects 4 byte MIC size for the transport PDU.
nrf_mesh_beacon_secmat_t secmat
Beacon security material.
const nrf_mesh_application_secmat_t * p_app
Required for transport layer encryption.
Selects default stack configured MIC size for the transport PDU.
Information structure for the Bluetooth Mesh network beacons.
uint8_t adv_type
BLE GAP advertising type.
The packet came from the scanner.
uint16_t interval
Actual beacon interval at the moment.
Mesh packet transmission parameters.
uint16_t data_len
Length of the payload being sent.
nrf_mesh_tx_token_t tx_token
Token that can be used as a reference in the TX complete callback.
bool(* nrf_mesh_relay_check_cb_t)(uint16_t src, uint16_t dst, uint8_t ttl)
Callback function type for checking if a given packet should be relayed on to other nodes...
uint8_t length
Length of the advertisement packet payload.
Application security material structure.
const uint8_t * p_data
Points to the payload to be sent.
The packet came from an Instaburst event.
Arguments structure for the RX callback function.
uint32_t nrf_mesh_enable(void)
Enables the Mesh.
nrf_mesh_address_type_t
Bluetooth Mesh address types.
nrf_mesh_beacon_secmat_t secmat_updated
Beacon security material during key refresh.
Event ID for an extended advertising event with Instaburst.
Run-time transmission information for individual beacons.
IV update procedure in progress.
The packet came from a GATT connection.
void nrf_mesh_subnet_added(uint16_t net_key_index, const uint8_t *p_network_id)
Notify the core stack that a subnet was added to the device.
uint16_t src
Address of the element the packet originates from (must be a unicast address).
Bluetooth Mesh security material structure.
nrf_mesh_address_type_t type
Address type.
bool iv_update_permitted
Flag indicating whether the given structure is allowed to initiate an IV update.
bool nrf_mesh_process(void)
Runs the mesh packet processing process.
void nrf_mesh_rx_cb_clear(void)
Unregister the RX callback, if any.
uint8_t irq_priority
Application IRQ priority (NRF_MESH_IRQ_PRIORITY_LOWEST or NRF_MESH_IRQ_PRIORITY_THREAD).
void(* nrf_mesh_rx_cb_t)(const nrf_mesh_adv_packet_rx_data_t *p_rx_data)
Advertisement received callback function type.
nrf_mesh_beacon_tx_info_t * p_tx_info
Pointer to a transmission info structure.
nrf_mesh_tx_token_t nrf_mesh_unique_token_get(void)
Get unique token to be able to recognize tx complete events.
uint32_t nrf_mesh_tx_token_t
TX Token type, used as a context parameter to notify the application of ended transmissions.
nrf_mesh_relay_check_cb_t relay_cb
Application call back for relay decisions, can be NULL.
nrf_mesh_key_refresh_phase_t
Key refresh phase.
nrf_mesh_transmic_size_t transmic_size
Transport MIC Size selection.
nrf_mesh_rx_source_t
RX packet type.
Initialization parameters structure.
uint16_t rx_count
Rolling number of beacons received in each preceding period.
uint8_t ttl
Time to live value for the packet, this is a 7 bit value.
nrf_mesh_address_t dst
Packet destination address.
uint8_t set_id
ID for the set this event belongs in.
nrf_mesh_transmic_size_t
Message MIC size selection.
void nrf_mesh_rx_cb_set(nrf_mesh_rx_cb_t rx_cb)
Set a callback which will be called for every received non-filtered packet.
Selects 8 byte MIC size for the transport PDU.
void(* nrf_mesh_assertion_handler_t)(uint32_t pc)
Mesh assertion handler type.
uint8_t nid
Network identifier.
uint8_t aid
Application ID.
The packet came from this device.
const nrf_mesh_rx_metadata_t * p_metadata
Metadata structure for the given packet.
uint32_t nrf_mesh_on_sd_evt(uint32_t sd_evt)
Pass SoftDevice SoC events to the Mesh.
Security material for the Bluetooth Mesh network beacons.
#define NRF_MESH_NETID_SIZE
Size (in octets) of the network ID.
timestamp_t tx_timestamp
Last transmission time for this beacon.
bool is_device_key
Indicates whether the device key or the application is used.
net_state_iv_update_t
State of IV update procedure.
const nrf_mesh_network_secmat_t * p_net
Required for network layer encryption.
nrf_mesh_secmat_t security_material
Required for encryption.
const uint8_t * p_payload
Pointer to the raw advertisement packet payload.