Error Code Reference
The AT command set uses a two-layer error scheme. The outer layer (at_cmd_err_t,
defined in openair/lib/at_cmd/at_cmd.h) indicates how the AT framework processed the
command. The inner layer (at_cmd_app_err_t, defined in
openair/subsys/at_cmd_set/at_cmd_set.h) carries domain-specific detail when the outer
code is AT_CMD_ERR_SPECIFIC_ERR (0x80).
Error Response Format
- Generic errors:
ERR:<code>— decimal value ofat_cmd_err_t(1–7).- Specific errors:
+<CMD>:<hex_app_err>on one line, thenERRon the next.
# Generic — wrong argument count
AT+BLEADVENABLE=
ERR:2
# Specific — advertising set already enabled
AT+BLEADVENABLE=0,ON
+BLEADVENABLE:11
ERR
Framework Error Codes (at_cmd_err_t)
Defined in openair/lib/at_cmd/at_cmd.h.
Code |
Constant |
Description |
|---|---|---|
|
|
No error; command executed successfully ( |
|
|
Command not supported — Kconfig symbol disabled or operation not implemented. |
|
|
Wrong number of arguments supplied. |
|
|
One or more argument values are outside the permitted range. |
|
|
An argument has an unexpected type. |
|
|
An argument has the wrong type or is out of range. |
|
|
Argument content is syntactically valid but semantically rejected. |
|
|
The command form used (test / query / execute) is not supported. |
|
|
Command-specific error; the |
Application Error Codes (at_cmd_app_err_t)
Defined in openair/subsys/at_cmd_set/at_cmd_set.h. These values appear in the
+<CMD>:<hex_app_err> response line that precedes ERR whenever the framework
code is AT_CMD_ERR_SPECIFIC_ERR.
Value ranges
Range |
Domain |
|---|---|
|
No error |
|
GAP — role / identity-address errors (legacy, wire-compatible) |
|
Advertising |
|
Context |
|
Parameter validation |
|
BLE / Zephyr errno mapping |
|
GPIO / FIO |
|
System |
|
GATT / ATT |
|
Dynamic GATT staging |
Code table
Code |
Constant |
Description |
|---|---|---|
|
|
No error. |
|
|
GAP role is already initialised; cannot re-initialise. |
|
|
Requested GAP role is not supported by this build. |
|
|
Parameter must be configured before |
|
|
Parameter must be configured after |
|
|
Only static random addresses are supported. |
|
|
Advertising set index is out of range (≥ |
|
|
Advertising is already active on the specified set. |
|
|
Advertising is not currently active on the specified set. |
|
|
Extended advertising set has not been created yet. |
|
|
One or more advertising parameters are invalid. |
|
|
Advertisement payload exceeds |
|
|
Scan-response payload exceeds |
|
|
AT command context pointer is |
|
|
AT command context has not been initialised. |
|
|
Parameter value is invalid for this operation. |
|
|
Parameter value is outside the accepted range. |
|
|
Parameter length is invalid (too short or too long). |
|
|
Maps |
|
|
Maps |
|
|
Maps |
|
|
Maps |
|
|
Maps |
|
|
Maps |
|
|
Maps |
|
|
Maps |
|
|
Maps |
|
|
Maps |
|
|
Maps |
|
|
Unrecognised BLE/Zephyr errno (catch-all). |
|
|
GPIO device ( |
|
|
|
|
|
A reboot is required for the requested setting to take effect. |
|
|
System subsystem is not ready. |
|
|
Console UART device is not ready. Used by |
|
|
|
|
|
GATT attribute handle is invalid or out of range. |
|
|
Read operation is not permitted on this attribute. |
|
|
Write operation is not permitted on this attribute. |
|
|
Received GATT PDU is invalid. |
|
|
Insufficient authentication to access this attribute. |
|
|
GATT request opcode is not supported. |
|
|
Attribute value offset is beyond the end of the value. |
|
|
Insufficient authorization to access this attribute. |
|
|
Prepare-write queue is full. |
|
|
No attribute found within the handle range. |
|
|
Attribute is not a long attribute; long read/write not applicable. |
|
|
Encryption key size is insufficient for this attribute. |
|
|
Attribute value length is invalid for a write operation. |
|
|
Unlikely GATT error (catch-all for unexpected ATT errors). |
|
|
Insufficient encryption level for this attribute. |
|
|
Attribute group type is not supported. |
|
|
Service is already active; characteristics/descriptors cannot be added.
Used by |
|
|
No |
|
|
No |
BLE / Zephyr Errno Mapping
When a BLE or Zephyr API returns a standard errno, at_cmd_map_errno()
(defined in at_cmd_set_common.h) translates it to the corresponding
AT_ERR_BLE_* application error code automatically.
Zephyr errno |
App error code |
Meaning |
|---|---|---|
|
|
Invalid argument |
|
|
Device or resource busy |
|
|
Out of memory |
|
|
Operation not supported |
|
|
Permission denied |
|
|
No such device |
|
|
Operation timed out |
|
|
Connection refused |
|
|
Connection reset by peer |
|
|
Broken pipe |
|
|
Already in progress / address already set |
(other) |
|
Unrecognised errno value |
Tag Error Codes (at_cmd_tag_err_t)
Defined in openair/subsys/at_cmd_set/at_cmd_tag.h. These codes are used
exclusively by tag command callbacks (CONFIG_AT_CMD_TAG_SET) and are reported
directly in the +<CMD>:<hex_code> specific-error response.
Code |
Constant |
Description |
|---|---|---|
|
|
Operation completed successfully. |
|
|
Invalid parameter (e.g. |
|
|
Operation not allowed in the current tag state. |
|
|
Internal or platform-level error. |
|
|
BLE stack initialisation failed. |
|
|
Motion sensor error. |
|
|
Button configuration error. |
|
|
Watchdog configuration error. |
|
|
Buzzer configuration error. |