From 7fa238285e9de7c87a193ca85431df4458b26a6a Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 8 Oct 2015 16:26:54 +0200 Subject: [PATCH] move custom ATT_ERROR_TIMEOUT to 0x7f --- ble/att.h | 3 ++- test/pts/ble_central_test.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ble/att.h b/ble/att.h index 5a788ff38..0d786c7a2 100644 --- a/ble/att.h +++ b/ble/att.h @@ -104,7 +104,8 @@ extern "C" { #define ATT_ERROR_INSUFFICIENT_ENCRYPTION 0x0f #define ATT_ERROR_UNSUPPORTED_GROUP_TYPE 0x10 #define ATT_ERROR_INSUFFICIENT_RESOURCES 0x11 -#define ATT_ERROR_TIMEOUT 0x12 +// custom BTstack ATT error coders +#define ATT_ERROR_TIMEOUT 0x7F // custom BTstack error codes diff --git a/test/pts/ble_central_test.c b/test/pts/ble_central_test.c index 5a70286ce..0b050091d 100644 --- a/test/pts/ble_central_test.c +++ b/test/pts/ble_central_test.c @@ -200,11 +200,13 @@ static const char * att_errors[] = { static const char * att_error_reserved = "Reserved"; static const char * att_error_application = "Application Error"; static const char * att_error_common_error = "Common Profile and Service Error Codes"; +static const char * att_error_timeout = "Timeout"; const char * att_error_string_for_code(uint8_t code){ if (code >= 0xe0) return att_error_common_error; if (code >= 0xa0) return att_error_reserved; if (code >= 0x80) return att_error_application; + if (code == 0x7f) return att_error_timeout; if (code >= 0x12) return att_error_reserved; return att_errors[code]; }