diff --git a/ble/att.h b/ble/att.h index 1f99d51e1..b8f733819 100644 --- a/ble/att.h +++ b/ble/att.h @@ -105,8 +105,8 @@ extern "C" { #define ATT_ERROR_UNSUPPORTED_GROUP_TYPE 0x10 #define ATT_ERROR_INSUFFICIENT_RESOURCES 0x11 // custom BTstack ATT error coders +#define ATT_ERROR_DATA_MISMATCH 0x7e #define ATT_ERROR_TIMEOUT 0x7F - // custom BTstack error codes #define ATT_ERROR_HCI_DISCONNECT_RECEIVED 0x1f diff --git a/ble/gatt_client.c b/ble/gatt_client.c index 1e83d5d24..9039c3d32 100644 --- a/ble/gatt_client.c +++ b/ble/gatt_client.c @@ -1257,7 +1257,7 @@ static void gatt_client_att_packet_handler(uint8_t packet_type, uint16_t handle, if (is_value_valid(peripheral, packet, size)){ emit_gatt_complete_event(peripheral, 0); } else { - emit_gatt_complete_event(peripheral, GATT_CLIENT_DATA_MISMATCH); + emit_gatt_complete_event(peripheral, ATT_ERROR_DATA_MISMATCH); } break; diff --git a/src/hci_cmds.h b/src/hci_cmds.h index dc1ef7c02..68c903572 100644 --- a/src/hci_cmds.h +++ b/src/hci_cmds.h @@ -804,7 +804,6 @@ extern "C" { #define GATT_CLIENT_NOT_CONNECTED 0x93 #define GATT_CLIENT_BUSY 0x94 -#define GATT_CLIENT_DATA_MISMATCH 0x95 #define BNEP_SERVICE_ALREADY_REGISTERED 0xA0 #define BNEP_CHANNEL_NOT_CONNECTED 0xA1