54 Commits

Author SHA1 Message Date
Matthias Ringwald
7b71b67d6f mesh: assert on minimal pdu len in void mesh_network_send_pdu 2019-08-22 11:07:14 +02:00
Matthias Ringwald
8cabaf83bb mesh: track outgoing pdu in outgoing_pdu in mesh_network 2019-08-21 14:48:53 +02:00
Matthias Ringwald
68059845e9 mesh: use explicit incoming_pdu_raw and incoming_pdu_decoded instead of passing it in btstack_crypto 2019-08-20 19:27:41 +02:00
Matthias Ringwald
77321fed34 mesh: fix mesh_network_reset 2019-08-20 18:16:53 +02:00
Matthias Ringwald
fde19096d3 mesh: improve _reset functions for unit tests in mesh_network and btstack_crypto 2019-08-20 18:07:43 +02:00
Matthias Ringwald
9fe804231b mesh: more debug logging in mesh_network, remove unneeded #idef 2019-08-15 18:46:00 +02:00
Matthias Ringwald
e9292fe87e mesh: provide mesh_pdu_control_opcode 2019-08-13 18:26:40 +02:00
Matthias Ringwald
727cf477f1 mesh: rework outgoing network queue 2019-08-12 22:14:03 +02:00
Matthias Ringwald
bffb1c956a mesh: remove network pdus from network_pdus_outgoing only if responsible bearer is ready 2019-07-20 08:50:36 +02:00
Matthias Ringwald
c949b9e794 mesh: fix relay of network packet - don't remove net mic a second time 2019-07-20 08:50:36 +02:00
Matthias Ringwald
d7476ab042 mesh: fix debug output in mesh_network 2019-07-20 08:50:36 +02:00
Matthias Ringwald
460082dcd5 mesh: fix warnings 2019-07-20 08:50:36 +02:00
Matthias Ringwald
c1f227d5a9 mesh: use Network or Relay Trasmit settings for ADV bearer in mesh network 2019-07-20 08:50:36 +02:00
Matthias Ringwald
3bf10e3a89 mesh: allow to specify transmission count and interval for adv bearer network pdus 2019-07-20 08:50:36 +02:00
Matthias Ringwald
979ba7c0d1 mesh: improve network tx debug output 2019-07-20 08:50:35 +02:00
Matthias Ringwald
2983fbcb5f mesh: fix unused, shadowing, signed compares 2019-07-20 08:50:34 +02:00
Matthias Ringwald
f4854a5efb mesh: move mesh files to src/mesh, update includes 2019-07-20 08:50:34 +02:00
Matthias Ringwald
001c65e028 mesh: prefix mesh_node functions 2019-07-20 08:50:33 +02:00
Matthias Ringwald
e4058622b0 mesh: add mesh_element_count and use in mesh_network 2019-07-20 08:50:33 +02:00
Matthias Ringwald
683cf298e3 mesh: move mesh_node into src/mesh 2019-07-20 08:50:33 +02:00
Matthias Ringwald
a6fcac7c46 mesh: only use mesh_node_primary_element_address_get 2019-07-20 08:50:33 +02:00
Matthias Ringwald
6f14746dca mesh: move iv index and update state to mesh_iv_index_seq_number 2019-07-20 08:50:33 +02:00
Matthias Ringwald
0882d02cd2 mesh: implement IV Index Recovery procedure 2019-07-20 08:50:33 +02:00
Matthias Ringwald
ce90ed1aac mesh: mesh_network_address_unicast returns false for MESH_ADDRESS_UNSASSIGNED 2019-07-20 08:50:32 +02:00
Matthias Ringwald
c520adb916 mesh: validate iv index + active flag in secure network beacon before processing 2019-07-20 08:50:32 +02:00
Matthias Ringwald
5d8695d635 mesh: transition norml -> iv update active -> normal via secure network beacons 2019-07-20 08:50:32 +02:00
Matthias Ringwald
d075c32206 mesh: send using previous iv index if iv update active 2019-07-20 08:50:32 +02:00
Matthias Ringwald
a42685b6ad mesh: mesh_trigger_iv_update 2019-07-20 08:50:32 +02:00
Matthias Ringwald
7d00533263 mesh: set iv flag in secure network beacon 2019-07-20 08:50:32 +02:00
Matthias Ringwald
85f6c8a0c0 mesh: use mesh_subnet_setup_for_netkey_index only on start and for tests 2019-07-20 08:50:32 +02:00
Matthias Ringwald
0f0f44ede9 mesh: delete subnet on netkey delete in config server / remove from mesh_subnet_update_for_netkey_index helper 2019-07-20 08:50:32 +02:00
Matthias Ringwald
bdf219b229 mesh: use key from mesh_subnet_get_outgoing_network_key for beacon rx/tx, network tx, advertising with network id 2019-07-20 08:50:32 +02:00
Matthias Ringwald
8adad2d3ba mesh: mesh_subnet_update_for_netkey_index 2019-07-20 08:50:32 +02:00
Matthias Ringwald
9a470f7ba0 mesh: make mesh_subnet_get_outgoing_network_key public 2019-07-20 08:50:32 +02:00
Matthias Ringwald
d134d597d2 mesh: mesh_subnet_get_outgoing_network_key picks outgoing network key 2019-07-20 08:50:32 +02:00
Matthias Ringwald
2b7de14bb0 mesh: move advertisement_with_network_id from mesh_network_key_t to mesh_subnet_t 2019-07-20 08:50:32 +02:00
Matthias Ringwald
b1dda14141 mesh: remove subnet without keys, set key refresh idle if only single key 2019-07-20 08:50:32 +02:00
Matthias Ringwald
a2484a8470 mesh: update subnet based on network keys 2019-07-20 08:50:32 +02:00
Matthias Ringwald
de7d11c030 mesh: dd mesh_subnet_iterator, add mesh_subnet_for_netkey_index 2019-07-20 08:50:32 +02:00
Matthias Ringwald
f276878605 mesh: let network handle proxy configuration messages from gatt bearer 2019-07-20 08:50:31 +02:00
Matthias Ringwald
31a6a8527c mesh: don't send netework pdu over gatt bearer if received from there 2019-07-20 08:50:31 +02:00
Matthias Ringwald
8b0d5c7c2a mesh: relay adv message if relay or proxy active, relay gatt message if proxy active 2019-07-20 08:50:31 +02:00
Matthias Ringwald
ec22fe6707 mesh: extract set flag MESH_NETWORK_PDU_FLAGS_RELAY when queue received message for transmission 2019-07-20 08:50:31 +02:00
Matthias Ringwald
90f8142e51 mesh: extract mesh_network_relay_message 2019-07-20 08:50:31 +02:00
Matthias Ringwald
f727526daf mesh: track if network pdu was received from gatt bearer 2019-07-20 08:50:31 +02:00
Matthias Ringwald
fd7ffe0047 mesh: use proxy_configuration_message instead of proxy_message 2019-07-20 08:50:31 +02:00
Matthias Ringwald
bd9002edc0 mesh: define MESH_NETWORK_PDU_FLAGS_PROXY_MESSAGE 2019-07-20 08:50:31 +02:00
Matthias Ringwald
f18b16f406 mesh: relay message on network layer only if relay feature is enabled 2019-07-20 08:50:31 +02:00
Matthias Ringwald
917dc5c7e7 mesh: track gatt bearer connection state, only use if proxy is enabled 2019-07-20 08:50:31 +02:00
Matthias Ringwald
4662af4a88 mesh: streamline adv + gatt baerer api: network pdu, provisioning pdu, beacon 2019-07-20 08:50:31 +02:00