13 #ifndef IN_BLE_PRF_MESH_H 14 #define IN_BLE_PRF_MESH_H 26 #include "./ble/in_ble_prf.h" 29 #define MESH_LABEL_UUID_LEN (16) 152 MESH_EVT_MODEL_OPCODE_REQ_IND = MESH_EVT_CODE+1,
153 MESH_EVT_MODEL_MSG_IND,
154 MESH_EVT_MODEL_MSG_SEND_IND,
155 MESH_EVT_MODEL_PUBLISH_PERIOD_IND,
156 MESH_EVT_ATTENTION_UPD_IND,
157 MESH_EVT_NODE_RESET_IND,
158 MESH_EVT_COMPO_DATA_REQ_IND,
159 MESH_EVT_CFG_UPD_IND,
160 MESH_EVT_FAULT_GET_REQ_IND,
161 MESH_EVT_FAULT_TEST_REQ_IND,
162 MESH_EVT_FAULT_CLEAR_IND,
163 MESH_EVT_FAULT_PERIOD_IND,
164 MESH_EVT_PROV_STATE_IND,
165 MESH_EVT_PROV_PARAM_REQ_IND,
166 MESH_EVT_PROV_AUTH_DATA_REQ_IND,
167 MESH_EVT_LPN_OFFER_IND,
168 MESH_EVT_LPN_STATUS_IND,
169 MESH_EVT_DBG_FRIEND_LPN_IND,
178 } mesh_evt_model_opcode_req_ind_t;
199 } mesh_evt_model_msg_ind_t;
209 } mesh_evt_model_msg_sent_ind_t;
218 } mesh_evt_model_publish_period_ind_t;
223 uint8_t attention_state;
224 } mesh_evt_attention_upd_ind_t;
230 } mesh_evt_compo_data_req_ind_t;
240 } mesh_evt_cfg_upd_ind_t;
335 uint8_t dev_uuid[16];
469 } mesh_register_model_t;
505 uint8_t trans_mic_64;
528 uint8_t fault_array[];
529 } mesh_health_status_t;
551 uint8_t pub_key_x[32];
553 uint8_t pub_key_y[32];
762 int in_ble_mesh_add(
void *hdl,
mesh_cfg_t *p_para, comp_cb callback);
763 int in_ble_mesh_enable(
void *hdl, comp_cb callback);
764 int in_ble_mesh_disable(
void *hdl, comp_cb callback );
765 int in_ble_mesh_get_run_time(
void *hdl, mesh_run_time_t *p_para, comp_cb callback);
766 int in_ble_mesh_set_run_time(
void *hdl, mesh_run_time_t *p_para, comp_cb callback);
767 int in_ble_mesh_register_model(
void *hdl, mesh_register_model_t *p_para, comp_cb callback);
768 int in_ble_mesh_load_stored_info(
void *hdl, uint8_t *buf ,uint32_t len, comp_cb callback);
769 int in_ble_mesh_buf_alloc(
void *hdl, mesh_buf_alloc_t *p_para, comp_cb callback);
770 int in_ble_mesh_buf_free(
void *hdl, uint8_t block_id, comp_cb callback);
772 int in_ble_mesh_model_resp(
void *hdl, mesh_model_rsp_t *p_para, comp_cb callback);
773 int in_ble_mesh_health_status_send(
void *hdl, mesh_health_status_t *p_para, comp_cb callback);
774 int in_ble_mesh_read_prov_pubkey(
void *hdl, comp_cb callback);
775 int in_ble_mesh_iv_upd_test_mode(
void *hdl,
bool update, comp_cb callback);
776 int in_ble_mesh_lpn_start(
void *hdl,
mesh_lpn_start_t *p_para, comp_cb callback);
777 int in_ble_mesh_lpn_stop(
void *hdl, comp_cb callback);
778 int in_ble_mesh_select_friend(
void *hdl, uint16_t friend_addr, comp_cb callback);
779 int in_ble_mesh_proxy_ctl(
void *hdl, uint8_t enable, comp_cb callback);
780 int in_ble_mesh_model_opcode_req_cfm(
void *hdl, uint8_t model_lid, uint16_t status, uint32_t opcode);
781 int in_ble_mesh_compo_data_cfm(
void *hdl, uint8_t page, uint16_t length, uint8_t *data);
782 int in_ble_mesh_fault_cfm(
void *hdl,
bool accept, uint16_t comp_id, uint8_t test_id, uint8_t length, uint8_t *fault_array);
784 int in_ble_mesh_prov_auth_data_cfm(
void *hdl, uint8_t accept, uint8_t auth_size, uint8_t *auth_data);
The provisioning protocol PDU is not recognized by the device.
Definition: in_ble_prf_mesh.h:87
uint8_t ttl
Publish TTL.
Definition: in_ble_prf_mesh.h:608
in_ble_m_tb_friend_event
List if friendship events.
Definition: in_ble_prf_mesh.h:723
struct mesh_dbg_data_send mesh_dbg_data_send_t
Send data command structure.
Friendship established with Low Power Node.
Definition: in_ble_prf_mesh.h:728
Cannot Update.
Definition: in_ble_prf_mesh.h:66
struct mesh_dbg_friend_lpn_ind mesh_dbg_friend_lpn_ind_t
Debug Friendship indication structure.
Start Low Power Node feature command structure.
Definition: in_ble_prf_mesh.h:532
Relay Node.
Definition: in_ble_prf_mesh.h:415
Mesh Provisioning Authentication Data Request.
Definition: in_ble_prf_mesh.h:373
Bit[3]: Output Numeric.
Definition: in_ble_prf_mesh.h:306
uint16_t addr
Publish address.
Definition: in_ble_prf_mesh.h:606
uint16_t addr
Address.
Definition: in_ble_prf_mesh.h:625
uint8_t friend_cred
Friendship credential flag.
Definition: in_ble_prf_mesh.h:616
Invalid AppKey Index.
Definition: in_ble_prf_mesh.h:50
uint8_t rx_window
Receive window value supported by the Friend node.
Definition: in_ble_prf_mesh.h:393
Lower Transport Layer.
Definition: in_ble_prf_mesh.h:710
Command Disallowed.
Definition: in_ble_prf_mesh.h:109
Bit[2]: Vibrate.
Definition: in_ble_prf_mesh.h:304
No OOB authentication is used.
Definition: in_ble_prf_mesh.h:362
Static OOB authentication is used.
Definition: in_ble_prf_mesh.h:364
uint8_t auth_size
expected authentication maximum data size
Definition: in_ble_prf_mesh.h:378
uint16_t comp_id
Company ID.
Definition: in_ble_prf_mesh.h:253
Friendship with Low Power Node has been lost.
Definition: in_ble_prf_mesh.h:730
uint16_t addr
Address.
Definition: in_ble_prf_mesh.h:684
Input OOB authentication is used.
Definition: in_ble_prf_mesh.h:368
uint16_t addr
Publish address.
Definition: in_ble_prf_mesh.h:570
Request to get the current Registered Fault state identified by Company ID for primary element...
Definition: in_ble_prf_mesh.h:243
Get content of subscription list Command structure.
Definition: in_ble_prf_mesh.h:646
mesh_prov_state
State of the provisioning.
Definition: in_ble_prf_mesh.h:277
Prohibited.
Definition: in_ble_prf_mesh.h:85
Look for address in the subscription list Command.
Definition: in_ble_prf_mesh.h:679
Friendship stopped due to local request.
Definition: in_ble_prf_mesh.h:143
uint8_t model_lid
Model LID.
Definition: in_ble_prf_mesh.h:640
uint8_t model_lid
Model LID.
Definition: in_ble_prf_mesh.h:651
uint32_t poll_intv_ms
Poll interval (in milliseconds)
Definition: in_ble_prf_mesh.h:537
uint8_t rx_window_factor
Receive window factor.
Definition: in_ble_prf_mesh.h:543
uint8_t model_lid
Model LID.
Definition: in_ble_prf_mesh.h:664
Invalid Publish Parameters.
Definition: in_ble_prf_mesh.h:58
uint8_t event
Event (.
Definition: in_ble_prf_mesh.h:756
uint8_t rssi_factor
RSSI factor.
Definition: in_ble_prf_mesh.h:541
struct mesh_dbg_mio_clear_subs_cmd mesh_dbg_mio_clear_subs_cmd_t
Clear content of subscription list Command structure.
Request time value is past.
Definition: in_ble_prf_mesh.h:115
uint8_t auth_method
Authentication method (.
Definition: in_ble_prf_mesh.h:376
Request to start a test procedure of primary element.
Definition: in_ble_prf_mesh.h:250
Inform about new publication period for Current Health state of primary element.
Definition: in_ble_prf_mesh.h:268
struct mesh_dbg_mio_get_subs_cmd mesh_dbg_mio_get_subs_cmd_t
Get content of subscription list Command structure.
uint16_t status
Status of the command execution.
Definition: in_ble_prf_mesh.h:599
MIC Error.
Definition: in_ble_prf_mesh.h:111
URI Hash present or not in the unprovisioned device beacon.
Definition: in_ble_prf_mesh.h:329
uint8_t layer
Layer to which data will be inserted (.
Definition: in_ble_prf_mesh.h:740
struct mesh_dbg_mio_subs mesh_dbg_mio_subs_t
Get content of subscription list Complete event structure.
mesh_prov_auth_method
Authentication Method field values.
Definition: in_ble_prf_mesh.h:359
uint16_t lpn_addr
Low Power Node address.
Definition: in_ble_prf_mesh.h:752
mesh_prov_in_oob
Input OOB Action field values.
Definition: in_ble_prf_mesh.h:313
uint16_t addr
Address of Friend node that sent the Friend Offer message.
Definition: in_ble_prf_mesh.h:391
uint16_t prim_addr
Primary address.
Definition: in_ble_prf_mesh.h:695
Add address in subscription list Command structure.
Definition: in_ble_prf_mesh.h:620
uint8_t period
Period for periodic status publishing.
Definition: in_ble_prf_mesh.h:610
uint8_t in_oob_size
Maximum size in octets of Input OOB supported.
Definition: in_ble_prf_mesh.h:347
Invalid NetKey Index.
Definition: in_ble_prf_mesh.h:52
uint16_t addr
Address.
Definition: in_ble_prf_mesh.h:638
uint32_t opcode
Operation code of the message.
Definition: in_ble_prf_mesh.h:489
uint16_t in_oob_action
Supported Input OOB Actions (.
Definition: in_ble_prf_mesh.h:351
Upper Transport Layer.
Definition: in_ble_prf_mesh.h:712
int8_t rssi
RSSI measured by the Friend node.
Definition: in_ble_prf_mesh.h:399
uint16_t friend_addr
Friend address.
Definition: in_ble_prf_mesh.h:408
Establishment failed due to failure during generation of friend keys.
Definition: in_ble_prf_mesh.h:139
uint16_t features
Mask of supported features (.
Definition: in_ble_prf_mesh.h:439
Bit[4]: Output Alphanumeric.
Definition: in_ble_prf_mesh.h:308
uint32_t period_fault_ms
Publication period in milliseconds when one or several fault are known.
Definition: in_ble_prf_mesh.h:273
Set Model Publication Parameter Command structure.
Definition: in_ble_prf_mesh.h:562
Beacon Layer.
Definition: in_ble_prf_mesh.h:716
Cannot Remove.
Definition: in_ble_prf_mesh.h:68
struct mesh_dbg_mio_del_addr_subs_cmd mesh_dbg_mio_del_addr_subs_cmd_t
Delete address from subscription list Command structure.
Provisioning Layer.
Definition: in_ble_prf_mesh.h:718
struct mesh_dbg_mio_set_publi_param_cmd mesh_dbg_mio_set_publi_param_cmd_t
Set Model Publication Parameter Command structure.
uint16_t oob_info
OOB information.
Definition: in_ble_prf_mesh.h:339
Message API supported.
Definition: in_ble_prf_mesh.h:424
mesh_prov_out_oob
Output OOB Action field values.
Definition: in_ble_prf_mesh.h:297
The computed confirmation value was not successfully verified.
Definition: in_ble_prf_mesh.h:93
Sequence number error.
Definition: in_ble_prf_mesh.h:119
Mesh Provisioning state change indication.
Definition: in_ble_prf_mesh.h:288
Feature Not Supported.
Definition: in_ble_prf_mesh.h:64
uint8_t model_lid
Model LID.
Definition: in_ble_prf_mesh.h:566
uint16_t status
Relevant only for provisioning failed (failed reason)
Definition: in_ble_prf_mesh.h:293
uint8_t label_uuid[MESH_LABEL_UUID_LEN]
Label UUID (in case address is a virtual address)
Definition: in_ble_prf_mesh.h:642
Model request to publish a new message.
Definition: in_ble_prf_mesh.h:482
uint16_t env_len
Environment Length.
Definition: in_ble_prf_mesh.h:744
Cannot fragment message due to lack of ressources.
Definition: in_ble_prf_mesh.h:131
Friendship lost due to request timeout.
Definition: in_ble_prf_mesh.h:145
uint8_t model_lid
Model LID.
Definition: in_ble_prf_mesh.h:675
Temporarily Unable to Change State.
Definition: in_ble_prf_mesh.h:72
Bit[3]: Input Alphanumeric.
Definition: in_ble_prf_mesh.h:322
uint8_t model_lid
Model LID.
Definition: in_ble_prf_mesh.h:602
mesh_api_feat
Mesh Supported features.
Definition: in_ble_prf_mesh.h:412
uint16_t addr[]
List of addresses.
Definition: in_ble_prf_mesh.h:666
uint8_t out_oob_size
Maximum size of Output OOB supported.
Definition: in_ble_prf_mesh.h:345
Friend Node.
Definition: in_ble_prf_mesh.h:419
Provisioning over GATT.
Definition: in_ble_prf_mesh.h:426
Key Index Already Stored.
Definition: in_ble_prf_mesh.h:56
uint8_t nb_cdata_page
Number of pages in the Composition Data.
Definition: in_ble_prf_mesh.h:449
uint8_t retx_params
Definition: in_ble_prf_mesh.h:614
Delete address from subscription list Command structure.
Definition: in_ble_prf_mesh.h:633
No Error.
Definition: in_ble_prf_mesh.h:39
Storage Failure.
Definition: in_ble_prf_mesh.h:62
The provisioning protocol cannot be continued due to insufficient resources in the device...
Definition: in_ble_prf_mesh.h:95
Friend Layer (Network interface)
Definition: in_ble_prf_mesh.h:720
uint8_t state
Provisioning procedure state (.
Definition: in_ble_prf_mesh.h:291
Request has no effect.
Definition: in_ble_prf_mesh.h:129
uint16_t auth_action
Definition: in_ble_prf_mesh.h:384
Low Power Node status indication structure.
Definition: in_ble_prf_mesh.h:403
uint8_t label_uuid[MESH_LABEL_UUID_LEN]
Label UUID (in case address is a virtual address)
Definition: in_ble_prf_mesh.h:582
uint16_t pid
16-bit vendor-assigned product identifier
Definition: in_ble_prf_mesh.h:443
uint16_t nb_addr
Number of addresses in the list.
Definition: in_ble_prf_mesh.h:662
Unspecified Error.
Definition: in_ble_prf_mesh.h:76
uint8_t static_oob
Static OOB information available.
Definition: in_ble_prf_mesh.h:343
Resource requested not found.
Definition: in_ble_prf_mesh.h:117
uint8_t nb_elt
Number of elements.
Definition: in_ble_prf_mesh.h:353
struct mesh_dbg_mio_set_prim_addr_cmd mesh_dbg_mio_set_prim_addr_cmd_t
Set device primary address.
Mesh Provisioning Parameters Response.
Definition: in_ble_prf_mesh.h:333
uint8_t info
Bit field providing additional information (.
Definition: in_ble_prf_mesh.h:355
uint16_t data_len
Data Length.
Definition: in_ble_prf_mesh.h:742
uint8_t model_lid
Model LID.
Definition: in_ble_prf_mesh.h:591
struct mesh_dbg_mio_add_addr_subs_cmd mesh_dbg_mio_add_addr_subs_cmd_t
Add address in subscription list Command structure.
Provisioning succeed.
Definition: in_ble_prf_mesh.h:282
uint8_t env_data[]
Environment + Data.
Definition: in_ble_prf_mesh.h:746
Bit[0]: Blink.
Definition: in_ble_prf_mesh.h:300
Bit[0]: Push.
Definition: in_ble_prf_mesh.h:316
Invalid Binding.
Definition: in_ble_prf_mesh.h:78
Get Model Publication Parameters Command structure.
Definition: in_ble_prf_mesh.h:586
Establishment failed because Friend Update message not received after transmission of Friend Poll...
Definition: in_ble_prf_mesh.h:141
Bit[1]: Twist.
Definition: in_ble_prf_mesh.h:318
Bit[2]: Input Numeric.
Definition: in_ble_prf_mesh.h:320
The Data block was not successfully decrypted.
Definition: in_ble_prf_mesh.h:97
uint16_t vid
16-bit vendor-assigned product version identifier
Definition: in_ble_prf_mesh.h:445
uint32_t poll_timeout
Initial value of PollTimeout timer (in multiple of 100ms)
Definition: in_ble_prf_mesh.h:535
uint8_t test_id
Test ID.
Definition: in_ble_prf_mesh.h:255
uint8_t model_lid
Model LID.
Definition: in_ble_prf_mesh.h:686
uint32_t uri_hash
URI hash.
Definition: in_ble_prf_mesh.h:337
bool cfm_needed
Indicate if MESH_FAULT_CFM message is expected.
Definition: in_ble_prf_mesh.h:257
uint8_t queue_size
Queue size available on the Friend node.
Definition: in_ble_prf_mesh.h:395
uint32_t cmd_code
Definition: in_ble_prf_mesh.h:737
uint8_t retx_params
Definition: in_ble_prf_mesh.h:578
New Low Power Node has been discovered.
Definition: in_ble_prf_mesh.h:726
Bearer Layer.
Definition: in_ble_prf_mesh.h:706
in_ble_mesh_evt
Events defines for Mesh Services.
Definition: in_ble_prf_mesh.h:150
Send data command structure.
Definition: in_ble_prf_mesh.h:733
Provisioning timeout - Transaction or Link timeout.
Definition: in_ble_prf_mesh.h:125
uint8_t model_lid
Model Local Identifier.
Definition: in_ble_prf_mesh.h:485
uint16_t len
Message length.
Definition: in_ble_prf_mesh.h:491
The PDU received was not expected at this moment of the procedure.
Definition: in_ble_prf_mesh.h:91
uint16_t comp_id
Company ID.
Definition: in_ble_prf_mesh.h:246
Abstraction Layer.
Definition: in_ble_prf_mesh.h:704
Provisioning failed.
Definition: in_ble_prf_mesh.h:284
Output OOB authentication is used.
Definition: in_ble_prf_mesh.h:366
struct mesh_dbg_mio_get_publi_param_cmd mesh_dbg_mio_get_publi_param_cmd_t
Get Model Publication Parameters Command structure.
Failed to access ECDH - Critical error.
Definition: in_ble_prf_mesh.h:127
mesh_error
Definition: in_ble_prf_mesh.h:36
Access Layer.
Definition: in_ble_prf_mesh.h:714
Set device primary address.
Definition: in_ble_prf_mesh.h:690
uint16_t status
Status of the command execution.
Definition: in_ble_prf_mesh.h:659
in_ble_m_dbg_layer
Layers that can be used by the debug module.
Definition: in_ble_prf_mesh.h:701
Provisioning started - procedure started by a provisioner.
Definition: in_ble_prf_mesh.h:280
uint8_t label_uuid[MESH_LABEL_UUID_LEN]
Label UUID (in case address is a virtual address)
Definition: in_ble_prf_mesh.h:629
uint8_t lpn_lid
Low Power Node local index.
Definition: in_ble_prf_mesh.h:754
uint16_t out_oob_action
Supported Output OOB Actions (.
Definition: in_ble_prf_mesh.h:349
Invalid_Model.
Definition: in_ble_prf_mesh.h:48
Get Model Publication Parameters Complete event structure.
Definition: in_ble_prf_mesh.h:595
Cannot Set.
Definition: in_ble_prf_mesh.h:74
uint8_t ttl
Publish TTL.
Definition: in_ble_prf_mesh.h:572
Resource requested is busy.
Definition: in_ble_prf_mesh.h:113
Network Layer.
Definition: in_ble_prf_mesh.h:708
struct mesh_dbg_mio_publi_param mesh_dbg_mio_publi_param_t
Get Model Publication Parameters Complete event structure.
struct mesh_dbg_mio_is_addr_subs_cmd mesh_dbg_mio_is_addr_subs_cmd_t
Look for address in the subscription list Command.
Low Power Node.
Definition: in_ble_prf_mesh.h:421
Bearer instance has been closed.
Definition: in_ble_prf_mesh.h:121
uint8_t app_key_lid
Local index of Application Key to be used for publication.
Definition: in_ble_prf_mesh.h:568
uint8_t rx_delay
Receive delay.
Definition: in_ble_prf_mesh.h:539
Debug Friendship indication structure.
Definition: in_ble_prf_mesh.h:749
Bit[1]: Beep.
Definition: in_ble_prf_mesh.h:302
uint8_t friend_cred
Friendship credential flag.
Definition: in_ble_prf_mesh.h:580
Mesh start-up configuration.
Definition: in_ble_prf_mesh.h:436
uint32_t period_ms
Publication period in milliseconds when no fault is known.
Definition: in_ble_prf_mesh.h:271
Proxy Node.
Definition: in_ble_prf_mesh.h:417
uint16_t comp_id
Company ID.
Definition: in_ble_prf_mesh.h:264
Clear content of subscription list Command structure.
Definition: in_ble_prf_mesh.h:670
Provisioning Failed.
Definition: in_ble_prf_mesh.h:123
uint8_t trans_mic_64
1 = Segmented PDU force transport MIC to 64 bits ; 0 = 32 bits transport MIC
Definition: in_ble_prf_mesh.h:487
uint16_t status
Status.
Definition: in_ble_prf_mesh.h:406
uint16_t cid
16-bit company identifier assigned by the Bluetooth SIG
Definition: in_ble_prf_mesh.h:441
Invalid Parameter.
Definition: in_ble_prf_mesh.h:107
Not a Subscribe Model.
Definition: in_ble_prf_mesh.h:60
uint8_t period
Period for periodic status publishing.
Definition: in_ble_prf_mesh.h:574
Cannot Bind.
Definition: in_ble_prf_mesh.h:70
Inform that clear of Registered Fault state identified by Company ID has been received for primary el...
Definition: in_ble_prf_mesh.h:261
uint8_t app_key_lid
Local index of Application Key to be used for publication.
Definition: in_ble_prf_mesh.h:604
uint8_t subs_list_size
Size of the subscription list that can be supported by the Friend Node.
Definition: in_ble_prf_mesh.h:397
uint16_t loc
Localization descriptor.
Definition: in_ble_prf_mesh.h:447
mesh_prov_info
Definition: in_ble_prf_mesh.h:326
Establishment failed after several attempts.
Definition: in_ble_prf_mesh.h:137
uint8_t pub_key_oob
Public key OOB information available.
Definition: in_ble_prf_mesh.h:341
Low Power Node offer reception indication structure.
Definition: in_ble_prf_mesh.h:388
An unexpected error occurred that may not be recoverable.
Definition: in_ble_prf_mesh.h:99
Invalid Address.
Definition: in_ble_prf_mesh.h:46
The device cannot assign consecutive unicast addresses to all elements.
Definition: in_ble_prf_mesh.h:101
Get content of subscription list Complete event structure.
Definition: in_ble_prf_mesh.h:655
The arguments of the protocol PDUs are outside expected values or the length of the PDU is different ...
Definition: in_ble_prf_mesh.h:89
uint8_t min_queue_size_log
Minimum queue size (log value)
Definition: in_ble_prf_mesh.h:545
uint8_t model_lid
Model LID.
Definition: in_ble_prf_mesh.h:627
Insufficient_Resources.
Definition: in_ble_prf_mesh.h:54