NINA-W152 Click Example.
Description
Application example shows device capability of connecting to a WiFi network and sending TCP/UDP messages to an echo server, or processing data from a connected BT device.
The demo application is composed of two sections :
Application Init
Initializes the driver and logger.
Application Task
Application task is split in few stages:
- NINAW152_POWER_UP: Powers up the device, performs a factory reset and reads system information.
- NINAW152_CONFIGURE_CONNECTION: Configures connection to WiFi or BT depending on the selected example.
- NINAW152_WAIT_FOR_CONNECTION: Checks the connection to WiFi access point.
- NINAW152_EXAMPLE: Depending on the selected demo example, it sends a TCP/UDP message to an echo server over a WiFi network or processes all data from a connected BT device and sends back an adequate response message.
By default, the WiFi TCP/UDP example is selected.
Additional Function
- static void ninaw152_clear_app_buf ( void )
- static void ninaw152_log_app_buf ( void )
- static err_t ninaw152_process ( ninaw152_t *ctx )
- static err_t ninaw152_read_response ( ninaw152_t *ctx, uint8_t *rsp )
- static err_t ninaw152_power_up ( ninaw152_t *ctx )
- static err_t ninaw152_config_connection ( ninaw152_t *ctx )
- static err_t ninaw152_check_connection ( ninaw152_t *ctx )
- static err_t ninaw152_example ( ninaw152_t *ctx )
- Note
- For the BT example, we have used the Serial Bluetooth Terminal smartphone application for the test. A smartphone and the Click board must be paired to exchange messages.
- Author
- Stefan Filipovic