微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI WIFI设计交流 > 如何让别的电脑无线控制CC3200实现通信 小白一枚 能说说思路吗 谢谢了

如何让别的电脑无线控制CC3200实现通信 小白一枚 能说说思路吗 谢谢了

时间:10-02 整理:3721RD 点击:

如何让别的电脑无线控制CC3200实现通信

如果配置正确的话,笔记本和手机是可以收到cc3200的wifi的,cc3200当做一个路由器。

可以看看这个文档

https://wenku.baidu.com/view/b794f12c240c844768eaeef4.html

您可以参考下附件内的文档

4073.CC3200 LaunchPad使用入门03_OOB例程.pdf

1  CC3200作为Station模式,电脑虚拟一个wifi热点/AP,将CC3200连接到这个虚拟wifi热点/AP进行数据传输

2、CC3200作为Station模式,电脑也作为Station模式,同时去连接一个路由器/AP,通过路由器/AP进行转发数据到你的电脑

3、如果仅仅作为CC3200和电脑进行局域网通信并不需要连接到因特网,仅在局域网就可以正常工作。

非常感谢

非常感谢

CC3200 Getting Started with WLAN Station

(Redirected from CC32xx Getting Started with WLAN Station)

Cc31xx cc32xx return home.png

Cc32xx return sample apps.png

Contents

 [hide] 

  • 1 Overview
  • 2 Application details
    • 2.1 Source Files briefly explained
    • 2.2 Code flow
  • 3 Usag
  • 4 Limitations/Known Issues
  • 5 Links

Overview

A CC3200 device has the capability to behave as a station in a typical networking system (Infrastructure setup). It can connect to access point (with or without security) and can use the internet services via the same access point, if available.

gs_with_wlan_station.jpg

Application details

This application aims to exhibit the CC3200 device as a station in a simple network. Developers/users can refer the function or re-use them while writing new application. The application will be used without the UART terminal. The device connects to an AP (access point), with AP configurations stored in the form of macros in the application. If the connection is successful, it will try to get the IP address of “www.ti.com” and then ping to the ip address. Zero is the expected return value. A different return code would mean that the internet connection is not available or that the ping to the link is not successful.

Macros for Security

#define SSID_NAME "cc3200demo"
#define SECURITY_TYPE SL_SEC_TYPE_OPEN
#define SECURITY_KEY ""
#define WEP_KEY_ID 1

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.

Source Files briefly explained

  • main.c – main file creates the simplelink task which does most of the network related operations, a WlanStationMode task makes calls to the network related APIs of simplelink library.
  • startup_ewarm.c – IAR workbench specific vector table implementation for interrupts.
  • startup_ccs.c – IAR workbench specific vector table implementation for interrupts.
  • gpio_if.c - GPIO interface file for LED APIs
  • pinmux.c - File to mux device pin to different peripheral signal.

Code flow

void WlanStationMode( void *pvParameters )
{
    ...
    //Start the SimpleLink
    lMode = sl_Start(0, 0, 0);
    ...
    // Connecting to WLAN AP
    // After this call we will be connected and have IP address */
    WlanConnect();
    ...
    // Checking the Lan connection by pinging to AP gateway
    lRetVal = CheckLanConnection();
    ...
    // Turn on GREEN LED when device gets PING response from AP
    GPIO_IF_LedOn(MCU_EXECUTE_SUCCESS_IND);
    ...
    // Checking the internet connection by pinging to external host
    lRetVal = CheckInternetConnection();
    ...
    // Turn on ORANGE LED when device gets PING response from AP
    GPIO_IF_LedOn(MCU_ORANGE_LED_GPIO);
    ...
}

Using the CC3200 as an STA is a simple three step process.

  1. Start the SimpleLink by calling sl_Start() API
  2. Connect to the Access point by calling sl_WlanConnect() API
  3. Use the sl_NetCfgGet() API or check for SL_NETAPP_IPV4_IPACQUIRED_EVENT NetApp Event to get the IP address of the device.

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

Usag

  • Run this application (getting_started_with_wlan_sta) application from IAR/CCS or Flash the bin file to device.
  • Device will switch to STA mode if it's in other mode.
  • It'll try to connect open predefined AP (cc3200demo) and at successful connection Red LED will glow up.
  • After AP connection device will ping to AP, at successful ping to AP, Green LED will switch on.
  • Device will further check for internet connection (ping to 'www.ti.com') and at successful ping to external host Orange LED will switch on.
  • Observe the LEDs state and code flow to confirm the proper execution.

Getting Started STA Terminal

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top