nbiot 2.0.0.0
Public function

Functions

void nbiot_cfg_setup (nbiot_cfg_t *cfg)
 NB IoT configuration object setup function.
 
err_t nbiot_init (nbiot_t *ctx, nbiot_cfg_t *cfg)
 NB IoT initialization function.
 
err_t nbiot_generic_write (nbiot_t *ctx, char *data_buf, uint16_t len)
 NB IoT data writing function.
 
err_t nbiot_generic_read (nbiot_t *ctx, char *data_buf, uint16_t max_len)
 NB IoT data reading function.
 
void nbiot_power_on (nbiot_t *ctx)
 NB IoT module power on.
 
void nbiot_set_rst (nbiot_t *ctx, uint8_t state)
 Sets state of the RST pin.
 
uint8_t nbiot_get_stat (nbiot_t *ctx)
 STAT Pin Get function.
 
void nbiot_send_cmd (nbiot_t *ctx, char *cmd)
 Send command function.
 
void nbiot_send_cmd_with_parameter (nbiot_t *ctx, char *at_cmd_buf, char *param_buf)
 Send command function with parameter.
 
void nbiot_send_cmd_check (nbiot_t *ctx, char *at_cmd_buf)
 Check the sent command.
 
void nbiot_send_cmd_parameter_check (nbiot_t *ctx, char *at_cmd_buf)
 Check the command parameters.
 
void nbiot_set_sim_apn (nbiot_t *ctx, char *sim_apn)
 Set sim card APN.
 

Detailed Description

Function Documentation

◆ nbiot_cfg_setup()

void nbiot_cfg_setup ( nbiot_cfg_t * cfg)

NB IoT configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See nbiot_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ nbiot_generic_read()

err_t nbiot_generic_read ( nbiot_t * ctx,
char * data_buf,
uint16_t max_len )

NB IoT data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See nbiot_t object definition for detailed explanation.
[out]data_buf: Output read data.
[in]max_len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer.
See #err_t definition for detailed explanation.
Note
None.

◆ nbiot_generic_write()

err_t nbiot_generic_write ( nbiot_t * ctx,
char * data_buf,
uint16_t len )

NB IoT data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See nbiot_t object definition for detailed explanation.
[in]data_buf: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ nbiot_get_stat()

uint8_t nbiot_get_stat ( nbiot_t * ctx)

STAT Pin Get function.

This function allows user to check state of the STAT pin.

Parameters
[in]ctx: Click context object. See nbiot_t object definition for detailed explanation.
Returns
  • 0 logical low.
  • 1 logical high.

◆ nbiot_init()

err_t nbiot_init ( nbiot_t * ctx,
nbiot_cfg_t * cfg )

NB IoT initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See nbiot_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See nbiot_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ nbiot_power_on()

void nbiot_power_on ( nbiot_t * ctx)

NB IoT module power on.

This function resets the chip on NB IoT click.

Parameters
[in]ctx: Click context object. See nbiot_t object definition for detailed explanation.
Returns
Nothing.

◆ nbiot_send_cmd()

void nbiot_send_cmd ( nbiot_t * ctx,
char * cmd )

Send command function.

This function sends the specified command to the click module.

Parameters
[in]ctx: Click context object. See nbiot_t object definition for detailed explanation.
[in]cmdCommand variable.
Returns
Nothing.

◆ nbiot_send_cmd_check()

void nbiot_send_cmd_check ( nbiot_t * ctx,
char * at_cmd_buf )

Check the sent command.

This function checks the command that is sent.

Parameters
[in]ctx: Click context object. See nbiot_t object definition for detailed explanation.
[in]at_cmd_bufCommand buffer.
Returns
Nothing.

◆ nbiot_send_cmd_parameter_check()

void nbiot_send_cmd_parameter_check ( nbiot_t * ctx,
char * at_cmd_buf )

Check the command parameters.

This function checks the command that is sent.

Parameters
[in]ctx: Click context object. See nbiot_t object definition for detailed explanation.
[in]at_cmd_bufCommand buffer.
Returns
Nothing.

◆ nbiot_send_cmd_with_parameter()

void nbiot_send_cmd_with_parameter ( nbiot_t * ctx,
char * at_cmd_buf,
char * param_buf )

Send command function with parameter.

This function sends commands to the click module.

Parameters
[in]ctx: Click context object. See nbiot_t object definition for detailed explanation.
[in]at_cmd_bufCommand buffer.
[in]param_bufParameter buffer.
Returns
Nothing.

◆ nbiot_set_rst()

void nbiot_set_rst ( nbiot_t * ctx,
uint8_t state )

Sets state of the RST pin.

This function sets RST pin state.

Parameters
[in]ctx: Click context object. See nbiot_t object definition for detailed explanation.
[in]statePin state ( 1 or 0 ).
Returns
Nothing.

◆ nbiot_set_sim_apn()

void nbiot_set_sim_apn ( nbiot_t * ctx,
char * sim_apn )

Set sim card APN.

This function sets APN for sim card.

Parameters
[in]ctx: Click context object. See nbiot_t object definition for detailed explanation.
[in]sim_apnSIM card APN.
Returns
Nothing.