mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 04:20:20 +00:00
mesh: fix compile without ENABLE_MESH_PROXY_SERVER
This commit is contained in:
parent
d7476ab042
commit
3db24e72c6
@ -240,9 +240,11 @@ static void mesh_provisioning_message_handler (uint8_t packet_type, uint16_t cha
|
||||
// setup node after provisioned
|
||||
mesh_access_setup_from_provisioning_data(&provisioning_data);
|
||||
|
||||
#ifdef ENABLE_MESH_PROXY_SERVER
|
||||
// start advertising with node id after provisioning
|
||||
mesh_proxy_set_advertising_with_node_id(provisioning_data.network_key->netkey_index, MESH_NODE_IDENTITY_STATE_ADVERTISING_RUNNING);
|
||||
|
||||
#endif
|
||||
|
||||
provisioned = 1;
|
||||
break;
|
||||
default:
|
||||
@ -274,14 +276,13 @@ static void hci_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *
|
||||
provisioned = mesh_node_startup_from_tlv();
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_MESH_PROXY_SERVER
|
||||
case HCI_EVENT_DISCONNECTION_COMPLETE:
|
||||
// enable PB_GATT
|
||||
if (provisioned == 0){
|
||||
mesh_proxy_start_advertising_unprovisioned_device();
|
||||
} else {
|
||||
#ifdef ENABLE_MESH_PROXY_SERVER
|
||||
mesh_proxy_start_advertising_with_network_id();
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
@ -290,6 +291,7 @@ static void hci_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *
|
||||
// disable PB_GATT
|
||||
mesh_proxy_stop_advertising_unprovisioned_device();
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2098,8 +2098,10 @@ static void config_node_identity_get_handler(mesh_model_t *mesh_model, mesh_pdu_
|
||||
uint16_t netkey_index = mesh_access_parser_get_u16(&parser);
|
||||
|
||||
mesh_node_identity_state_t node_identity_state = MESH_NODE_IDENTITY_STATE_ADVERTISING_NOT_SUPPORTED;
|
||||
uint8_t status = mesh_proxy_get_advertising_with_node_id_status(netkey_index, &node_identity_state);
|
||||
|
||||
uint8_t status = MESH_FOUNDATION_STATUS_SUCCESS;
|
||||
#ifdef ENABLE_MESH_PROXY_SERVER
|
||||
status = mesh_proxy_get_advertising_with_node_id_status(netkey_index, &node_identity_state);
|
||||
#endif
|
||||
config_node_identity_status(mesh_model, mesh_pdu_netkey_index(pdu), mesh_pdu_src(pdu), status, netkey_index, node_identity_state);
|
||||
|
||||
mesh_access_message_processed(pdu);
|
||||
@ -2111,8 +2113,11 @@ static void config_node_identity_set_handler(mesh_model_t *mesh_model, mesh_pdu_
|
||||
uint16_t netkey_index = mesh_access_parser_get_u16(&parser);
|
||||
mesh_node_identity_state_t node_identity_state = (mesh_node_identity_state_t) mesh_access_parser_get_u8(&parser);
|
||||
|
||||
uint8_t status = mesh_proxy_set_advertising_with_node_id(netkey_index, node_identity_state);
|
||||
|
||||
uint8_t status = MESH_FOUNDATION_STATUS_SUCCESS;
|
||||
#ifdef ENABLE_MESH_PROXY_SERVER
|
||||
status = mesh_proxy_set_advertising_with_node_id(netkey_index, node_identity_state);
|
||||
#endif
|
||||
|
||||
config_node_identity_status(mesh_model, mesh_pdu_netkey_index(pdu), mesh_pdu_src(pdu), status, netkey_index, node_identity_state);
|
||||
|
||||
mesh_access_message_processed(pdu);
|
||||
|
@ -512,7 +512,9 @@ static void stdin_process(char cmd){
|
||||
case '8':
|
||||
mesh_node_reset();
|
||||
printf("Mesh Node Reset!\n");
|
||||
#ifdef ENABLE_MESH_PROXY_SERVER
|
||||
mesh_proxy_start_advertising_unprovisioned_device();
|
||||
#endif
|
||||
break;
|
||||
case 'p':
|
||||
printf("+ Public Key OOB Enabled\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user