nRF51 IoT SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
SDK error codes

Error codes for the nRF51 SDK. More...

Modules

 Base values defined for SDK modules
 
 Module codes
 Codes reserved as identification for the module where the error occurred.
 
 Common error codes
 Codes reserved as identification for common errors.
 
 Device Manager codes
 Error and status codes specific to the Device Manager.
 
 BLE HPS codes
 Error and status codes specific to BLE HPS.
 
 IPSP codes
 Error and status codes specific to IPSP.
 
 6LoWPAN codes
 Error and status codes specific to 6LoWPAN.
 
 UDP codes
 Error and status codes specific to UDP.
 
 ICMP codes
 Error and status codes specific to ICMP.
 
 CoAP codes
 Error and status codes specific to CoAP.
 

Macros

#define IOT_IPV6_ERR_ADDR_IF_MISMATCH   (IOT_IPV6_ERR_BASE+0x0040)
 

Typedefs

typedef uint32_t api_result_t
 API Result. More...
 

Detailed Description

Error codes for the nRF51 SDK.

Error codes are 32-bit unsigned integers. The most significant 16 bits (MSB) are reserved for identifying the module where the error occurred. The least significant 16 bits (LSB) are used to provide the cause or nature of error. Each module is assigned a 16-bit unsigned integer, which it will use to identify all errors that occurred in the module. For example, if 0x8800 identifies a certain SDK module, all error codes from 0x88000000 to 0x8800FFFF are reserved for this module.

Note that common error reasons have been assigned values to make it possible to decode error reasons easily. As an example, if a module is not initialized, this error is assigned the error code 0x000A0. If an application encounters an error code 0xZZZZ00A0, the application knows that it tried to access a certain module without initializing it.

Each module can define error codes that are not covered by the common codes. These values must be defined in a range that does not conflict with the common error values. Such module-specific error values might be used by different modules to indicate errors of very different nature; so the same error code LSB does not necessarily indicate the same error. If an error is already defined by the NRF common error codes, however, these codes are reused.

A specific range is also reserved for the application. The application can use this range to define application-specific errors.

The success code NRF_SUCCESS does not include a module identifier.

Typedef Documentation

typedef uint32_t api_result_t

API Result.

Indicates success or failure of an API procedure. In case of failure, a comprehensive error code indicating the cause or reason for the failure is provided.

Though called an API result, it could be used in asynchronous notifications callback along with asynchronous callback as event result. This mechanism is employed when an event marks the end of a procedure initiated using the API. API result, in this case, will only indicate whether the procedure has been requested successfully.