Use custom ATT error instead of adding HCI error code

This commit is contained in:
Matthias Ringwald 2015-10-29 14:28:44 +01:00
parent 3e5f91f23d
commit 80c3edf700
3 changed files with 2 additions and 3 deletions

View File

@ -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

View File

@ -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;

View File

@ -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