NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
CC3100 IP Configuration Application
Contents
Overview[edit]
This sample application demonstrates how to configure a static IP address for CC3100. The device connects to the AP w/ the configured static IP. The IP address will be stored in the non-volatile memory.
Note: This wiki page is only applicable for CC3100-SDK v1.0.0 and upward releases. For documentation on older SDKs' examples, refer corresponding file in <cc3100-sdk-installation-location>\cc3100-sdk\docs\examples\
Source Files briefly explained[edit]
i. main - Initializes the device, configures CC3100 for static IP and connects to AP.
Application details and Usage[edit]
- Connect the board to a Windows-PC and configure the terminal-program for seeing the logs - CC3100 & CC3200 Terminal Setting has detailed instructions for configuring the terminal-program
- Edit values for below macros in main.c for configuring the static IP address:
#define CONFIG_IP SL_IPV4_VAL(192,168,1,45)
- Edit values for below macros in main.c per the APs properties:
#define AP_MASK SL_IPV4_VAL(255,255,255,0) #define AP_GATEWAY SL_IPV4_VAL(192,168,1,1) #define AP_DNS SL_IPV4_VAL(0,0,0,0)
- Edit following parameters in sl_common.h - The device connects to this AP on getting the corresponding command from application:
#define SSID_NAME "<ap_name>" #define SEC_TYPE SL_SEC_TYPE_OPEN #define PASSKEY ""
- Build and run the application
- See the self explanatory logs on the terminal-program's console.
- The device connect to the '<ap_name>' access-point w/ the static IP defined in 'CONFIG_IP'.
- The connection could be checked by pinging CC3100 on the static IP address
Note: : User needs to reconfigure the device in 'DHCP Mode' for executing other sample applications. Refer function configureSimpleLinkToDefaultState in this example's main.c for configuring the device in 'DHCP Mode'. Also, defining USE_DHCP in this sample application configures the device in DHCP mode
Limitations/Known Issues[edit]
None
Links[edit]
{{#invoke: Navbox | navbox }} {{#invoke: Navbox | navbox }}