mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-25 15:41:00 +00:00
mesh: use MESH_PROXY_DATA_PACKET type for proxy service
This commit is contained in:
parent
6ec300446a
commit
bf9b4b3b4a
@ -129,7 +129,7 @@ static int mesh_proxy_service_write_callback(hci_con_handle_t con_handle, uint16
|
||||
|
||||
if (attribute_handle == instance->data_in_client_value_handle){
|
||||
if (!mesh_proxy_service_packet_handler) return 0;
|
||||
(*mesh_proxy_service_packet_handler)(PROVISIONING_DATA_PACKET, con_handle, buffer, buffer_size);
|
||||
(*mesh_proxy_service_packet_handler)(MESH_PROXY_DATA_PACKET, con_handle, buffer, buffer_size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
|
||||
uint8_t send_to_mesh_network = 0;
|
||||
|
||||
switch (packet_type) {
|
||||
case PROVISIONING_DATA_PACKET:
|
||||
case MESH_PROXY_DATA_PACKET:
|
||||
pos = 0;
|
||||
// on provisioning PDU call packet handler with PROVISIONG_DATA type
|
||||
msg_sar_field = packet[pos] >> 6;
|
||||
@ -200,7 +200,7 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
|
||||
case MESH_MSG_TYPE_BEACON:
|
||||
case MESH_MSG_TYPE_PROXY_CONFIGURATION:
|
||||
if ((*client_callbacks[msg_type])){
|
||||
(*client_callbacks[msg_type])(PROVISIONING_DATA_PACKET, 0, packet, size);
|
||||
(*client_callbacks[msg_type])(MESH_PROXY_DATA_PACKET, 0, packet, size);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -120,11 +120,14 @@ typedef uint8_t sm_key_t[16];
|
||||
// Mesh Provisioning PDU
|
||||
#define PROVISIONING_DATA_PACKET 0x11
|
||||
|
||||
// Mesh Network PDU
|
||||
#define MESH_NETWORK_PACKET 0x11
|
||||
// Mesh Proxy PDU
|
||||
#define MESH_PROXY_DATA_PACKET 0x11
|
||||
|
||||
// Mesh Network PDU
|
||||
#define MESH_BEACON_PACKET 0x12
|
||||
#define MESH_NETWORK_PACKET 0x12
|
||||
|
||||
// Mesh Network PDU
|
||||
#define MESH_BEACON_PACKET 0x13
|
||||
|
||||
// debug log messages
|
||||
#define LOG_MESSAGE_PACKET 0xfc
|
||||
|
@ -235,8 +235,8 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
|
||||
// printf("provisioning_data packet type 0x%02x\n", packet_type);
|
||||
|
||||
switch (packet_type){
|
||||
case PROVISIONING_DATA_PACKET:
|
||||
printf("provisioning_data\n");
|
||||
case MESH_PROXY_DATA_PACKET:
|
||||
printf("MESH_PROXY_DATA_PACKET \n");
|
||||
printf_hexdump(packet, size);
|
||||
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user