wifi9 2.0.0.0
main.c File Reference

WiFi 9 Click example. More...

#include "board.h"
#include "log.h"
#include "wifi9.h"
#include "string.h"

Macros

#define EXAMPLE_SSID   "MikroE Public"
 
#define EXAMPLE_PASSWORD   "mikroe.guest"
 
#define EXAMPLE_SERVER_PORT   "1234"
 
#define APP_BUFFER_SIZE   256
 
#define PROCESS_BUFFER_SIZE   256
 

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

WiFi 9 Click example.

Description

This application showcases capability of the WiFi 9 Click board. It initializes device, connects to local WiFi. Creates TCP server, waits for connection, and logs every message it receives from clients and returns back those messages as an echo response.

The demo application is composed of two sections :

Application Init

Initializes driver and wifi communication, then connects to the desired WiFi network and creates TCP server on the IP address assigned to the click board.

Application Task

All data received from the TCP clients will be logger to USB UART and echoed back to the clients.

Additional Function

  • static void wifi9_clear_app_buf ( void )
  • static err_t wifi9_process ( void )
  • static void wifi9_log_app_buf ( void )
  • static err_t wifi9_rsp_check ( uint8_t *rsp )
Author
MikroE Team

Macro Definition Documentation

◆ APP_BUFFER_SIZE

#define APP_BUFFER_SIZE   256

◆ EXAMPLE_PASSWORD

#define EXAMPLE_PASSWORD   "mikroe.guest"

◆ EXAMPLE_SERVER_PORT

#define EXAMPLE_SERVER_PORT   "1234"

◆ EXAMPLE_SSID

#define EXAMPLE_SSID   "MikroE Public"

◆ PROCESS_BUFFER_SIZE

#define PROCESS_BUFFER_SIZE   256

Function Documentation

◆ application_init()

void application_init ( void )

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )