libbladeRF  2.2.1
Nuand bladeRF library
Macros | Functions
Error codes


bladeRF library routines return negative values to indicate errors. Values >= 0 are used to indicate success.

int status = bladerf_set_gain(dev, BLADERF_CHANNEL_RX(0), 2);
if (status < 0) {


#define BLADERF_ERR_RANGE   (-2)
#define BLADERF_ERR_INVAL   (-3)
#define BLADERF_ERR_MEM   (-4)
#define BLADERF_ERR_IO   (-5)
#define BLADERF_ERR_TIMEOUT   (-6)
#define BLADERF_ERR_NODEV   (-7)
#define BLADERF_ERR_CHECKSUM   (-10)
#define BLADERF_ERR_NO_FILE   (-11)
#define BLADERF_ERR_UPDATE_FW   (-13)
#define BLADERF_ERR_TIME_PAST   (-14)
#define BLADERF_ERR_QUEUE_FULL   (-15)
#define BLADERF_ERR_FPGA_OP   (-16)
#define BLADERF_ERR_NOT_INIT   (-19)


API_EXPORT const char *CALL_CONV bladerf_strerror (int error)

Macro Definition Documentation


#define BLADERF_ERR_CHECKSUM   (-10)

Invalid checksum

Definition at line 3998 of file libbladeRF.h.


#define BLADERF_ERR_FPGA_OP   (-16)

An FPGA operation reported failure

Definition at line 4006 of file libbladeRF.h.


#define BLADERF_ERR_INVAL   (-3)

Invalid operation/parameter

Definition at line 3991 of file libbladeRF.h.


#define BLADERF_ERR_IO   (-5)

File/Device I/O error

Definition at line 3993 of file libbladeRF.h.


#define BLADERF_ERR_MEM   (-4)

Memory allocation error

Definition at line 3992 of file libbladeRF.h.



Misaligned flash access

Definition at line 3997 of file libbladeRF.h.


#define BLADERF_ERR_NO_FILE   (-11)

File not found

Definition at line 3999 of file libbladeRF.h.


#define BLADERF_ERR_NODEV   (-7)

No device(s) available

Definition at line 3995 of file libbladeRF.h.


#define BLADERF_ERR_NOT_INIT   (-19)

Device insufficiently initialized for operation

Definition at line 4019 of file libbladeRF.h.



Insufficient permissions for the requested operation

Definition at line 4007 of file libbladeRF.h.


#define BLADERF_ERR_QUEUE_FULL   (-15)

Could not enqueue data into full queue

Definition at line 4003 of file libbladeRF.h.


#define BLADERF_ERR_RANGE   (-2)

Provided parameter is out of range

Definition at line 3990 of file libbladeRF.h.


#define BLADERF_ERR_TIME_PAST   (-14)

Requested timestamp is in the past

Definition at line 4002 of file libbladeRF.h.


#define BLADERF_ERR_TIMEOUT   (-6)

Operation timed out

Definition at line 3994 of file libbladeRF.h.



An unexpected failure occurred

Definition at line 3989 of file libbladeRF.h.



Operation not supported

Definition at line 3996 of file libbladeRF.h.



An FPGA update is required

Definition at line 4000 of file libbladeRF.h.


#define BLADERF_ERR_UPDATE_FW   (-13)

A firmware update is requied

Definition at line 4001 of file libbladeRF.h.



Operation would block, but has been requested to be non-blocking. This indicates to a caller that it may need to retry the operation later.

Definition at line 4010 of file libbladeRF.h.

Function Documentation

◆ bladerf_strerror()

API_EXPORT const char* CALL_CONV bladerf_strerror ( int  error)

Obtain a textual description of a value from the Error codes list

[in]errorError value to look up
Error string