Writing C-code

<< Click to Display Table of Contents >>

Navigation:  STM32F4 Target > Demos > Waijung Demos > Basic Custom Code demo for UART-WiFi module >

Writing C-code

Previous pageReturn to chapter overviewNext page

See rak410.c and rak410.h, located in directory "waijung\targets\stm32f4_target\stm32f4\demo\uart_wifi_demo\customcode_rak410" for complete code.

1. WiFi Reset (Control Reset pin PB0)

uart_wifi_ccode_1

2. Scan the WiFi network

This code may be removed, it needed when request security type and other WiFi information.

uart_wifi_ccode_2

3. Set WiFi network key

This is optional, send pass key (if required). Note: We have no test on this function.

uart_wifi_ccode_3

4. Connect to network (AP)

uart_wifi_ccode_4

5. Set module power mode

uart_wifi_ccode_5

6. IP address setup

The DHCP input option allowed user to configure module to obtain IP address from network or use static IP.

uart_wifi_ccode_6

7. Open UDP connection port to Send data

uart_wifi_ccode_7

8. Send the Data to UDP

uart_wifi_ccode_8