wizfi360  2.1.0.0
Main Page

WIZFI360 Click

WIZFI360 Click is a compact add-on board for reliable WiFi connectivity in industrial applications. This board features the WIZFI360, a WiFi module from WIZnet, known for its low power consumption and full compliance with IEEE802.11 b/g/n standards. The board supports SoftAP, Station, and SoftAP+Station modes, operates within the frequency range of 2400MHz to 2483.5MHz, and offers a versatile serial port baud rate of up to 2Mbps. It features WPA_PSK and WPA2_PSK encryption for secure communication, configurable operating channels from 1 to 13, and the ability to handle up to 5 simultaneous TCP/UDP links.

Click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Mar 2024.
  • Type : UART type

Software Support

We provide a library for the WIZFI360 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 WIZFI360 Click driver.

Standard key functions :

Example key functions :

  • wizfi360_write_command This function writes a desired command by using the UART serial interface.
    err_t wizfi360_write_command ( wizfi360_t *ctx, uint8_t *command )
  • wizfi360_write_cmd_param This function writes a desired command, prefix and parameter by using UART serial interface.
    err_t wizfi360_write_cmd_param ( wizfi360_t *ctx, uint8_t *command, uint8_t *prefix, uint8_t *param );
  • wizfi360_send_message This function sends messages to the host in normal transmission mode using the UART serial interface.
    err_t wizfi360_send_message ( wizfi360_t *ctx, uint8_t *message );

Example Description

This example demonstrates the use of the WIZFI360 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, connects to the desired WiFi network, and then connects to the TCP/UDP server and configures SNTP parameter.

void application_init ( void )
{
log_cfg_t log_cfg;
wizfi360_cfg_t wizfi360_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
wizfi360_cfg_setup( &wizfi360_cfg );
WIZFI360_MAP_MIKROBUS( wizfi360_cfg, MIKROBUS_1 );
if ( UART_ERROR == wizfi360_init( &wizfi360, &wizfi360_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
Delay_ms ( 100 );
wizfi360_check_response( WIZFI360_RSP_OK );
Delay_ms ( 500 );
wizfi360_check_response( WIZFI360_RSP_OK );
Delay_ms ( 500 );
wizfi360_check_response( WIZFI360_RSP_OK );
Delay_ms ( 500 );
wizfi360_check_response( WIZFI360_RSP_OK );
Delay_ms ( 500 );
wizfi360_check_response( WIZFI360_RSP_OK );
Delay_ms ( 500 );
wizfi360_check_response( WIZFI360_RSP_OK );
Delay_ms ( 500 );
memset( cmd_buf, 0, 100 );
strcpy( cmd_buf, WIZFI360_PREFIX_SYMB_QUOTE );
strcat( cmd_buf, DEMO_SSID );
strcat( cmd_buf, WIZFI360_PREFIX_SYMB_QUOTE );
strcat( cmd_buf, WIZFI360_PREFIX_SYMB_SEPARATOR );
strcat( cmd_buf, WIZFI360_PREFIX_SYMB_QUOTE );
strcat( cmd_buf, DEMO_PASSWORD );
strcat( cmd_buf, WIZFI360_PREFIX_SYMB_QUOTE );
cmd_buf );
wizfi360_check_response( WIZFI360_RSP_OK );
Delay_ms ( 500 );
wizfi360_check_response( WIZFI360_RSP_OK );
Delay_ms ( 500 );
memset( cmd_buf, 0, 100 );
strcpy( cmd_buf, WIZFI360_PREFIX_SYMB_QUOTE );
strcat( cmd_buf, DEMO_EXAMPLE_TCP );
strcat( cmd_buf, WIZFI360_PREFIX_SYMB_QUOTE );
strcat( cmd_buf, WIZFI360_PREFIX_SYMB_SEPARATOR );
strcat( cmd_buf, WIZFI360_PREFIX_SYMB_QUOTE );
strcat( cmd_buf, DEMO_REMOTE_ID );
strcat( cmd_buf, WIZFI360_PREFIX_SYMB_QUOTE );
strcat( cmd_buf, WIZFI360_PREFIX_SYMB_SEPARATOR );
strcat( cmd_buf, DEMO_REMOTE_PORT );
cmd_buf );
wizfi360_check_response( WIZFI360_RSP_OK );
Delay_ms ( 500 );
wizfi360_check_response( WIZFI360_RSP_OK );
Delay_ms ( 500 );
log_info( &logger, " Application Task " );
}

Application Task

The demo app displays current time data, sends data messages to the TCP/UDP server, reads and processes all incoming data and displays them on the USB UART.

void application_task ( void )
{
wizfi360_check_response( WIZFI360_RSP_OK );
Delay_ms ( 1000 );
wizfi360_check_response( WIZFI360_RSP_READY_FOR_SEND );
wizfi360_check_response( WIZFI360_RECEIVE );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}

Note

In order for the examples to work without using Planet Debug, the user needs to set the SSID and password of the target AP.

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.WIZFI360

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.


WIZFI360_CWMODE_STATION
#define WIZFI360_CWMODE_STATION
WIZFI360 current WiFi mode selection.
Definition: wizfi360.h:172
wizfi360_cfg_setup
void wizfi360_cfg_setup(wizfi360_cfg_t *cfg)
WIZFI360 configuration object setup function.
WIZFI360_CMD_CIPMUX
#define WIZFI360_CMD_CIPMUX
Definition: wizfi360.h:142
wizfi360_t
WIZFI360 Click context object.
Definition: wizfi360.h:272
WIZFI360_CMD_CIPSEND
#define WIZFI360_CMD_CIPSEND
Definition: wizfi360.h:134
wizfi360_write_cmd_param
err_t wizfi360_write_cmd_param(wizfi360_t *ctx, uint8_t *command, uint8_t *prefix, uint8_t *param)
WIZFI360 command - prefix - parameter writing function.
DEMO_REMOTE_ID
#define DEMO_REMOTE_ID
Definition: main.c:59
application_task
void application_task(void)
Definition: main.c:204
WIZFI360_CMD_GMR
#define WIZFI360_CMD_GMR
Definition: wizfi360.h:75
WIZFI360_CIPMUX_SINGLE_CONN
#define WIZFI360_CIPMUX_SINGLE_CONN
WIZFI360 multiple connections selection.
Definition: wizfi360.h:180
WIZFI360_CMD_CIPSTART
#define WIZFI360_CMD_CIPSTART
Definition: wizfi360.h:130
WIZFI360_PREFIX_SYMB_QUOTE
#define WIZFI360_PREFIX_SYMB_QUOTE
Definition: wizfi360.h:205
WIZFI360_ENABLE_TIMEZONE_1
#define WIZFI360_ENABLE_TIMEZONE_1
WIZFI360 SNTP configuration parameter.
Definition: wizfi360.h:198
WIZFI360_CMD_CIPSTA_CUR
#define WIZFI360_CMD_CIPSTA_CUR
Definition: wizfi360.h:112
WIZFI360_CMD_CWDHCP_CUR
#define WIZFI360_CMD_CWDHCP_CUR
Definition: wizfi360.h:103
WIZFI360_PREFIX_SYMB_SET_VAL
#define WIZFI360_PREFIX_SYMB_SET_VAL
Definition: wizfi360.h:208
WIZFI360_CMD_RESTORE
#define WIZFI360_CMD_RESTORE
Definition: wizfi360.h:78
WIZFI360_CMD_CIPSNTPCFG
#define WIZFI360_CMD_CIPSNTPCFG
Definition: wizfi360.h:151
wizfi360_init
err_t wizfi360_init(wizfi360_t *ctx, wizfi360_cfg_t *cfg)
WIZFI360 initialization function.
WIZFI360_PREFIX_SYMB_SEPARATOR
#define WIZFI360_PREFIX_SYMB_SEPARATOR
Definition: wizfi360.h:206
wizfi360_inquire_command
err_t wizfi360_inquire_command(wizfi360_t *ctx, uint8_t *command)
WIZFI360 inquire command function.
WIZFI360_CMD_CWMODE_CUR
#define WIZFI360_CMD_CWMODE_CUR
WIZFI360 WiFi commands.
Definition: wizfi360.h:93
WIZFI360_CMD_CIPSNTPTIME
#define WIZFI360_CMD_CIPSNTPTIME
Definition: wizfi360.h:152
DEMO_SSID
#define DEMO_SSID
Definition: main.c:51
WIZFI360_CWDHCP_STATION_DHCP
#define WIZFI360_CWDHCP_STATION_DHCP
Definition: wizfi360.h:190
DEMO_PASSWORD
#define DEMO_PASSWORD
Definition: main.c:52
wizfi360_write_command
err_t wizfi360_write_command(wizfi360_t *ctx, uint8_t *command)
WIZFI360 command writing function.
WIZFI360_CMD_AT
#define WIZFI360_CMD_AT
WIZFI360 system control commands.
Definition: wizfi360.h:73
WIZFI360_CMD_CWJAP_CUR
#define WIZFI360_CMD_CWJAP_CUR
Definition: wizfi360.h:95
application_init
void application_init(void)
Definition: main.c:103
wizfi360_send_message
err_t wizfi360_send_message(wizfi360_t *ctx, uint8_t *message)
WIZFI360 send message function.
WIZFI360_RECEIVE
#define WIZFI360_RECEIVE
Definition: wizfi360.h:221
DEMO_REMOTE_PORT
#define DEMO_REMOTE_PORT
Definition: main.c:60
WIZFI360_MAP_MIKROBUS
#define WIZFI360_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition: wizfi360.h:255
DEMO_SEND_DATA
#define DEMO_SEND_DATA
Definition: main.c:45
WIZFI360_RSP_READY_FOR_SEND
#define WIZFI360_RSP_READY_FOR_SEND
Definition: wizfi360.h:219
DEMO_SEND_DATA_LENGTH
#define DEMO_SEND_DATA_LENGTH
Definition: main.c:48
WIZFI360_RSP_OK
#define WIZFI360_RSP_OK
WIZFI360 response arguments.
Definition: wizfi360.h:217
wizfi360_cfg_t
WIZFI360 Click configuration object.
Definition: wizfi360.h:296
DEMO_EXAMPLE_TCP
#define DEMO_EXAMPLE_TCP
Definition: main.c:55