蓝牙错误码定义

以下内容来源于协议栈定义头文件的精简版,为了显示方便做了删减,并不符合C语言语法规则。宏定义名称的字面意思可以概括错误码的含义。部分常见错误有一些注释(最后几个是常见错误码)。

#define GATT_SUCCESS

#define GATT_INVALID_HANDLE          /* 0x0001 */

#define GATT_READ_NOT_PERMIT      /* 0x0002 */

#define  GATT_WRITE_NOT_PERMIT     /* 0x0003 */

#define  GATT_INVALID_PDU                   /* 0x0004 */

#define GATT_INSUF_AUTHENTICATION    /* 0x0005 */

#define GATT_REQ_NOT_SUPPORTED    /* 0x0006 */

#define GATT_INVALID_OFFSET                 /* 0x0007 */

#define GATT_INSUF_AUTHORIZATION     /* 0x0008 */

#define GATT_PREPARE_Q_FULL              /* 0x0009 */

#define GATT_NOT_FOUND                       /* 0x000a */

#define GATT_NOT_LONG                         /* 0x000b */

#define  GATT_INSUF_KEY_SIZE             /* 0x000c */

#define  GATT_INVALID_ATTR_LEN         /* 0x000d */

#define  GATT_ERR_UNLIKELY                 /* 0x000e */

#define  GATT_INSUF_ENCRYPTION         /* 0x000f */

#define GATT_UNSUPPORT_GRP_TYPE   /* 0x0010 */

#define  GATT_INSUF_RESOURCE          /* 0x0011 */

#define GATT_NO_RESOURCES         /* 0x80 */

#define GATT_INTERNAL_ERROR        /* 0x81 */

#define GATT_WRONG_STATE             /* 0x82 */

#define GATT_DB_FULL                  /* 0x83 */

#define  GATT_BUSY                       /* 0x84 */

#define  GATT_ERROR                   /* 0x85 */

#define GATT_CMD_STARTED     /* 0x86 */

#define GATT_ILLEGAL_PARAMETER /* 0x87 */

#define GATT_PENDING              /* 0x88 */

#define GATT_AUTH_FAIL          /* 0x89 */

#define GATT_MORE                  /* 0x8a */

#define GATT_INVALID_CFG      /* 0x8b */

#define GATT_SERVICE_STARTED    /* 0x8c */

#define GATT_ENCRYPED_MITM      /* GATT_SUCCESS */

#define GATT_ENCRYPED_NO_MITM     /* 0x8d */

#define GATT_NOT_ENCRYPTED            /* 0x8e */

#define GATT_CONGESTED          /* 0x8f */


#define  BTA_GATT_DUP_REG 0x90     /* 0x90 */

#define  BTA_GATT_ALREADY_OPEN 0x91    /* 0x91 */

#define  BTA_GATT_CANCEL 0x92                 /* 0x92 */

#define  BTA_GATT_CONN_UNKNOWN        0

#define  GATT_CONN_L2C_FAILURE      /* general l2cap resource failure */

#define GATT_CONN_TIMEOUT          /* 0x08 connection timeout  */

#define GATT_CONN_TERMINATE_PEER_USER /* 0x13 connection terminate by peer user  */

#define GATT_CONN_TERMINATE_LOCAL_HOST /* 0x16 connection terminated by local host  */

#define GATT_CONN_FAIL_ESTABLISH /* 0x03E connection fail to establish  */

#define GATT_CONN_LMP_TIMEOUT /* 0x22 connection fail for LMP response timeout */

#define GATT_CONN_CANCEL      /* 0x0100 L2CAP connection cancelled  */

#define  BTA_GATT_CONN_NONE 0x0101 /* 0x0101 no connection to cancel  */

你可能感兴趣的:(蓝牙错误码定义)