error: Add "Invalid exchange" mapping
authorSimon Mikuda <simon.mikuda@streamunlimited.com>
Sun, 6 Aug 2023 08:01:08 +0000 (10:01 +0200)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 13:34:03 +0000 (19:04 +0530)
This error is returned on this event:
> HCI Event: Auth Complete (0x06) plen 3
        Status: PIN or Key Missing (0x06)
        Handle: 11 Address: 00:00:00:00:00:00 (OUI 00-00-00)

src/error.c
src/error.h

index 29c071067f2b1b9118497ca8742276566f6312ca..f179e6cda0e8619764b6cacf54b1921fd24517ca 100755 (executable)
@@ -171,6 +171,8 @@ const char *btd_error_bredr_conn_from_errno(int errno_code)
                return ERR_BREDR_CONN_ABORT_BY_LOCAL;
        case EPROTO:
                return ERR_BREDR_CONN_LMP_PROTO_ERROR;
+       case EBADE:
+               return ERR_BREDR_CONN_KEY_MISSING;
        default:
                return ERR_BREDR_CONN_UNKNOWN;
        }
@@ -209,6 +211,8 @@ const char *btd_error_le_conn_from_errno(int errno_code)
                return ERR_LE_CONN_ABORT_BY_LOCAL;
        case EPROTO:
                return ERR_LE_CONN_LL_PROTO_ERROR;
+       case EBADE:
+               return ERR_LE_CONN_KEY_MISSING;
        default:
                return ERR_LE_CONN_UNKNOWN;
        }
index cc7790a2321a45e85ef13210c3eac418636edc62..83206cb48a66644eb0f555be78fea59ecc6d23cd 100755 (executable)
@@ -43,6 +43,7 @@
 #define ERR_BREDR_CONN_LMP_PROTO_ERROR         "br-connection-lmp-protocol-"\
                                                "error"
 #define ERR_BREDR_CONN_CANCELED                        "br-connection-canceled"
+#define ERR_BREDR_CONN_KEY_MISSING             "br-connection-key-missing"
 #define ERR_BREDR_CONN_UNKNOWN                 "br-connection-unknown"
 
 /* LE connection failure reasons */
@@ -63,6 +64,7 @@
 #define ERR_LE_CONN_LL_PROTO_ERROR     "le-connection-link-layer-protocol-"\
                                        "error"
 #define ERR_LE_CONN_GATT_BROWSE                "le-connection-gatt-browsing"
+#define ERR_LE_CONN_KEY_MISSING                "le-connection-key-missing"
 #define ERR_LE_CONN_UNKNOWN            "le-connection-unknown"
 
 DBusMessage *btd_error_invalid_args(DBusMessage *msg);