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.

CC3200 Getting Started with WLAN AP

From Texas Instruments Wiki
Jump to: navigation, search
Cc31xx cc32xx return home.png
Cc32xx return sample apps.png

Overview[edit]

The SimpleLink CC3200 device can act as an AP (access point). Any Wifi Enabled Client in its range can connect to the device and then communicate as per standard networking protocols.

wlan_ap.jpg


Application details[edit]

This application aims to exhibit the CC3200 device as AP. Developers/users can refer the function or re-use them while writing new application.
The device comes up as an AP (access point), and then wait for a station to connect to it. If the connection is successful, it will ping to that station. Zero is the expected return value. A different return code would mean that the ping to the station is unsuccessful.

This example can be used either on TI-RTOS or FreeRTOS.

For the application to work with TI-RTOS, ti_rtos project and ti_rtos_config project need to be imported into the application workspace. These projects can be found in CC3200-SDK under ti_rtos folder. Please follow this link for CC3200 TI-RTOS usage CC3200 TI-RTOS

Source Files briefly explained[edit]

  • main.c – main file creates the simplelink task which does most of the network related operations, a WlanAPMode task makes calls to the network related APIs of simplelink library.
  • startup_ewarm.c – IAR workbench specific vector table implementation for interrupts.


Code flow[edit]

<syntaxhighlight lang='c'> void WlanAPMode( void *pvParameters ) { ... lRetVal = sl_Start(NULL,NULL,NULL); ... // Configure the networking mode and ssid name(for AP mode) if(lRetVal != ROLE_AP) {

  if(ConfigureMode(lRetVal) != ROLE_AP)
  {
     UART_PRINT("Unable to set AP mode, exiting Application...\n\r");
     sl_Stop(SL_STOP_TIMEOUT);
     LOOP_FOREVER();
  }

} while(!IS_IP_ACQUIRED(g_ulStatus)) {

  //looping till ip is acquired

} ... lRetVal = sl_NetCfgGet(SL_IPV4_STA_P2P_CL_GET_INFO,&ucDHCP,&len,(unsigned char *)&ipV4); ... while(!IS_IP_LEASED(g_ulStatus)) {

 //wating for the client to connect

}

ulIpAddr = g_ulStaIp; iTestResult = PingTest(ulIpAddr); ... } </syntaxhighlight>

Using the CC3200 as an AP is a simple two step process.

  1. Start the SimpleLink by calling sl_Start() API.
  2. Wait until the device gets an ip address.

After the device has come up in AP mode, we will follow two more steps to make sure the device can act as an AP.

  1. wait for a station to connect to the device (you have to connect a machine to the device).
  2. ping to the machine (station).

Refer to the main.c file of the reference application for more details.

Note 1: In case, if the device is not able to ping to the connected machine, try disabling the antivirus on your machine.

Usage[edit]

  • Run this application (getting_started_with_wlan_ap) application from IAR/CCS or Flash to the device.
  • Application with switch to AP mode if it's not in AP mode.
  • After client connected to device, device(AP) will ping to client and print the result over UART.
  • All result can be viewed on Terminal screen.
  • Observe the execution flow to understand the working.
Getting Started AP Terminal

Limitations/Known Issues[edit]

None.

Links[edit]

{{#invoke: Navbox | navbox }} {{#invoke: Navbox | navbox }}

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article CC3200 Getting Started with WLAN AP here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article CC3200 Getting Started with WLAN AP here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article CC3200 Getting Started with WLAN AP here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article CC3200 Getting Started with WLAN AP here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article CC3200 Getting Started with WLAN AP here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article CC3200 Getting Started with WLAN AP here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article CC3200 Getting Started with WLAN AP here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article CC3200 Getting Started with WLAN AP here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article CC3200 Getting Started with WLAN AP here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity