nbiot4
2.0.0.0
|
API for configuring and manipulating NB IoT 4 Click driver. More...
Modules | |
NB IoT 4 Commands List | |
List of commands of NB IoT 4 Click driver. | |
NB IoT 4 Device Settings | |
Settings for registers of NB IoT 4 Click driver. | |
NB IoT 4 MikroBUS Map | |
MikroBUS pin mapping of NB IoT 4 Click driver. | |
Functions | |
void | nbiot4_cfg_setup (nbiot4_cfg_t *cfg) |
NB IoT 4 configuration object setup function. More... | |
err_t | nbiot4_init (nbiot4_t *ctx, nbiot4_cfg_t *cfg) |
NB IoT 4 initialization function. More... | |
err_t | nbiot4_default_cfg (nbiot4_t *ctx) |
NB IoT 4 default configuration function. More... | |
err_t | nbiot4_generic_write (nbiot4_t *ctx, char *data_buf, uint16_t len) |
NB IoT 4 data writing function. More... | |
err_t | nbiot4_generic_read (nbiot4_t *ctx, char *data_buf, uint16_t max_len) |
NB IoT 4 data reading function. More... | |
void | nbiot4_send_cmd (nbiot4_t *ctx, char *cmd) |
Send command function. More... | |
void | nbiot4_send_cmd_with_parameter (nbiot4_t *ctx, char *at_cmd_buf, char *param_buf) |
Send command with parameters. More... | |
void | nbiot4_send_cmd_check (nbiot4_t *ctx, char *at_cmd_buf) |
Send command to check commands current value. More... | |
void | nbiot4_send_cmd_syntax_check (nbiot4_t *ctx, char *at_cmd_buf) |
Send command to check commands available parameters. More... | |
void | nbiot4_set_sim_apn (nbiot4_t *ctx, char *sim_apn) |
Set SIM APN. More... | |
void | nbiot4_send_text_message (nbiot4_t *ctx, char *phone_number, char *message_content) |
Send SMS message to number in text mode. More... | |
err_t | nbiot4_send_sms_pdu (nbiot4_t *ctx, char *service_center_number, char *phone_number, char *sms_text) |
Send SMS message to number in pdu mode. More... | |
void | nbiot4_set_reset (nbiot4_t *ctx, uint8_t state) |
Set reset pin state. More... | |
void | nbiot_set_ri (nbiot4_t *ctx, uint8_t state) |
Set ri pin state. More... | |
API for configuring and manipulating NB IoT 4 Click driver.
void nbiot4_cfg_setup | ( | nbiot4_cfg_t * | cfg | ) |
NB IoT 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See nbiot4_cfg_t object definition for detailed explanation. |
err_t nbiot4_default_cfg | ( | nbiot4_t * | ctx | ) |
NB IoT 4 default configuration function.
This function executes a default configuration of NB IoT 4 click board.
[in] | ctx | : Click context object. See nbiot4_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t nbiot4_generic_read | ( | nbiot4_t * | ctx, |
char * | data_buf, | ||
uint16_t | max_len | ||
) |
NB IoT 4 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See nbiot4_t object definition for detailed explanation. |
[out] | data_buf | : Output read data. |
[in] | max_len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer.err_t nbiot4_generic_write | ( | nbiot4_t * | ctx, |
char * | data_buf, | ||
uint16_t | len | ||
) |
NB IoT 4 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See nbiot4_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error.err_t nbiot4_init | ( | nbiot4_t * | ctx, |
nbiot4_cfg_t * | cfg | ||
) |
NB IoT 4 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See nbiot4_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See nbiot4_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void nbiot4_send_cmd | ( | nbiot4_t * | ctx, |
char * | cmd | ||
) |
Send command function.
Send string byte by byte and additionaly send CR flag.
[in] | ctx | : Click context object. See nbiot4_t object definition for detailed explanation. |
[in] | cmd | : Command variable. |
void nbiot4_send_cmd_check | ( | nbiot4_t * | ctx, |
char * | at_cmd_buf | ||
) |
Send command to check commands current value.
Send AT command (at_cmd_buf) and appends '?' to check commands value.
[in] | ctx | : Click context object. See nbiot4_t object definition for detailed explanation. |
[in] | at_cmd_buf | : AT command. |
void nbiot4_send_cmd_syntax_check | ( | nbiot4_t * | ctx, |
char * | at_cmd_buf | ||
) |
Send command to check commands available parameters.
Send AT command (at_cmd_buf) and appends '?' to check commands value.
[in] | ctx | : Click context object. See nbiot4_t object definition for detailed explanation. |
[in] | at_cmd_buf | : AT command. |
void nbiot4_send_cmd_with_parameter | ( | nbiot4_t * | ctx, |
char * | at_cmd_buf, | ||
char * | param_buf | ||
) |
Send command with parameters.
Send AT command (at_cmd_buf) with '=' and parameter(param_buf) to set commands value.
[in] | ctx | : Click context object. See nbiot4_t object definition for detailed explanation. |
[in] | at_cmd_buf | : AT command. |
[in] | param_buf | : Parameter for AT command. |
err_t nbiot4_send_sms_pdu | ( | nbiot4_t * | ctx, |
char * | service_center_number, | ||
char * | phone_number, | ||
char * | sms_text | ||
) |
Send SMS message to number in pdu mode.
This function sends text message to a phone number in PDU mode.
[in] | ctx | : Click context object. See #gsmgps_t object definition for detailed explanation. |
[in] | service_center_number | SMSC of the SIM card. |
[in] | phone_number | Phone number to message. |
[in] | sms_text | Message to be sent. |
>=0
- Success, <0
- Error.void nbiot4_send_text_message | ( | nbiot4_t * | ctx, |
char * | phone_number, | ||
char * | message_content | ||
) |
Send SMS message to number in text mode.
Send command for SIM message with function parameters for device to send SMS message.
[in] | ctx | : Click context object. See nbiot4_t object definition for detailed explanation. |
[in] | phone_number | : Phone number to send message to. |
[in] | message_context | : Content of the message. |
void nbiot4_set_reset | ( | nbiot4_t * | ctx, |
uint8_t | state | ||
) |
Set reset pin state.
Set rst pin to the selected logic level.
[in] | ctx | : Click context object. See nbiot4_t object definition for detailed explanation. |
[in] | state | : Logic level. |
void nbiot4_set_sim_apn | ( | nbiot4_t * | ctx, |
char * | sim_apn | ||
) |
Set SIM APN.
Send command to select SIM APN.
[in] | ctx | : Click context object. See nbiot4_t object definition for detailed explanation. |
[in] | sim_apn | : SIM APN. |