47 #include "nrf_mesh_defines.h" 48 #include "nrf_mesh_config_core.h" 117 uint8_t packet_index;
118 bool is_last_in_chain;
202 typedef struct nrf_mesh_beacon_timer
207 void (*callback)(uint32_t,
void*);
298 const uint8_t * p_netid, uint32_t iv_index,
bool iv_update,
bool key_refresh);
411 #if (defined(S140) || defined(S130) || defined(S132) || defined(HOST)) 412 nrf_clock_lf_cfg_t lfclksrc;
414 nrf_clock_lfclksrc_t lfclksrc;
416 #error "Unknown target softdevice version" 505 uint32_t *
const p_packet_reference);
uint32_t nrf_mesh_init(const nrf_mesh_init_params_t *p_init_params)
Initializes the Bluetooth Mesh stack.
nrf_mesh_beacon_secmat_t secmat_updated
Beacon security material during key refresh.
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 tx_timestamp
Last transmission time for this beacon.
uint32_t nrf_mesh_disable(void)
Disables the Mesh.
const uint8_t * p_virtual_uuid
128-bit virtual label UUID, will be NULL if type is not NRF_MESH_ADDRESS_VIRTUAL .
#define NRF_MESH_KEY_SIZE
Size (in octets) of an encryption key.
uint16_t value
Address value.
bool reliable
See Section 3.7.5.2 in the Mesh Profile Specification v1.0.
nrf_mesh_assertion_handler_t assertion_handler
Assert callback function.
Network security material structure.
const nrf_mesh_application_secmat_t * p_app
Required for transport layer encryption.
nrf_mesh_net_beacon_cb_t callback
Callback function for received beacons.
uint16_t tx_interval_seconds
Current beacon interval in seconds.
uint8_t adv_type
BLE GAP advertising type.
The packet came from the scanner.
Mesh packet transmission parameters.
uint16_t data_len
Length of the payload being sent.
Bluetooth Mesh beacon timer structure.
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.
nrf_mesh_beacon_secmat_t secmat
Beacon security material.
The packet came from a friend node.
The packet came from an Instaburst event.
Arguments structure for the RX callback function.
uint32_t nrf_mesh_enable(void)
Enables the Mesh.
uint32_t timestamp
Timestamp at which the beacon is sent.
nrf_mesh_address_type_t
Bluetooth Mesh address types.
Run-time transmission information for individual beacons.
IV update procedure in progress.
uint32_t nrf_mesh_on_ble_evt(ble_evt_t *p_ble_evt)
Pass SoftDevice BLE events to the Mesh.
The packet came from a GATT connection.
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 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_THREAD if thread mode).
uint32_t interval
Interval between each beacon packet.
void(* nrf_mesh_rx_cb_t)(const nrf_mesh_adv_packet_rx_data_t *p_rx_data)
Advertisement received callback function type.
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.
The packet came from a low power node.
nrf_mesh_beacon_tx_info_t * p_tx_info
Pointer to a transmission info structure.
nrf_mesh_rx_source_t
RX packet type.
Initialization parameters structure.
uint16_t rx_count
Number of beacons received since this beacon was last transmitted.
uint8_t ttl
Time to live value for the packet, this is a 7 bit value.
bool iv_update_permitted
Flag indicating whether the given structure is allowed to initiate an IV update.
Information structure for the Bluetooth Mesh network beacons.
struct nrf_mesh_beacon_timer * p_next
Pointer to next beacon in linked list.
nrf_mesh_address_t dst
Packet destination address.
void nrf_mesh_rx_cb_set(nrf_mesh_rx_cb_t rx_cb)
Set a callback which will be called for every packet being received.
void * p_context
Beacon context pointer.
void(* nrf_mesh_assertion_handler_t)(uint32_t pc)
Mesh assertion handler type.
uint8_t nid
Network identifier.
uint8_t aid
Application ID.
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.
bool is_device_key
Indicates whether the device key or the application is used.
void(* nrf_mesh_net_beacon_cb_t)(const nrf_mesh_beacon_info_t *p_beacon, const uint8_t *p_netid, uint32_t iv_index, bool iv_update, bool key_refresh)
Callback function for incoming network beacons.
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.