/Zephyr-latest/tests/bsim/bluetooth/mesh/src/ |
D | test_iv_index.c | 21 extern struct bt_mesh_net bt_mesh; 48 k_work_cancel_delayable(&bt_mesh.ivu_timer); in emulate_recovery_timeout() 49 bt_mesh.ivu_duration = 2 * BT_MESH_IVU_MIN_HOURS; in emulate_recovery_timeout() 56 bt_mesh.iv_index = TEST_IV_IDX; in test_ivu_recovery() 58 atomic_set_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS); in test_ivu_recovery() 69 ASSERT_EQUAL(TEST_IV_IDX + 2, bt_mesh.iv_index); in test_ivu_recovery() 70 ASSERT_FALSE(atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS)); in test_ivu_recovery() 76 bt_mesh.iv_index = TEST_IV_IDX; in test_ivu_recovery() 78 atomic_clear_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS); in test_ivu_recovery() 89 ASSERT_EQUAL(TEST_IV_IDX + 1, bt_mesh.iv_index); in test_ivu_recovery() [all …]
|
D | test_beacon.c | 129 LOG_DBG("ivi: %i", bt_mesh.iv_index); in ivu_log() 132 if (atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_INITIATOR)) { in ivu_log() 136 if (atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS)) { in ivu_log() 140 if (atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_PENDING)) { in ivu_log() 144 if (atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_TEST)) { in ivu_log() 151 ASSERT_TRUE(!atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_INITIATOR)); in tx_on_iv_update_test() 152 ASSERT_TRUE(!atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS)); in tx_on_iv_update_test() 153 ASSERT_TRUE(!atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_PENDING)); in tx_on_iv_update_test() 154 ASSERT_TRUE(!atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_TEST)); in tx_on_iv_update_test() 155 ASSERT_TRUE(bt_mesh.iv_index == 0); in tx_on_iv_update_test() [all …]
|
D | test_provision.c | 737 if (bt_mesh.ivu_duration != 0) { in test_provisioner_iv_update_flag_zero() 755 if (bt_mesh.ivu_duration != 96) { in test_provisioner_iv_update_flag_one() 761 if (bt_mesh.ivu_duration != 0) { in test_provisioner_iv_update_flag_one() 1282 ASSERT_OK(bt_mesh_key_export(prev_dev_key, &bt_mesh.dev_key)); in reprovision_remote_devkey_server() 1291 ASSERT_OK(bt_mesh_key_export(dev_key, &bt_mesh.dev_key)); in reprovision_remote_devkey_server() 1308 atomic_set_bit(bt_mesh.flags, BT_MESH_COMP_DIRTY); in reprovision_remote_comp_data_server() 1309 ASSERT_OK(bt_mesh_key_export(prev_dev_key, &bt_mesh.dev_key)); in reprovision_remote_comp_data_server() 1314 atomic_clear_bit(bt_mesh.flags, BT_MESH_COMP_DIRTY); in reprovision_remote_comp_data_server() 1322 ASSERT_OK(bt_mesh_key_export(dev_key, &bt_mesh.dev_key)); in reprovision_remote_comp_data_server() 1331 ASSERT_OK(bt_mesh_key_export(prev_dev_key, &bt_mesh.dev_key)); in reprovision_remote_address_server() [all …]
|
D | test_replay_cache.c | 97 bt_mesh.sar_tx = tx_set; in tx_sar_conf() 117 bt_mesh.sar_rx = rx_set; in rx_sar_conf() 134 uint32_t seq = bt_mesh.seq; in test_tx_immediate_replay_attack() 152 bt_mesh.seq = seq; in test_tx_immediate_replay_attack()
|
D | test_brg.c | 934 ASSERT_TRUE(!atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS)); in test_tester_ivu() 935 ASSERT_TRUE(bt_mesh.iv_index == test_ividx); in test_tester_ivu() 944 uint32_t iv_index = bt_mesh.iv_index; in test_tester_ivu() 950 LOG_INF("Starting IV Update procedure, IVI %d -> %d", bt_mesh.iv_index, in test_tester_ivu() 951 bt_mesh.iv_index + 1); in test_tester_ivu() 953 iv_index = bt_mesh.iv_index; in test_tester_ivu() 956 ASSERT_TRUE(atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS)); in test_tester_ivu() 957 ASSERT_TRUE(bt_mesh.iv_index == iv_index + 1); in test_tester_ivu() 966 ASSERT_TRUE(!atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS)); in test_tester_ivu() 967 ASSERT_TRUE(bt_mesh.iv_index == iv_index + 1); in test_tester_ivu()
|
D | test_lcd.c | 434 atomic_set_bit(bt_mesh.flags, BT_MESH_COMP_DIRTY); in test_srv_comp_data_status_respond() 448 if (atomic_test_bit(bt_mesh.flags, BT_MESH_METADATA_DIRTY)) { in test_srv_metadata_status_respond()
|
/Zephyr-latest/subsys/bluetooth/mesh/ |
D | sar_cfg_internal.h | 41 #define BT_MESH_SAR_TX_SEG_INT_MS ((bt_mesh.sar_tx.seg_int_step + 1) * 10) 44 (bt_mesh.sar_tx.unicast_retrans_count + 1) : \ 45 (bt_mesh.sar_tx.multicast_retrans_count + 1)) 47 (bt_mesh.sar_tx.unicast_retrans_without_prog_count + 1) 49 ((bt_mesh.sar_tx.unicast_retrans_int_step + 1) * 25) 51 ((bt_mesh.sar_tx.unicast_retrans_int_inc + 1) * 25) 57 ((bt_mesh.sar_tx.multicast_retrans_int + 1) * 25) 63 #define BT_MESH_SAR_RX_SEG_THRESHOLD (bt_mesh.sar_rx.seg_thresh) 64 #define BT_MESH_SAR_RX_ACK_DELAY_INC_X2 (bt_mesh.sar_rx.ack_delay_inc * 2 + 3) 65 #define BT_MESH_SAR_RX_ACK_RETRANS_COUNT (bt_mesh.sar_rx.ack_retrans_count + 1) [all …]
|
D | cfg.c | 38 if (atomic_test_bit(bt_mesh.flags, BT_MESH_BEACON) == beacon) { in bt_mesh_beacon_set() 42 atomic_set_bit_to(bt_mesh.flags, BT_MESH_BEACON, beacon); in bt_mesh_beacon_set() 51 atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) { in bt_mesh_beacon_set() 58 return atomic_test_bit(bt_mesh.flags, BT_MESH_BEACON); in bt_mesh_beacon_enabled() 68 if (atomic_test_bit(bt_mesh.flags, feature_flag) == in feature_set() 73 atomic_set_bit_to(bt_mesh.flags, feature_flag, in feature_set() 81 return atomic_test_bit(bt_mesh.flags, feature_flag) ? in feature_get() 106 atomic_test_bit(bt_mesh.flags, BT_MESH_VALID)) { in bt_mesh_priv_beacon_set() 125 bt_mesh.priv_beacon_int = interval; in bt_mesh_priv_beacon_update_interval_set() 132 return bt_mesh.priv_beacon_int; in bt_mesh_priv_beacon_update_interval_get() [all …]
|
D | main.c | 55 if (!atomic_test_bit(bt_mesh.flags, BT_MESH_INIT)) { in bt_mesh_provision() 65 if (atomic_test_and_set_bit(bt_mesh.flags, BT_MESH_VALID)) { in bt_mesh_provision() 77 atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID); in bt_mesh_provision() 84 atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID); in bt_mesh_provision() 93 atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID); in bt_mesh_provision() 145 atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID); in bt_mesh_provision() 151 bt_mesh.seq = 0U; in bt_mesh_provision() 155 memcpy(&bt_mesh.dev_key, &mesh_dev_key, sizeof(struct bt_mesh_key)); in bt_mesh_provision() 188 bt_hex(&bt_mesh.dev_key_cand, sizeof(struct bt_mesh_key))); in bt_mesh_reprovision() 191 bt_mesh.seq = 0U; in bt_mesh_reprovision() [all …]
|
D | net.c | 90 struct bt_mesh_net bt_mesh = { variable 91 .local_queue = SYS_SLIST_STATIC_INIT(&bt_mesh.local_queue), 191 (bt_mesh.seq % CONFIG_BT_MESH_SEQ_STORE_RATE)) { in bt_mesh_net_seq_store() 221 bt_mesh.iv_index = iv_index; in bt_mesh_net_create() 222 atomic_set_bit_to(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS, in bt_mesh_net_create() 234 bt_mesh.ivu_duration = BT_MESH_IVU_MIN_HOURS; in bt_mesh_net_create() 236 bt_mesh.ivu_duration = 0U; in bt_mesh_net_create() 251 atomic_set_bit_to(bt_mesh.flags, BT_MESH_IVU_TEST, enable); in bt_mesh_iv_update_test() 253 bt_mesh.ivu_duration = 0U; in bt_mesh_iv_update_test() 263 if (atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS)) { in bt_mesh_iv_update() [all …]
|
D | sar_cfg_srv.c | 32 const void *data = delete ? NULL : &bt_mesh.sar_rx; in sar_rx_store() 40 const void *data = delete ? NULL : &bt_mesh.sar_tx; in sar_tx_store() 50 const struct bt_mesh_sar_tx *tx = &bt_mesh.sar_tx; in transmitter_status() 70 const struct bt_mesh_sar_rx *rx = &bt_mesh.sar_rx; in receiver_status() 97 struct bt_mesh_sar_tx *tx = &bt_mesh.sar_tx; in transmitter_set() 124 struct bt_mesh_sar_rx *rx = &bt_mesh.sar_rx; in receiver_set() 168 bt_mesh.sar_tx = sar_tx; in sar_cfg_srv_reset() 169 bt_mesh.sar_rx = sar_rx; in sar_cfg_srv_reset() 183 return bt_mesh_settings_set(read_cb, cb_data, &bt_mesh.sar_rx, in sar_cfg_srv_settings_set() 184 sizeof(bt_mesh.sar_rx)); in sar_cfg_srv_settings_set() [all …]
|
D | lpn.c | 140 LOG_DBG("%s -> %s", state2str(bt_mesh.lpn.state), state2str(state)); in lpn_set_state() 142 bt_mesh.lpn.state = state; in lpn_set_state() 150 for (i = 0; i < ARRAY_SIZE(bt_mesh.lpn.added); i++) { in group_zero() 163 for (i = 0; i < ARRAY_SIZE(bt_mesh.lpn.added); i++) { in group_set() 176 for (i = 0; i < ARRAY_SIZE(bt_mesh.lpn.added); i++) { in group_clear() 188 struct bt_mesh_lpn *lpn = &bt_mesh.lpn; in friend_clear_sent() 212 .net_idx = bt_mesh.lpn.sub->net_idx, in send_friend_clear() 214 .addr = bt_mesh.lpn.frnd, in send_friend_clear() 218 .sub = bt_mesh.lpn.sub, in send_friend_clear() 225 .lpn_counter = sys_cpu_to_be16(bt_mesh.lpn.lpn_counter), in send_friend_clear() [all …]
|
D | lpn.h | 19 return bt_mesh.lpn.established; in bt_mesh_lpn_established() 29 return (addr == bt_mesh.lpn.frnd); in bt_mesh_lpn_match() 38 return (bt_mesh.lpn.state == BT_MESH_LPN_WAIT_UPDATE); in bt_mesh_lpn_waiting_update()
|
D | friend.c | 109 for (i = 0; i < ARRAY_SIZE(bt_mesh.frnd); i++) { in bt_mesh_friend_find() 110 struct bt_mesh_friend *frnd = &bt_mesh.frnd[i]; in bt_mesh_friend_find() 216 for (i = 0; i < ARRAY_SIZE(bt_mesh.frnd); i++) { in bt_mesh_friends_clear() 217 struct bt_mesh_friend *frnd = &bt_mesh.frnd[i]; in bt_mesh_friends_clear() 235 for (i = 0; i < ARRAY_SIZE(bt_mesh.frnd); i++) { in bt_mesh_friend_sec_update() 236 struct bt_mesh_friend *frnd = &bt_mesh.frnd[i]; in bt_mesh_friend_sec_update() 467 if (meta.crypto.seq_num == bt_mesh.seq) { in unseg_app_sdu_prepare() 471 LOG_DBG("Re-encrypting friend pdu (SeqNum %06x -> %06x)", meta.crypto.seq_num, bt_mesh.seq); in unseg_app_sdu_prepare() 479 meta.crypto.seq_num = bt_mesh.seq; in unseg_app_sdu_prepare() 523 iv_index = (bt_mesh.iv_index - ((bt_mesh.iv_index & 1) != ivi)); in encrypt_friend_pdu() [all …]
|
D | net.h | 285 extern struct bt_mesh_net bt_mesh; 287 #define BT_MESH_NET_IVI_TX (bt_mesh.iv_index - \ 288 atomic_test_bit(bt_mesh.flags, \ 290 #define BT_MESH_NET_IVI_RX(rx) (bt_mesh.iv_index - (rx)->old_iv)
|
D | beacon.c | 154 net_buf_simple_add_be32(buf, bt_mesh.iv_index); in secure_beacon_create() 160 LOG_DBG("IV Index 0x%08x Auth %s", bt_mesh.iv_index, bt_hex(sub->secure_beacon.auth, 8)); in secure_beacon_create() 203 err = bt_mesh_beacon_encrypt(&keys->priv_beacon, flags, bt_mesh.iv_index, in private_beacon_update() 262 atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_INITIATOR); in secure_beacon_is_running() 637 sub->net_idx, params->flags, params->iv_index, bt_mesh.iv_index); in net_beacon_recv() 639 if (atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_INITIATOR) && in net_beacon_recv() 640 (atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS) == in net_beacon_recv() 758 LOG_DBG("flags 0x%02x, IVI 0x%08x", flags, bt_mesh.iv_index); in bt_mesh_beacon_update() 766 bt_mesh_beacon_auth(&keys->beacon, flags, keys->net_id, bt_mesh.iv_index, in bt_mesh_beacon_update() 792 atomic_set_bit_to(bt_mesh.flags, BT_MESH_IVU_INITIATOR, enable); in bt_mesh_beacon_ivu_initiator()
|
D | large_comp_data_srv.c | 66 if (atomic_test_bit(bt_mesh.flags, BT_MESH_COMP_DIRTY) && page < 128) { in handle_large_comp_data_get() 124 if (page >= 128U && atomic_test_bit(bt_mesh.flags, BT_MESH_METADATA_DIRTY)) { in handle_models_metadata_get() 136 if (atomic_test_bit(bt_mesh.flags, BT_MESH_METADATA_DIRTY) == (page == 0U)) { in handle_models_metadata_get()
|
D | settings.c | 87 if (!atomic_test_bit(bt_mesh.flags, BT_MESH_INIT)) { in mesh_commit() 113 atomic_set_bit(bt_mesh.flags, BT_MESH_VALID); in mesh_commit() 120 SETTINGS_STATIC_HANDLER_DEFINE(bt_mesh, "bt/mesh", NULL, NULL, mesh_commit,
|
D | settings.h | 34 if (!atomic_test_bit(bt_mesh.flags, BT_MESH_INIT)) { \
|
D | subnet.c | 154 if (atomic_test_bit(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS)) { in bt_mesh_net_flags() 895 rx->sub = bt_mesh.lpn.sub; in bt_mesh_net_cred_find() 897 for (j = 0; j < ARRAY_SIZE(bt_mesh.lpn.cred); j++) { in bt_mesh_net_cred_find() 902 if (cb(rx, in, out, &bt_mesh.lpn.cred[j])) { in bt_mesh_net_cred_find() 919 for (i = 0; i < ARRAY_SIZE(bt_mesh.frnd); i++) { in bt_mesh_net_cred_find() 920 struct bt_mesh_friend *frnd = &bt_mesh.frnd[i]; in bt_mesh_net_cred_find()
|
D | app_keys.c | 505 *app_key = &bt_mesh.dev_key; in bt_mesh_keys_resolve() 562 err = cb(rx, &bt_mesh.dev_key, cb_data); in bt_mesh_app_key_find() 568 if (atomic_test_bit(bt_mesh.flags, BT_MESH_DEVKEY_CAND)) { in bt_mesh_app_key_find() 569 err = cb(rx, &bt_mesh.dev_key_cand, cb_data); in bt_mesh_app_key_find()
|
D | adv.c | 95 if (atomic_test_bit(bt_mesh.flags, BT_MESH_SUSPENDED)) { in adv_create_from_pool() 265 if (atomic_test_bit(bt_mesh.flags, BT_MESH_SUSPENDED)) { in bt_mesh_adv_send()
|
D | adv_legacy.c | 44 return atomic_test_bit(bt_mesh.flags, BT_MESH_SUSPENDED); in is_mesh_suspended()
|
/Zephyr-latest/samples/bluetooth/mesh/ |
D | README.rst | 3 :relevant-api: bt_mesh bluetooth
|
/Zephyr-latest/samples/bluetooth/mesh_demo/ |
D | README.rst | 3 :relevant-api: bt_mesh bluetooth
|