RadioLib
Universal wireless communication library for Arduino
Status Codes

Macros

#define ERR_NONE   0
 No error, method executed successfully.
 
#define ERR_UNKNOWN   -1
 There was an unexpected, unknown error. If you see this, something went incredibly wrong. Your Arduino may be possessed, contact your local exorcist to resolve this error.
 
#define ERR_CHIP_NOT_FOUND   -2
 Radio chip was not found during initialization. This can be caused by specifying wrong chip type in the constructor (i.e. calling SX1272 constructor for SX1278 chip) or by a fault in your wiring (incorrect slave select pin).
 
#define ERR_MEMORY_ALLOCATION_FAILED   -3
 Failed to allocate memory for temporary buffer. This can be cause by not enough RAM or by passing invalid pointer.
 
#define ERR_PACKET_TOO_LONG   -4
 Packet supplied to transmission method was longer than limit.
 
#define ERR_TX_TIMEOUT   -5
 Timed out waiting for transmission finish.
 
#define ERR_RX_TIMEOUT   -6
 Timed out waiting for incoming transmission.
 
#define ERR_CRC_MISMATCH   -7
 The calculated and expected CRCs of received packet do not match. This means that the packet was damaged during transmission and should be sent again.
 
#define ERR_INVALID_BANDWIDTH   -8
 The supplied bandwidth value is invalid for this module.
 
#define ERR_INVALID_SPREADING_FACTOR   -9
 The supplied spreading factor value is invalid for this module.
 
#define ERR_INVALID_CODING_RATE   -10
 The supplied coding rate value is invalid for this module.
 
#define ERR_INVALID_BIT_RANGE   -11
 Internal only.
 
#define ERR_INVALID_FREQUENCY   -12
 The supplied frequency value is invalid for this module.
 
#define ERR_INVALID_OUTPUT_POWER   -13
 The supplied output power value is invalid for this module.
 
#define PREAMBLE_DETECTED   -14
 LoRa preamble was detected during channel activity detection. This means that there is some LoRa device currently transmitting in your channel.
 
#define CHANNEL_FREE   -15
 No LoRa preambles were detected during channel activity detection. Your channel is free.
 
#define ERR_SPI_WRITE_FAILED   -16
 Real value in SPI register does not match the expected one. This can be caused by faulty SPI wiring.
 
#define ERR_INVALID_CURRENT_LIMIT   -17
 The supplied current limit value is invalid.
 
#define ERR_INVALID_PREAMBLE_LENGTH   -18
 The supplied preamble length is invalid.
 
#define ERR_INVALID_GAIN   -19
 The supplied gain value is invalid.
 
#define ERR_WRONG_MODEM   -20
 User tried to execute modem-exclusive method on a wrong modem. For example, this can happen when you try to change LoRa configuration when FSK modem is active.
 
#define ERR_INVALID_NUM_SAMPLES   -21
 The supplied number of RSSI samples is invalid.
 
#define ERR_INVALID_RSSI_OFFSET   -22
 The supplied RSSI offset is invalid.
 
#define ERR_INVALID_ENCODING   -23
 The supplied encoding is invalid.
 
#define ERR_LORA_HEADER_DAMAGED   -24
 LoRa packet header has been damaged.
 
#define ERR_INVALID_BIT_RATE   -101
 The supplied bit rate value is invalid.
 
#define ERR_INVALID_FREQUENCY_DEVIATION   -102
 The supplied frequency deviation value is invalid.
 
#define ERR_INVALID_BIT_RATE_BW_RATIO   -103
 The supplied bit rate to bandwidth ratio is invalid. See the module datasheet for more information.
 
#define ERR_INVALID_RX_BANDWIDTH   -104
 The supplied receiver bandwidth value is invalid.
 
#define ERR_INVALID_SYNC_WORD   -105
 The supplied FSK sync word is invalid.
 
#define ERR_INVALID_DATA_SHAPING   -106
 The supplied FSK data shaping option is invalid.
 
#define ERR_INVALID_MODULATION   -107
 The current modulation is invalid for the requested operation.
 
#define ERR_AT_FAILED   -201
 AT command failed to execute, or timed out.
 
#define ERR_URL_MALFORMED   -202
 Supplied URL is malformed or invalid.
 
#define ERR_RESPONSE_MALFORMED_AT   -203
 AT command response was malformed.
 
#define ERR_RESPONSE_MALFORMED   -204
 Data response was malformed.
 
#define ERR_MQTT_CONN_VERSION_REJECTED   -205
 MQTT broker rejected connection due to version mismatch.
 
#define ERR_MQTT_CONN_ID_REJECTED   -206
 MQTT broker rejected connection due to unknown ID.
 
#define ERR_MQTT_CONN_SERVER_UNAVAILABLE   -207
 Failed to establish connection with MQTT broker.
 
#define ERR_MQTT_CONN_BAD_USERNAME_PASSWORD   -208
 Supplied username/password combination is incorrect.
 
#define ERR_MQTT_CONN_NOT_AUTHORIZED   -208
 Unauthorized connection to MQTT broker.
 
#define ERR_MQTT_UNEXPECTED_PACKET_ID   -209
 Received packet ID does not match the expected ID.
 
#define ERR_MQTT_NO_NEW_PACKET_AVAILABLE   -210
 No new packet was received since the last check.
 
#define MQTT_SUBS_SUCCESS_QOS_0   0x00
 Successfully subscribed to MQTT topic with QoS 0.
 
#define MQTT_SUBS_SUCCESS_QOS_1   0x01
 Successfully subscribed to MQTT topic with QoS 1.
 
#define MQTT_SUBS_SUCCESS_QOS_2   0x02
 Successfully subscribed to MQTT topic with QoS 2.
 
#define ERR_MQTT_SUBS_FAILED   0x80
 Failed to subscribe to MQTT topic.
 
#define ERR_CMD_MODE_FAILED   -301
 Failed to enter command mode.
 
#define ERR_FRAME_MALFORMED   -302
 Received ZigBee frame is malformed.
 
#define ERR_FRAME_INCORRECT_CHECKSUM   -303
 Received ZigBee frame checksum does not match the calculated.
 
#define ERR_FRAME_UNEXPECTED_ID   -304
 Received ZigBee frame with unexpected ID.
 
#define ERR_FRAME_NO_RESPONSE   -305
 Timed out waiting for response to ZigBee frame.
 
#define ERR_INVALID_RTTY_SHIFT   -401
 Supplied RTTY frequency shift is invalid for this module.
 
#define ERR_UNSUPPORTED_ENCODING   -402
 Supplied RTTY encoding is invalid.
 
#define ERR_INVALID_DATA_RATE   -501
 Supplied data rate is invalid.
 
#define ERR_INVALID_ADDRESS_WIDTH   -502
 Supplied address width is invalid.
 
#define ERR_INVALID_PIPE_NUMBER   -503
 Supplied data pipe number is invalid.
 
#define ERR_ACK_NOT_RECEIVED   -504
 ACK packet from destination module was not received within 15 retries.
 
#define ERR_INVALID_NUM_BROAD_ADDRS   -601
 Supplied number of broadcast addresses is invalid.
 
#define ERR_INVALID_CRC_CONFIGURATION   -701
 Supplied CRC configuration is invalid.
 
#define LORA_DETECTED   -702
 Detected LoRa transmission while scanning channel.
 
#define ERR_INVALID_TCXO_VOLTAGE   -703
 Supplied TCXO reference voltage is invalid.
 
#define ERR_INVALID_MODULATION_PARAMETERS   -704
 Bit rate / bandwidth / frequency deviation ratio is invalid. See SX126x datasheet for details.
 
#define ERR_SPI_CMD_TIMEOUT   -705
 SX126x timed out while waiting for complete SPI command.
 
#define ERR_SPI_CMD_INVALID   -706
 SX126x received invalid SPI command.
 
#define ERR_SPI_CMD_FAILED   -707
 SX126x failed to execute SPI command.
 
#define ERR_INVALID_SLEEP_PERIOD   -708
 The supplied sleep period is invalid. More...
 
#define ERR_INVALID_RX_PERIOD   -709
 The supplied Rx period is invalid. More...
 
#define ERR_INVALID_CALLSIGN   -801
 The provided callsign is invalid. More...
 
#define ERR_INVALID_NUM_REPEATERS   -802
 The provided repeater configuration is invalid. More...
 
#define ERR_INVALID_REPEATER_CALLSIGN   -803
 One of the provided repeater callsigns is invalid. More...
 
#define ERR_RANGING_TIMEOUT   -901
 Timed out waiting for ranging exchange finish.
 

Detailed Description

Macro Definition Documentation

◆ ERR_INVALID_CALLSIGN

#define ERR_INVALID_CALLSIGN   -801

The provided callsign is invalid.

The specified callsign is longer than 6 ASCII characters.

◆ ERR_INVALID_NUM_REPEATERS

#define ERR_INVALID_NUM_REPEATERS   -802

The provided repeater configuration is invalid.

The specified number of repeaters does not match number of repeater IDs or their callsigns.

◆ ERR_INVALID_REPEATER_CALLSIGN

#define ERR_INVALID_REPEATER_CALLSIGN   -803

One of the provided repeater callsigns is invalid.

The specified callsign is longer than 6 ASCII characters.

◆ ERR_INVALID_RX_PERIOD

#define ERR_INVALID_RX_PERIOD   -709

The supplied Rx period is invalid.

The specified Rx period is shorter or longer than the hardware can handle.

◆ ERR_INVALID_SLEEP_PERIOD

#define ERR_INVALID_SLEEP_PERIOD   -708

The supplied sleep period is invalid.

The specified sleep period is shorter than the time necessary to sleep and wake the hardware including TCXO delay, or longer than the maximum possible