ble_error.h
Go to the documentation of this file.
1
49 #ifndef _BLE_SDK_ERROR_H_
50 #define _BLE_SDK_ERROR_H_
51
52 #include <stdint.h>
53
61 #define SDK_SUCCESS 0x0000
62 #define SDK_ERR_INVALID_PARAM 0x0001
63 #define SDK_ERR_POINTER_NULL 0x0002
64 #define SDK_ERR_INVALID_CONN_IDX 0x0003
65 #define SDK_ERR_INVALID_HANDLE 0x0004
66 #define SDK_ERR_PROFILE_COUNT 0x0005
67 #define SDK_ERR_BUSY 0x0006
68 #define SDK_ERR_TIMER_INSUFFICIENT 0x0007
69 #define SDK_ERR_NVDS_NOT_INIT 0x0008
70 #define SDK_ERR_LIST_ITEM_NOT_FOUND 0x0009
71 #define SDK_ERR_LIST_ITEM_ALREADY_EXISTED 0x000a
72 #define SDK_ERR_LIST_FULL 0x000b
73 #define SDK_ERR_SDK_INTERNAL 0x000c
74 #define SDK_ERR_INVALID_BUFF_LENGTH 0x000d
75 #define SDK_ERR_INVALID_DATA_LENGTH 0x000e
76 #define SDK_ERR_DISALLOWED 0x000f
77 #define SDK_ERR_NO_RESOURCES 0x0010
78 #define SDK_ERR_REQ_NOT_SUPPORTED 0x0011
79 #define SDK_ERR_INVALID_OFFSET 0x0012
80 #define SDK_ERR_INVALID_ATT_VAL_LEN 0x0013
81 #define SDK_ERR_INVALID_PERM 0x0014
82 #define SDK_ERR_INVALID_ADV_IDX 0x0015
83 #define SDK_ERR_INVALID_ADV_DATA_TYPE 0x0016
84 #define SDK_ERR_INVALID_PSM_NUM 0x0017
85 #define SDK_ERR_INVALID_PSM_ALREADY_REGISTERED 0x0018
86 #define SDK_ERR_INVALID_PSM_EXCEEDED_MAX_PSM_NUM 0x0019
87 #define SDK_ERR_NTF_DISABLED 0x001A
88 #define SDK_ERR_IND_DISABLED 0x001B
89 #define SDK_ERR_DISCONNECTED 0x001C
90 #define SDK_ERR_INVALID_ADDRESS 0x001D
91 #define SDK_ERR_INVALID_ADV_INTERVAL 0x001F
92 #define SDK_ERR_INVALID_DISVCOVERY_MODE 0x0020
93 #define SDK_ERR_INVALID_ADV_PARAM 0x0021
94 #define SDK_ERR_INVALID_ADV_PEER_ADDR 0x0022
95 #define SDK_ERR_ADV_DATA_NOT_SET 0x0023
96 #define SDK_ERR_PER_ADV_DATA_NOT_SET 0x0024
97 #define SDK_ERR_EXT_SCAN_RSP_DATA_NOT_SET 0x0025
98 #define SDK_ERR_INVALID_DURATION_PARAM 0x0026
99 #define SDK_ERR_INVALID_PER_SYNC_IDX 0x0027
100 #define SDK_ERR_INVALID_CID 0x0028
101 #define SDK_ERR_INVALID_CHL_NUM 0x0029
102 #define SDK_ERR_NOT_ENOUGH_CREDITS 0x002A
104 #define SDK_ERR_APP_ERROR 0x0080
111 #define BLE_SUCCESS 0x00
113 #define BLE_ATT_ERR_INVALID_HANDLE 0x01
114 #define BLE_ATT_ERR_READ_NOT_PERMITTED 0x02
115 #define BLE_ATT_ERR_WRITE_NOT_PERMITTED 0x03
116 #define BLE_ATT_ERR_INVALID_PDU 0x04
117 #define BLE_ATT_ERR_INSUFF_AUTHEN 0x05
118 #define BLE_ATT_ERR_REQUEST_NOT_SUPPORTED 0x06
119 #define BLE_ATT_ERR_INVALID_OFFSET 0x07
120 #define BLE_ATT_ERR_INSUFF_AUTHOR 0x08
121 #define BLE_ATT_ERR_PREPARE_QUEUE_FULL 0x09
122 #define BLE_ATT_ERR_ATTRIBUTE_NOT_FOUND 0x0A
123 #define BLE_ATT_ERR_ATTRIBUTE_NOT_LONG 0x0B
124 #define BLE_ATT_ERR_INSUFF_ENC_KEY_SIZE 0x0C
125 #define BLE_ATT_ERR_INVALID_ATTRIBUTE_VAL_LEN 0x0D
126 #define BLE_ATT_ERR_UNLIKELY_ERR 0x0E
127 #define BLE_ATT_ERR_INSUFF_ENC 0x0F
128 #define BLE_ATT_ERR_UNSUPP_GRP_TYPE 0x10
129 #define BLE_ATT_ERR_INSUFF_RESOURCE 0x11
132 #define BLE_L2C_ERR_CONNECTION_LOST 0x30
133 #define BLE_L2C_ERR_INVALID_MTU_EXCEED 0x31
134 #define BLE_L2C_ERR_INVALID_MPS_EXCEED 0x32
135 #define BLE_L2C_ERR_INVALID_CID 0x33
136 #define BLE_L2C_ERR_INVALID_PDU 0x34
137 #define BLE_L2C_ERR_NO_RES_AVAIL 0x35
138 #define BLE_L2C_ERR_INSUFF_AUTHEN 0x36
139 #define BLE_L2C_ERR_INSUFF_AUTHOR 0x37
140 #define BLE_L2C_ERR_INSUFF_ENC_KEY_SIZE 0x38
141 #define BLE_L2C_ERR_INSUFF_ENC 0x39
142 #define BLE_L2C_ERR_LEPSM_NOT_SUPP 0x3A
143 #define BLE_L2C_ERR_INSUFF_CREDIT 0x3B
144 #define BLE_L2C_ERR_NOT_UNDERSTOOD 0x3C
145 #define BLE_L2C_ERR_CREDIT_ERROR 0x3D
146 #define BLE_L2C_ERR_CID_ALREADY_ALLOC 0x3E
149 #define BLE_GAP_ERR_INVALID_PARAM 0x40
150 #define BLE_GAP_ERR_PROTOCOL_PROBLEM 0x41
151 #define BLE_GAP_ERR_NOT_SUPPORTED 0x42
152 #define BLE_GAP_ERR_COMMAND_DISALLOWED 0x43
153 #define BLE_GAP_ERR_CANCELED 0x44
154 #define BLE_GAP_ERR_TIMEOUT 0x45
155 #define BLE_GAP_ERR_DISCONNECTED 0x46
156 #define BLE_GAP_ERR_NOT_FOUND 0x47
157 #define BLE_GAP_ERR_REJECTED 0x48
158 #define BLE_GAP_ERR_PRIVACY_CFG_PB 0x49
159 #define BLE_GAP_ERR_ADV_DATA_INVALID 0x4A
160 #define BLE_GAP_ERR_INSUFF_RESOURCES 0x4B
161 #define BLE_GAP_ERR_UNEXPECTED 0x4C
162 #define BLE_GAP_ERR_MISMATCH 0x4D
165 #define BLE_GATT_ERR_INVALID_ATT_LEN 0x50
166 #define BLE_GATT_ERR_INVALID_TYPE_IN_SVC_SEARCH 0x51
167 #define BLE_GATT_ERR_WRITE 0x52
168 #define BLE_GATT_ERR_SIGNED_WRITE 0x53
169 #define BLE_GATT_ERR_ATTRIBUTE_CLIENT_MISSING 0x54
170 #define BLE_GATT_ERR_ATTRIBUTE_SERVER_MISSING 0x55
171 #define BLE_GATT_ERR_INVALID_PERM 0x56
172 #define BLE_GATT_ERR_BROWSE_NO_ANY_MORE 0x57
176 #define BLE_LL_ERR_UNKNOWN_HCI_COMMAND 0x91
177 #define BLE_LL_ERR_UNKNOWN_CONNECTION_ID 0x92
178 #define BLE_LL_ERR_HARDWARE_FAILURE 0x93
179 #define BLE_LL_ERR_PAGE_TIMEOUT 0x94
180 #define BLE_LL_ERR_AUTH_FAILURE 0x95
181 #define BLE_LL_ERR_PIN_MISSING 0x96
182 #define BLE_LL_ERR_MEMORY_CAPA_EXCEED 0x97
183 #define BLE_LL_ERR_CON_TIMEOUT 0x98
184 #define BLE_LL_ERR_CON_LIMIT_EXCEED 0x99
185 #define BLE_LL_ERR_SYNC_CON_LIMIT_DEV_EXCEED 0x9A
186 #define BLE_LL_ERR_ACL_CON_EXISTS 0x9B
187 #define BLE_LL_ERR_COMMAND_DISALLOWED 0x9C
188 #define BLE_LL_ERR_CONN_REJ_LIMITED_RESOURCES 0x9D
189 #define BLE_LL_ERR_CONN_REJ_SECURITY_REASONS 0x9E
190 #define BLE_LL_ERR_CONN_REJ_UNACCEPTABLE_BDADDR 0x9F
191 #define BLE_LL_ERR_CONN_ACCEPT_TIMEOUT_EXCEED 0xA0
192 #define BLE_LL_ERR_UNSUPPORTED 0xA1
193 #define BLE_LL_ERR_INVALID_HCI_PARAM 0xA2
194 #define BLE_LL_ERR_REMOTE_USER_TERM_CON 0xA3
195 #define BLE_LL_ERR_REMOTE_DEV_TERM_LOW_RESOURCES 0xA4
196 #define BLE_LL_ERR_REMOTE_DEV_POWER_OFF 0xA5
197 #define BLE_LL_ERR_CON_TERM_BY_LOCAL_HOST 0xA6
198 #define BLE_LL_ERR_REPEATED_ATTEMPTS 0xA7
199 #define BLE_LL_ERR_PAIRING_NOT_ALLOWED 0xA8
200 #define BLE_LL_ERR_UNKNOWN_LMP_PDU 0xA9
201 #define BLE_LL_ERR_UNSUPPORTED_REMOTE_FEATURE 0xAA
202 #define BLE_LL_ERR_SCO_OFFSET_REJECTED 0xAB
203 #define BLE_LL_ERR_SCO_INTERVAL_REJECTED 0xAC
204 #define BLE_LL_ERR_SCO_AIR_MODE_REJECTED 0xAD
205 #define BLE_LL_ERR_INVALID_LMP_PARAM 0xAE
206 #define BLE_LL_ERR_UNSPECIFIED_ERROR 0xAF
207 #define BLE_LL_ERR_UNSUPPORTED_LMP_PARAM_VALUE 0xB0
208 #define BLE_LL_ERR_ROLE_CHANGE_NOT_ALLOWED 0xB1
209 #define BLE_LL_ERR_LMP_RSP_TIMEOUT 0xB2
210 #define BLE_LL_ERR_LMP_COLLISION 0xB3
211 #define BLE_LL_ERR_LMP_PDU_NOT_ALLOWED 0xB4
212 #define BLE_LL_ERR_ENC_MODE_NOT_ACCEPT 0xB5
213 #define BLE_LL_ERR_LINK_KEY_CANT_CHANGE 0xB6
214 #define BLE_LL_ERR_QOS_NOT_SUPPORTED 0xB7
215 #define BLE_LL_ERR_INSTANT_PASSED 0xB8
216 #define BLE_LL_ERR_PAIRING_WITH_UNIT_KEY_NOT_SUP 0xB9
217 #define BLE_LL_ERR_DIFF_TRANSACTION_COLLISION 0xBA
218 #define BLE_LL_ERR_QOS_UNACCEPTABLE_PARAM 0xBC
219 #define BLE_LL_ERR_QOS_REJECTED 0xBD
220 #define BLE_LL_ERR_CHANNEL_CLASS_NOT_SUP 0xBE
221 #define BLE_LL_ERR_INSUFFICIENT_SECURITY 0xBF
222 #define BLE_LL_ERR_PARAM_OUT_OF_MAND_RANGE 0xC0
223 #define BLE_LL_ERR_ROLE_SWITCH_PEND 0xC2
224 #define BLE_LL_ERR_RESERVED_SLOT_VIOLATION 0xC4
225 #define BLE_LL_ERR_ROLE_SWITCH_FAIL 0xC5
226 #define BLE_LL_ERR_EIR_TOO_LARGE 0xC6
227 #define BLE_LL_ERR_SP_NOT_SUPPORTED_HOST 0xC7
228 #define BLE_LL_ERR_HOST_BUSY_PAIRING 0xC8
229 #define BLE_LL_ERR_CONTROLLER_BUSY 0xCA
230 #define BLE_LL_ERR_UNACCEPTABLE_CONN_INT 0xCB
231 #define BLE_LL_ERR_ADV_TO 0xCC
232 #define BLE_LL_ERR_TERMINATED_MIC_FAILURE 0xCD
233 #define BLE_LL_ERR_CONN_FAILED_TO_BE_EST 0xCE
241 typedef uint8_t ble_err_t;
242
243 typedef uint16_t sdk_err_t;
248 #endif
249
sdk_err_t
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:243