esp8684 2.1.0.0
Main Page

ESP8684 click

‍ESP8664 Click is a compact add-on board that contains a wireless combo module. This board features the ESP8684-MINI-1, a highly integrated WiFi, and a Bluetooth 5 module from Espressif Systems. It simultaneously supports BSS in Station mode, SoftAP mode, Station + SoftAP mode, and promiscuous mode.

click Product page


Click library

  • Author : Stefan Ilic
  • Date : Jun 2023.
  • Type : UART type

Software Support

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

Standard key functions :

Example key functions :

  • esp8684_send_cmd ESP8684 send command with arguments function.
    void esp8684_send_cmd ( esp8684_t *ctx, uint8_t *cmd, uint8_t *args );
    void esp8684_send_cmd(esp8684_t *ctx, uint8_t *cmd, uint8_t *args)
    ESP8684 send command with arguments function.
  • esp8684_send_query_cmd ESP8684 send query command function.
    void esp8684_send_query_cmd ( esp8684_t *ctx, uint8_t *cmd );
    void esp8684_send_query_cmd(esp8684_t *ctx, uint8_t *cmd)
    ESP8684 send query command function.
  • esp8684_connect_to_network ESP8684 connect to network function.
    void esp8684_connect_to_network ( esp8684_t* ctx, uint8_t *ssid, uint8_t *password );
    void esp8684_connect_to_network(esp8684_t *ctx, uint8_t *ssid, uint8_t *password)
    ESP8684 connect to network function.

Example Description

‍This example connects to the desired WiFi network and then connects to the TCP/UDP server, writes then reads data to and from it.

The demo application is composed of two sections :

Application Init

‍Initializes driver and wifi communication, then connects to the desired WiFi network and sends data to the TCP/UDP server.

void application_init ( void )
{
log_cfg_t log_cfg;
esp8684_cfg_t esp8684_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
esp8684_cfg_setup( &esp8684_cfg );
ESP8684_MAP_MIKROBUS( esp8684_cfg, MIKROBUS_1 );
if ( UART_ERROR == esp8684_init( &esp8684, &esp8684_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 500 );
Delay_ms ( 500 );
Delay_ms ( 500 );
// Communication initialization
log_info( &logger, " Application Task " );
}
#define ESP8684_CMD_AT
ESP8684 control commands.
Definition esp8684.h:73
#define ESP8684_RSP_READY
Definition esp8684.h:103
#define ESP8684_CMD_GMR
Definition esp8684.h:75
#define ESP8684_CMD_RST
Definition esp8684.h:74
#define ESP8684_RSP_OK
Definition esp8684.h:100
#define ESP8684_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition esp8684.h:137
void esp8684_error_check(err_t error_flag)
ESP8684 error check function.
Definition main.c:306
void application_init(void)
Definition main.c:132
void esp8684_con_device_to_network(void)
ESP8684 connect device to the network.
Definition main.c:346
log_t logger
Definition main.c:53
void esp8684_clear_app_buf(void)
ESP8684 clearing application buffer.
Definition main.c:218
err_t app_error_flag
Definition main.c:58
err_t esp8684_process(void)
ESP8684 data reading function.
Definition main.c:233
err_t esp8684_rsp_check(uint8_t *response)
ESP8684 response check function.
Definition main.c:274
esp8684_t esp8684
Definition main.c:52

Application Task

‍Writes and reads data from TCP/UDP server, processes all incoming data and displays them on the USB UART.

void application_task ( void )
{
log_printf( &logger, "Sending and reading data from the TCP/UDP server \r\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
void esp8684_send_data(void)
ESP8684 send message to the host.
Definition main.c:374
void application_task(void)
Definition main.c:190

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

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.