微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI WIFI设计交流 > CC3200是否可以用于wifi 连接的智能家用电器?

CC3200是否可以用于wifi 连接的智能家用电器?

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

我现在正在做一个方案,这个方案将用于wifi连接的智能家用电器,例如洗衣机、电饭煲、热水器等等。这个wifi可以是wifi direct,也可以是wifi wps,也可以是通过路由器来连接。看了一些TI cc3200的资料,觉得CC3200应该可选的备用方案之一。因为刚开始搞wifi项目,很多东西都不懂,特别是对CC3200。在选定方案之前,我想再请教几个问题:

1、wps是不是属于wifi direct的一种方式?CC3200 lanchpad 开发板上是如何实现WPS的?

2、CC3200是否可以同时支持wifi direct和 路由器连接这2种模式。因为wifi direct毕竟是新的东西,现在很多用户的家用路由器和设备都是比较老旧,而且是不支持 wifi direct的。如果我用CC3200开发我的产品,势必要提供对这些老旧路由器的支持,让我的产品通过wifi 路由器连接到internet,然后用户可能是在公司的电脑上把家里的热水器调好、电饭煲开始煮饭、洗衣机开始洗衣等等的。但问题是,对这些老旧wifi路由器(这些老旧不支持WPS),要如何在我的产品上实现选择wifi路由器,并设定wifi的密码。

3、CC3200 的AP mode是一个什么样的模式?连接路由器的?还是wifi direct的? 这个问题有点小白,请不要见笑!

TOWN,

  WPS不是wifi direct的一种方式,它是早起的一种加密链接方式。在我们的CC3200里面支持WPS功能,我们的SDK 里面有相应的代码支持。

CC3200如果使用wifi direct功能的话,它就 不能再链接其他的路由器了。wifi direct是针对两个wifi设备间的通信。建议你还是采用工作在SAT的模式下面,然后通过第三方的一个路由器,将所有的CC3200联系在一起。针对于一些家用高电器不能配置WIFI路由器参数的问题,我们的CC3200支持smart config技术,可以借助第三方平台的APP控件,来实现链接。

APmode就是access point,可以简单理解为我们的路由器,它允许其他的wifi 设备工作在SAT的模式下,去接入它。

Ken,

谢谢!

我已经留意到smart config这个应用,这个应用应该会比较符合我们的需求。

但还有一个问题,到时候可能需要把smart config这个功能集成到我们自己的App中去。到时候TI是否可以 付费或免费 提供有关源代码或库?

Smart config 是TI的一个专利技术,源码应该不好拿到,但是相关的API函数函数可以供参考的。

好的,谢谢!

如果你只是需要库的话,在ti.com上搜索smart config就可以找到相应的下载链接了。

我想找CC3200的API,但是下载的时候出错啊,一致下载不下来,为什么

CC3200 Network Programmer Guide-swru368a

参考官网链接

http://processors.wiki.ti.com/index.php/CC32xx_Programmers_Guide?keyMatch=swru368&tisearch=Search-CN-Support

The CC3200 host driver was designed to support embedded applications using low-cost and low-power microcontrollers with reduced board space.

The CC3200 is a programmable Wi-Fi MCU that enables true, integrated IoT development. the CC3200 device has the same Wi-Fi Network Processor(NWP) sub-system as the CC3100 device. This NWP integrates all protocols for Wi-Fi and Internet, greatly minimizing MCU software requirements. With built-in security protocols, SimpleLink Wi-Fi provides a robust and simple security experience

This wiki page introduces the NWP programmer guide, and the CC3200 MCU Programmer guide. The combination of these references will equip programmers with the knowledge required to implement their embedded Wi-Fi solution.

请问cc3200 LaunchPad这个板子,是否手机可以直接连接板子的WIFI ,进行TCP(udp) SOCKET通信?我看教材上需要中间接一个无线路由器的东西!

可以,将手机设置为AP热点,CC3200运行Station的模式,连接手机即可通信,参考如下

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