wifinora 2.1.0.0
Main Page

WiFi NORA click

PRVIH_PAR_RECENICA_SA_PRODUCT_PAGE_DA_ISPRATE_CELINU

[click Product page](CLICK_PRODUCT_PAGE_LINK)


Click library

  • Author : Stefan Ilic
  • Date : Jan 2024.
  • Type : UART type

Software Support

We provide a library for the WiFi NORA Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for WiFi NORA Click driver.

Standard key functions :

Example key functions :

  • wifinora_hw_reset This function is used to perform HW reset.
    void wifinora_hw_reset(wifinora_t *ctx)
    WiFi NORA HW reset function.
  • wifinora_send_cmd This function is used to send a desired command.
    void wifinora_send_cmd ( wifinora_t *ctx, uint8_t *at_cmd_buf );
    void wifinora_send_cmd(wifinora_t *ctx, uint8_t *at_cmd_buf)
    WiFi NORA send command function.
  • wifinora_send_cmd_with_par This function sends a desired command with the parameter.
    void wifinora_send_cmd_with_par ( wifinora_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf );
    void wifinora_send_cmd_with_par(wifinora_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf)
    WiFi NORA send command with parameter function.

Example Description

This example demonstrates the use of WiFi NORA click board by processing

the incoming data and displaying them on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver, tests the communication, and after that restarts the device, and performs example configuration.

void application_init ( void )
{
log_cfg_t log_cfg;
wifinora_cfg_t wifinora_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
wifinora_cfg_setup( &wifinora_cfg );
WIFINORA_MAP_MIKROBUS( wifinora_cfg, MIKROBUS_1 );
if ( UART_ERROR == wifinora_init( &wifinora, &wifinora_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
wifinora_process( );
wifinora_clear_app_buf( );
// Hardware reset
wifinora_hw_reset( &wifinora );
error_flag = wifinora_rsp_check( WIFINORA_RSP_READY );
wifinora_error_check( error_flag );
// Communication check
error_flag = wifinora_rsp_check( WIFINORA_RSP_OK );
wifinora_error_check( error_flag );
// Factory reset
error_flag = wifinora_rsp_check( WIFINORA_RSP_OK );
wifinora_error_check( error_flag );
// Software reset
error_flag = wifinora_rsp_check( WIFINORA_RSP_READY );
wifinora_error_check( error_flag );
error_flag = wifinora_rsp_check( WIFINORA_RSP_OK );
wifinora_error_check( error_flag );
wifinora_configure_for_example( );
log_info( &logger, " Application Task " );
}
#define WIFINORA_RSP_OK
WiFi NORA response codes.
Definition: wifinora.h:88
#define WIFINORA_CMD_AT_GMM
Definition: wifinora.h:71
#define WIFINORA_CMD_AT_SW_RESET
Definition: wifinora.h:72
#define WIFINORA_CMD_AT
WiFi NORA control commands.
Definition: wifinora.h:69
#define WIFINORA_CMD_AT_USYFR
Definition: wifinora.h:70
#define WIFINORA_RSP_READY
Definition: wifinora.h:90
#define WIFINORA_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition: wifinora.h:123
void application_init(void)
Definition: main.c:112

Application Task

It creates a connection to the TCP-UDP echo server, sends a message to it reads it back, displaces it on the UART terminal, and then closes the connection.

void application_task ( void )
{
wifinora_example( );
}
void application_task(void)
Definition: main.c:171

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.WiFiNORA

Additional notes and informations

Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.