Wireless SUN Click Example.
Description
This example demonstrates the use of Wireless SUN click board by showing the communication between the two click boards configured as BORDER and ROUTER.
The demo application is composed of two sections :
Application Init
Initializes the driver and configures the click board by performing a hardware reset and a clear parameters feature, and setting the device network name, device role to BORDER or ROUTER depending on the application mode. In the end, it saves settings and reboots device.
Application Task
Depending on the selected application mode, it reads all the received data and parses the received TCP/UDP messages (BORDER mode) or waits for the connection, reads the parent global address, and then starts sending a desired TCP/UDP messages to the parent every 3 seconds (ROUTER mode).
Additional Function
- static void wirelesssun_clear_app_buf ( void )
- static err_t wirelesssun_process ( void )
- static err_t wirelesssun_rsp_check ( void )
- static void wirelesssun_wait_for_connection ( void )
- static void wirelesssun_get_parent_gbl_address ( uint8_t *gbl_addr )
- Note
- By default, the BORDER application mode is selected. comment out the DEMO_APP_BORDER macro definition in order to switch the application mode to ROUTER.
- Author
- Stefan Filipovic