Firmware SDK
twr_cmwx1zzabz

Driver for CMWX1ZZABZ muRata LoRa modem. More...

Typedefs

typedef struct twr_cmwx1zzabz_t twr_cmwx1zzabz_t
 CMWX1ZZABZ instance.
 

Enumerations

enum  twr_cmwx1zzabz_event_t {
  TWR_CMWX1ZZABZ_EVENT_READY = 0,
  TWR_CMWX1ZZABZ_EVENT_ERROR = 1,
  TWR_CMWX1ZZABZ_EVENT_SEND_MESSAGE_START = 2,
  TWR_CMWX1ZZABZ_EVENT_SEND_MESSAGE_DONE = 3,
  TWR_CMWX1ZZABZ_EVENT_CONFIG_SAVE_DONE = 4,
  TWR_CMWX1ZZABZ_EVENT_JOIN_SUCCESS = 5,
  TWR_CMWX1ZZABZ_EVENT_JOIN_ERROR = 6,
  TWR_CMWX1ZZABZ_EVENT_MESSAGE_RECEIVED = 7,
  TWR_CMWX1ZZABZ_EVENT_MESSAGE_RETRANSMISSION = 8,
  TWR_CMWX1ZZABZ_EVENT_MESSAGE_CONFIRMED = 9,
  TWR_CMWX1ZZABZ_EVENT_MESSAGE_NOT_CONFIRMED = 10
}
 Callback events. More...
 
enum  twr_cmwx1zzabz_config_mode_t {
  TWR_CMWX1ZZABZ_CONFIG_MODE_ABP = 0,
  TWR_CMWX1ZZABZ_CONFIG_MODE_OTAA = 1
}
 LoRa mode ABP/OTAA.
 
enum  twr_cmwx1zzabz_config_band_t {
  TWR_CMWX1ZZABZ_CONFIG_BAND_AS923 = 0,
  TWR_CMWX1ZZABZ_CONFIG_BAND_AU915 = 1,
  TWR_CMWX1ZZABZ_CONFIG_BAND_EU868 = 5,
  TWR_CMWX1ZZABZ_CONFIG_BAND_KR920 = 6,
  TWR_CMWX1ZZABZ_CONFIG_BAND_IN865 = 7,
  TWR_CMWX1ZZABZ_CONFIG_BAND_US915 = 8
}
 Frequency modes and standards.
 
enum  twr_cmwx1zzabz_config_class_t {
  TWR_CMWX1ZZABZ_CONFIG_CLASS_A = 0,
  TWR_CMWX1ZZABZ_CONFIG_CLASS_C = 2
}
 LoRa device class A or C.
 
enum  twr_cmwx1zzabz_config_datarate_as923_t {
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AS923_SF12_125KHZ = 0,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AS923_SF11_125KHZ = 1,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AS923_SF10_125KHZ = 2,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AS923_SF9_125KHZ = 3,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AS923_SF8_125KHZ = 4,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AS923_SF7_125KHZ = 5,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AS923_SF7_250KHZ = 6,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AS923_FSK_50KBPS = 7
}
 Datarate for AS923.
 
enum  twr_cmwx1zzabz_config_datarate_au915_t {
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AU915_SF12_125KHZ = 0,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AU915_SF11_125KHZ = 1,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AU915_SF10_125KHZ = 2,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AU915_SF9_125KHZ = 3,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AU915_SF8_125KHZ = 4,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AU915_SF7_125KHZ = 5,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AU915_SF8_500KHZ = 6,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AU915_SF12_500KHZ = 8,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AU915_SF11_500KHZ = 9,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AU915_SF10_500KHZ = 10,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AU915_SF9_500KHZ = 11,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AU915_SF8_500KHZ_2 = 12,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_AU915_SF7_500KHZ = 13
}
 Datarate for AU915.
 
enum  twr_cmwx1zzabz_config_datarate_eu868_t {
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_EU868_SF12_125KHZ = 0,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_EU868_SF11_125KHZ = 1,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_EU868_SF10_125KHZ = 2,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_EU868_SF9_125KHZ = 3,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_EU868_SF8_125KHZ = 4,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_EU868_SF7_125KHZ = 5,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_EU868_SF7_250KHZ = 6,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_EU868_FSK_50KBPS = 7
}
 Datarate for EU868.
 
enum  twr_cmwx1zzabz_config_datarate_kr920_t {
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_KR920_SF12_125KHZ = 0,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_KR920_SF11_125KHZ = 1,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_KR920_SF10_125KHZ = 2,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_KR920_SF9_125KHZ = 3,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_KR920_SF8_125KHZ = 4,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_KR920_SF7_125KHZ = 5
}
 Datarate for KR920.
 
enum  twr_cmwx1zzabz_config_datarate_us915_t {
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_US915_SF10_125KHZ = 0,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_US915_SF9_125KHZ = 1,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_US915_SF8_125KHZ = 2,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_US915_SF7_125KHZ = 3,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_US915_SF8_500KHZ = 4,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_US915_SF12_500KHZ = 8,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_US915_SF11_500KHZ = 9,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_US915_SF10_500KHZ = 10,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_US915_SF9_500KHZ = 11,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_US915_SF8_500KHZ_2 = 12,
  TWR_CMWX1ZZABZ_CONFIG_DATARATE_US915_SF7_500KHZ = 13
}
 Datarate for US915.
 

Functions

void twr_cmwx1zzabz_init (twr_cmwx1zzabz_t *self, twr_uart_channel_t uart_channel)
 Initialize CMWX1ZZABZ. More...
 
void twr_cmwx1zzabz_set_event_handler (twr_cmwx1zzabz_t *self, void(*event_handler)(twr_cmwx1zzabz_t *, twr_cmwx1zzabz_event_t, void *), void *event_param)
 Set callback function. More...
 
bool twr_cmwx1zzabz_is_ready (twr_cmwx1zzabz_t *self)
 Check if modem is ready for commands. More...
 
bool twr_cmwx1zzabz_send_message (twr_cmwx1zzabz_t *self, const void *buffer, size_t length)
 Send LoRa message. More...
 
bool twr_cmwx1zzabz_send_message_confirmed (twr_cmwx1zzabz_t *self, const void *buffer, size_t length)
 Send LoRa confirmed message. More...
 
void twr_cmwx1zzabz_set_devaddr (twr_cmwx1zzabz_t *self, char *devaddr)
 Set DEVADDR. More...
 
void twr_cmwx1zzabz_get_devaddr (twr_cmwx1zzabz_t *self, char *devaddr)
 Get DEVADDR. More...
 
void twr_cmwx1zzabz_set_deveui (twr_cmwx1zzabz_t *self, char *deveui)
 Set DEVEUI. More...
 
void twr_cmwx1zzabz_get_deveui (twr_cmwx1zzabz_t *self, char *deveui)
 Get DEVEUI. More...
 
void twr_cmwx1zzabz_set_appeui (twr_cmwx1zzabz_t *self, char *appeui)
 Set APPEUI. More...
 
void twr_cmwx1zzabz_get_appeui (twr_cmwx1zzabz_t *self, char *appeui)
 Get APPEUI. More...
 
void twr_cmwx1zzabz_set_nwkskey (twr_cmwx1zzabz_t *self, char *nwkskey)
 Set NWKSKEY. More...
 
void twr_cmwx1zzabz_get_nwkskey (twr_cmwx1zzabz_t *self, char *nwkskey)
 Set NWKSKEY. More...
 
void twr_cmwx1zzabz_set_appskey (twr_cmwx1zzabz_t *self, char *appskey)
 Set APPSKEY. More...
 
void twr_cmwx1zzabz_get_appskey (twr_cmwx1zzabz_t *self, char *appskey)
 Get APPSKEY. More...
 
void twr_cmwx1zzabz_set_appkey (twr_cmwx1zzabz_t *self, char *appkey)
 Set APPKEY. More...
 
void twr_cmwx1zzabz_get_appkey (twr_cmwx1zzabz_t *self, char *appkey)
 Get APPKEY. More...
 
void twr_cmwx1zzabz_set_band (twr_cmwx1zzabz_t *self, twr_cmwx1zzabz_config_band_t band)
 Set BAND. More...
 
twr_cmwx1zzabz_config_band_t twr_cmwx1zzabz_get_band (twr_cmwx1zzabz_t *self)
 Get BAND. More...
 
void twr_cmwx1zzabz_set_mode (twr_cmwx1zzabz_t *self, twr_cmwx1zzabz_config_mode_t mode)
 Set ABP/OTAA mode. More...
 
twr_cmwx1zzabz_config_mode_t twr_cmwx1zzabz_get_mode (twr_cmwx1zzabz_t *self)
 Get ABP/OTAA mode. More...
 
void twr_cmwx1zzabz_set_class (twr_cmwx1zzabz_t *self, twr_cmwx1zzabz_config_class_t class)
 Set device class. More...
 
twr_cmwx1zzabz_config_class_t twr_cmwx1zzabz_get_class (twr_cmwx1zzabz_t *self)
 Get device class. More...
 
void twr_cmwx1zzabz_join (twr_cmwx1zzabz_t *self)
 Start LoRa OTAA join procedure. More...
 
uint8_t twr_cmwx1zzabz_get_received_message_port (twr_cmwx1zzabz_t *self)
 Get port of the received message. More...
 
uint32_t twr_cmwx1zzabz_get_received_message_length (twr_cmwx1zzabz_t *self)
 Get length of the received message. More...
 
uint32_t twr_cmwx1zzabz_get_received_message_data (twr_cmwx1zzabz_t *self, uint8_t *buffer, uint32_t buffer_size)
 Get received message data. More...
 
void twr_cmwx1zzabz_set_port (twr_cmwx1zzabz_t *self, uint8_t port)
 Set the port for the transmission of the messages. More...
 
uint8_t twr_cmwx1zzabz_get_port (twr_cmwx1zzabz_t *self)
 Get the port for the transmission of the messages. More...
 
void twr_cmwx1zzabz_set_rx2 (twr_cmwx1zzabz_t *self, uint32_t frequency, uint8_t datarate)
 Set the frequency and datarate for RX2 receive window. More...
 
void twr_cmwx1zzabz_get_rx2 (twr_cmwx1zzabz_t *self, uint32_t *frequency, uint8_t *datarate)
 Get the frequency and datarate for RX2 receive window. More...
 
void twr_cmwx1zzabz_set_nwk_public (twr_cmwx1zzabz_t *self, uint8_t public)
 Set the configuration enabling public networks. More...
 
uint8_t twr_cmwx1zzabz_get_nwk_public (twr_cmwx1zzabz_t *self)
 Get the configuration if public networks are enabled. More...
 
void twr_cmwx1zzabz_set_adaptive_datarate (twr_cmwx1zzabz_t *self, bool enable)
 Set the configuration adaptive data rate. More...
 
bool twr_cmwx1zzabz_get_adaptive_datarate (twr_cmwx1zzabz_t *self)
 Get the configuration if adaptive data rate are enabled. More...
 
void twr_cmwx1zzabz_set_datarate (twr_cmwx1zzabz_t *self, uint8_t datarate)
 Set the configuration of datarate. More...
 
uint8_t twr_cmwx1zzabz_get_datarate (twr_cmwx1zzabz_t *self)
 Get the configuration of datarate. More...
 
void twr_cmwx1zzabz_set_debug (twr_cmwx1zzabz_t *self, bool debug)
 Set debugging flag which prints modem communication to twr_log. More...
 
char * twr_cmwx1zzabz_get_error_command (twr_cmwx1zzabz_t *self)
 Get pointer to string containg last sent command. More...
 
char * twr_cmwx1zzabz_get_error_response (twr_cmwx1zzabz_t *self)
 Get pointer to string containg response on last sent command. More...
 

Detailed Description

Driver for CMWX1ZZABZ muRata LoRa modem.

Enumeration Type Documentation

◆ twr_cmwx1zzabz_event_t

Callback events.

Enumerator
TWR_CMWX1ZZABZ_EVENT_READY 

Ready event.

TWR_CMWX1ZZABZ_EVENT_ERROR 

Error event.

TWR_CMWX1ZZABZ_EVENT_SEND_MESSAGE_START 

RF frame transmission started event.

TWR_CMWX1ZZABZ_EVENT_SEND_MESSAGE_DONE 

RF frame transmission finished event.

TWR_CMWX1ZZABZ_EVENT_CONFIG_SAVE_DONE 

Configuration save done.

TWR_CMWX1ZZABZ_EVENT_JOIN_SUCCESS 

OTAA join success.

TWR_CMWX1ZZABZ_EVENT_JOIN_ERROR 

OTAA join error.

TWR_CMWX1ZZABZ_EVENT_MESSAGE_RECEIVED 

Received message.

TWR_CMWX1ZZABZ_EVENT_MESSAGE_RETRANSMISSION 

Retransmission of the confirmed message.

TWR_CMWX1ZZABZ_EVENT_MESSAGE_CONFIRMED 

Sent message confirmed.

TWR_CMWX1ZZABZ_EVENT_MESSAGE_NOT_CONFIRMED 

Sent message not confirmed.

Definition at line 23 of file twr_cmwx1zzabz.h.

Function Documentation

◆ twr_cmwx1zzabz_get_adaptive_datarate()

bool twr_cmwx1zzabz_get_adaptive_datarate ( twr_cmwx1zzabz_t self)

Get the configuration if adaptive data rate are enabled.

Parameters
[in]selfInstance
Returns
public adaptive data rate enabled

Definition at line 926 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_appeui()

void twr_cmwx1zzabz_get_appeui ( twr_cmwx1zzabz_t self,
char *  appeui 
)

Get APPEUI.

Parameters
[in]selfInstance
[in]appeuiPointer to at least 16+1 character string

Definition at line 793 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_appkey()

void twr_cmwx1zzabz_get_appkey ( twr_cmwx1zzabz_t self,
char *  appkey 
)

Get APPKEY.

Parameters
[in]selfInstance
[in]appkeyPointer to at least 32+1 character string

Definition at line 829 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_appskey()

void twr_cmwx1zzabz_get_appskey ( twr_cmwx1zzabz_t self,
char *  appskey 
)

Get APPSKEY.

Parameters
[in]selfInstance
[in]appskeyPointer to at least 32+1 character string

Definition at line 817 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_band()

twr_cmwx1zzabz_config_band_t twr_cmwx1zzabz_get_band ( twr_cmwx1zzabz_t self)

Get BAND.

Parameters
[in]selfInstance
Returns
Band value

Definition at line 841 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_class()

twr_cmwx1zzabz_config_class_t twr_cmwx1zzabz_get_class ( twr_cmwx1zzabz_t self)

Get device class.

Parameters
[in]selfInstance
Returns
Class A or C

Definition at line 865 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_datarate()

uint8_t twr_cmwx1zzabz_get_datarate ( twr_cmwx1zzabz_t self)

Get the configuration of datarate.

Parameters
[in]selfInstance
Returns
datarate Datarate (see the enums)

Definition at line 938 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_devaddr()

void twr_cmwx1zzabz_get_devaddr ( twr_cmwx1zzabz_t self,
char *  devaddr 
)

Get DEVADDR.

Parameters
[in]selfInstance
[in]devaddrPointer to at least 8+1 character string

Definition at line 769 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_deveui()

void twr_cmwx1zzabz_get_deveui ( twr_cmwx1zzabz_t self,
char *  deveui 
)

Get DEVEUI.

Parameters
[in]selfInstance
[in]deveuiPointer to at least 16+1 character string.

Definition at line 781 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_error_command()

char* twr_cmwx1zzabz_get_error_command ( twr_cmwx1zzabz_t self)

Get pointer to string containg last sent command.

Parameters
[in]selfInstance
Returns
Buffer char* containing last modem response

Definition at line 943 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_error_response()

char* twr_cmwx1zzabz_get_error_response ( twr_cmwx1zzabz_t self)

Get pointer to string containg response on last sent command.

Parameters
[in]selfInstance
Returns
Buffer char* containing last modem response

Definition at line 948 of file twr_cmwx1zzabz.c.

Here is the call graph for this function:

◆ twr_cmwx1zzabz_get_mode()

twr_cmwx1zzabz_config_mode_t twr_cmwx1zzabz_get_mode ( twr_cmwx1zzabz_t self)

Get ABP/OTAA mode.

Parameters
[in]selfInstance
Returns
ABP or OTAA mode

Definition at line 853 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_nwk_public()

uint8_t twr_cmwx1zzabz_get_nwk_public ( twr_cmwx1zzabz_t self)

Get the configuration if public networks are enabled.

Parameters
[in]selfInstance
Returns
public networks enabled

Definition at line 914 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_nwkskey()

void twr_cmwx1zzabz_get_nwkskey ( twr_cmwx1zzabz_t self,
char *  nwkskey 
)

Set NWKSKEY.

Parameters
[in]selfInstance
[in]nwkskeyPointer to at least 32+1 character string

Definition at line 805 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_port()

uint8_t twr_cmwx1zzabz_get_port ( twr_cmwx1zzabz_t self)

Get the port for the transmission of the messages.

Parameters
[in]selfInstance
Returns
Port

Definition at line 757 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_received_message_data()

uint32_t twr_cmwx1zzabz_get_received_message_data ( twr_cmwx1zzabz_t self,
uint8_t *  buffer,
uint32_t  buffer_size 
)

Get received message data.

Parameters
[in]selfInstance
[in]bufferDestination buffer for received data
[in]buffer_sizeSize of the destination buffer
Returns
Length of the received message. Zero if the destination buffer is not big enough.

Definition at line 880 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_received_message_length()

uint32_t twr_cmwx1zzabz_get_received_message_length ( twr_cmwx1zzabz_t self)

Get length of the received message.

Parameters
[in]selfInstance
Returns
length

Definition at line 875 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_received_message_port()

uint8_t twr_cmwx1zzabz_get_received_message_port ( twr_cmwx1zzabz_t self)

Get port of the received message.

Parameters
[in]selfInstance
Returns
port

Definition at line 870 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_get_rx2()

void twr_cmwx1zzabz_get_rx2 ( twr_cmwx1zzabz_t self,
uint32_t *  frequency,
uint8_t *  datarate 
)

Get the frequency and datarate for RX2 receive window.

Parameters
[in]selfInstance
[in]frequencyPointer to save frequency in Hz
[in]dataratePointer to save datarate

Definition at line 901 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_init()

void twr_cmwx1zzabz_init ( twr_cmwx1zzabz_t self,
twr_uart_channel_t  uart_channel 
)

Initialize CMWX1ZZABZ.

Parameters
[in]selfInstance
[in]uart_channelUART channel where TX and RX signals are connected

Definition at line 42 of file twr_cmwx1zzabz.c.

Here is the call graph for this function:

◆ twr_cmwx1zzabz_is_ready()

bool twr_cmwx1zzabz_is_ready ( twr_cmwx1zzabz_t self)

Check if modem is ready for commands.

Parameters
[in]selfInstance
Returns
true If ready
false If not ready

Definition at line 79 of file twr_cmwx1zzabz.c.

Referenced by twr_cmwx1zzabz_send_message(), and twr_cmwx1zzabz_send_message_confirmed().

Here is the caller graph for this function:

◆ twr_cmwx1zzabz_join()

void twr_cmwx1zzabz_join ( twr_cmwx1zzabz_t self)

Start LoRa OTAA join procedure.

Parameters
[in]selfInstance
Note
The output of the join is handled by callback events
See also
twr_cmwx1zzabz_event_t

Definition at line 746 of file twr_cmwx1zzabz.c.

Here is the call graph for this function:

◆ twr_cmwx1zzabz_send_message()

bool twr_cmwx1zzabz_send_message ( twr_cmwx1zzabz_t self,
const void *  buffer,
size_t  length 
)

Send LoRa message.

Parameters
[in]selfInstance
[in]bufferPointer to data to be transmitted
[in]lengthLength of data to be transmitted in bytes (must be from 1 to 51 bytes)
Returns
true If command was accepted for processing
false If command was denied for processing

Definition at line 89 of file twr_cmwx1zzabz.c.

Here is the call graph for this function:

◆ twr_cmwx1zzabz_send_message_confirmed()

bool twr_cmwx1zzabz_send_message_confirmed ( twr_cmwx1zzabz_t self,
const void *  buffer,
size_t  length 
)

Send LoRa confirmed message.

Parameters
[in]selfInstance
[in]bufferPointer to data to be transmitted
[in]lengthLength of data to be transmitted in bytes (must be from 1 to 51 bytes)
Returns
true If command was accepted for processing
false If command was denied for processing

Definition at line 107 of file twr_cmwx1zzabz.c.

Here is the call graph for this function:

◆ twr_cmwx1zzabz_set_adaptive_datarate()

void twr_cmwx1zzabz_set_adaptive_datarate ( twr_cmwx1zzabz_t self,
bool  enable 
)

Set the configuration adaptive data rate.

Parameters
[in]selfInstance
[in]publicenable or disable adaptive data rate

Definition at line 919 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_appeui()

void twr_cmwx1zzabz_set_appeui ( twr_cmwx1zzabz_t self,
char *  appeui 
)

Set APPEUI.

Parameters
[in]selfInstance
[in]appeuiPointer to 16 character string

Definition at line 786 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_appkey()

void twr_cmwx1zzabz_set_appkey ( twr_cmwx1zzabz_t self,
char *  appkey 
)

Set APPKEY.

Parameters
[in]selfInstance
[in]appkeyPointer to 32 character string

Definition at line 822 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_appskey()

void twr_cmwx1zzabz_set_appskey ( twr_cmwx1zzabz_t self,
char *  appskey 
)

Set APPSKEY.

Parameters
[in]selfInstance
[in]appskeyPointer to 32 character string

Definition at line 810 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_band()

void twr_cmwx1zzabz_set_band ( twr_cmwx1zzabz_t self,
twr_cmwx1zzabz_config_band_t  band 
)

Set BAND.

Parameters
[in]selfInstance
[in]bandSet correct frequency and modulation for EU, US and other countries

Definition at line 834 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_class()

void twr_cmwx1zzabz_set_class ( twr_cmwx1zzabz_t self,
twr_cmwx1zzabz_config_class_t  class 
)

Set device class.

Parameters
[in]selfInstance
[in]classSupported are Class A and C

Definition at line 858 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_datarate()

void twr_cmwx1zzabz_set_datarate ( twr_cmwx1zzabz_t self,
uint8_t  datarate 
)

Set the configuration of datarate.

Parameters
[in]selfInstance
[in]datarateDatarate

Definition at line 931 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_debug()

void twr_cmwx1zzabz_set_debug ( twr_cmwx1zzabz_t self,
bool  debug 
)

Set debugging flag which prints modem communication to twr_log.

Parameters
[in]selfInstance
[in]debugBoolean value

Definition at line 125 of file twr_cmwx1zzabz.c.

Here is the call graph for this function:

◆ twr_cmwx1zzabz_set_devaddr()

void twr_cmwx1zzabz_set_devaddr ( twr_cmwx1zzabz_t self,
char *  devaddr 
)

Set DEVADDR.

Parameters
[in]selfInstance
[in]devaddrPointer to 8 character string

Definition at line 762 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_deveui()

void twr_cmwx1zzabz_set_deveui ( twr_cmwx1zzabz_t self,
char *  deveui 
)

Set DEVEUI.

Parameters
[in]selfInstance
[in]deveuiPointer to 16 character string. WARNING, this value should not be changed as it is unique number programmed in the factory!

Definition at line 774 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_event_handler()

void twr_cmwx1zzabz_set_event_handler ( twr_cmwx1zzabz_t self,
void(*)(twr_cmwx1zzabz_t *, twr_cmwx1zzabz_event_t, void *)  event_handler,
void *  event_param 
)

Set callback function.

Parameters
[in]selfInstance
[in]event_handlerFunction address
[in]event_paramOptional event parameter (can be NULL)

Definition at line 73 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_mode()

void twr_cmwx1zzabz_set_mode ( twr_cmwx1zzabz_t self,
twr_cmwx1zzabz_config_mode_t  mode 
)

Set ABP/OTAA mode.

Parameters
[in]selfInstance
[in]modeABP or OTAA mode

Definition at line 846 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_nwk_public()

void twr_cmwx1zzabz_set_nwk_public ( twr_cmwx1zzabz_t self,
uint8_t  public 
)

Set the configuration enabling public networks.

Parameters
[in]selfInstance
[in]publicenable public networks

Definition at line 907 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_nwkskey()

void twr_cmwx1zzabz_set_nwkskey ( twr_cmwx1zzabz_t self,
char *  nwkskey 
)

Set NWKSKEY.

Parameters
[in]selfInstance
[in]nwkskeyPointer to 32 character string

Definition at line 798 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_port()

void twr_cmwx1zzabz_set_port ( twr_cmwx1zzabz_t self,
uint8_t  port 
)

Set the port for the transmission of the messages.

Parameters
[in]selfInstance
[in]portPort

Definition at line 752 of file twr_cmwx1zzabz.c.

◆ twr_cmwx1zzabz_set_rx2()

void twr_cmwx1zzabz_set_rx2 ( twr_cmwx1zzabz_t self,
uint32_t  frequency,
uint8_t  datarate 
)

Set the frequency and datarate for RX2 receive window.

Parameters
[in]selfInstance
[in]frequencyFrequency in Hz
[in]datarateDatarate

Definition at line 892 of file twr_cmwx1zzabz.c.