• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » SimpleLink™ Wi-Fi® » CC3000 Basic Wi-Fi example application for MSP430
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

CC3000 Basic Wi-Fi example application for MSP430

This question is answered
Bhavin K
Posted by Bhavin K
on Aug 13 2012 09:25 AM
Prodigy80 points

Hi,

I am running the "CC3000 Basic Wi-Fi example application for MSP430". I can load and run the example project. I can do following without any errors: - First time config - Assign static IP and perform Ping (I can see the ping return packets also in wireshark and on command line via ping) with below command

/*** Set IP address of 192.168.1.105 and default gateway of 192.168.1.1 ***/

08c0a80169c0a80101

I want to test send Data and Receive Data now. But having some problems with it.

SEND DATA

==========

I am following below commands:

1. For opening UDP socket 03

I am receiving DONE response on the hyperterminal.

2. For sending data of 12345 to 192.168.1.105 (CC3000 IP address) on socket 4444 (0x115c)

04051234502115CC0A80169

I tried below command as well assuming that send command is for sending out from CC3000 which has IP address of my PC 192.168.1.100 which is connected with TP-LINK switch. I don't see anything on the wireshark coming out from CC3000  with srouce IP 192.168.1.105 to destination IP 192.168.1.100

04051234502115CC0A80164

Question#1: Is this send command for sending data out from CC3000 OR sending data to CC3000?

Question#2: Above commands are printing DONE on Hyperlink but how can I make sure that data is really sent?

Question#3: Are there any prints which I can enable in the example project which can print out CCS debug information on CCS console?

RECEIVE DATA

============

I am following below commands:

1. For opening UDP socket 03

Question#4: Do I have to open the socket if I already opened it for SEND DATA?

2. Binding socket to a port 51000 06C738

Question#5: What is the significance of port#51000? Can I select any port number here OR it has to match with something?

3. Receive data command 05

Question#6: Is this receive data to CC3000 (and so to MSP430) OR it is receive data to PC or some other network device (and so MSP430 and CC3000 has to send something out)?

Question#7: How can I test receive data here?

Regards,

BK

basic wifi
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Bhavin K
    Posted by Bhavin K
    on Aug 15 2012 08:26 AM
    Prodigy80 points

    Hi,

    I did some more debugging on the SEND DATA and what I observed is my previous command "03" which is a socket is not populating ulSocket variable with correct value. Value of ulSocket (and so value of "sd") is 0 when the application is doing sendto.

    Any reason why above could be happening? I will do some more debugging on identifying whey socket() api is returning 0 but any quick pointer here would be helpful.

    Regards,

    Bhavin

    basic wifi CC3000 HostDriver
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Pedro5084
    Posted by Pedro5084
    on Aug 16 2012 17:19 PM
    Intellectual2390 points

    Hi Bhavin, 

    The ulSocket value starts from 0 and it increments every time you open another socket, it will decrease when you close the socket (07), or it times out. Are you able to use a sniffer and see if there are any UDP packets sent by the cc3000. 

    Pedro 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Pedro5084
    Posted by Pedro5084
    on Aug 16 2012 17:25 PM
    Intellectual2390 points

    The send command (04) will transmit from the CC3000, the receive command will get data from the remote device to the CC3000.  To check if data is sent or received, you need a UDP server app. I have a java GUI app that I build to send/receive UDP packets.  Also you can use iperf (http://sourceforge.net/projects/iperf/files/jperf/jperf%202.0.0/jperf-2.0.0.zip/download)  which you can set as UDP server or client. 


    Pedro 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • chethu gowda
    Posted by chethu gowda
    on Aug 17 2012 06:14 AM
    Genius3745 points

    Hi Bhavin,

    Bhavin K
    I tried below command as well assuming that send command is for sending out from CC3000 which has IP address of my PC 192.168.1.100 which is connected with TP-LINK switch. I don't see anything on the wireshark coming out from CC3000  with srouce IP 192.168.1.105 to destination IP 192.168.1.100

    thats right the send command(04) takes the receiving end's ip address and receiving end's port which is PC in your case,

    try following these steps and let us know  the result,

    1. As you are using static ip on your cc3000 with default gateway 192.168.1.1 which is the IP of your AP.

    Set your PC's default gateway also as 192.168.1.1.

    2. Note down the udp port on your PC by executing the following in the command prompt,

    netstat -an -p udp

    output will be something like below which will list out the udp ports on your computer

     Proto  Local Address          Foreign Address        State

     UDP    192.168.1.100:137      *:*

    3. Now open the socket through hyperterminal with command 03

    4. without any delay (the socket gets timed out) give the send command as below,

    040512345020089c0a80164  (make sure the command is in lower case)

    Now you should be able to see the udp packets on wireshark (make sure the udp/ethernet/ipv4 protocols are selected in the wireshark analysis)

    Thanks & Regards,

    cbn

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • BhavinKharadi
    Posted by BhavinKharadi
    on Aug 17 2012 08:37 AM
    Intellectual1185 points

    Hi,

    I followed the steps mentioned above but still I can not send the packet out from CC3000. Below is the screenshot showing the call stack execution on send command and wlan_tx_buffer before it performs SpiWrite to CC3000. Is there anything missing in the wlan_tx_buffer as this is the buffer which seems to be used to send data/command info to CC3000 to do all operations.

     

    My CC3000 ip address is 192.168.1.105.

    My PC ip address: 192.168.1.106

    Here is the output of the command which you sent, which shows socket 137 for my PC IP address.

    C:\Users\a0133017>netstat -an -p udp

    Active Connections

      Proto  Local Address          Foreign Address        State

      UDP    0.0.0.0:123            *:*

      UDP    0.0.0.0:500            *:*

      UDP    0.0.0.0:3702           *:*

      UDP    0.0.0.0:3702           *:*

      UDP    0.0.0.0:4500           *:*

      UDP    0.0.0.0:55020          *:*

      UDP    0.0.0.0:55425          *:*

      UDP    0.0.0.0:59167          *:*

      UDP    0.0.0.0:64589          *:*

      UDP    0.0.0.0:65344          *:*

      UDP    0.0.0.0:65345          *:*

      UDP    127.0.0.1:50368        *:*

      UDP    127.0.0.1:50371        *:*

      UDP    127.0.0.1:50946        *:*

      UDP    127.0.0.1:52281        *:*

      UDP    127.0.0.1:53016        *:*

      UDP    127.0.0.1:53779        *:*

      UDP    127.0.0.1:53784        *:*

      UDP    127.0.0.1:54681        *:*

      UDP    127.0.0.1:54682        *:*

      UDP    127.0.0.1:55019        *:*

      UDP    127.0.0.1:55638        *:*

      UDP    127.0.0.1:57413        *:*

      UDP    127.0.0.1:59209        *:*

      UDP    127.0.0.1:62305        *:*

      UDP    127.0.0.1:62514        *:*

      UDP    127.0.0.1:63343        *:*

      UDP    192.168.1.106:137      *:*

      UDP    192.168.1.106:138      *:*

    I can still ping CC3000 at 192.168.1.105 fine. This time I did not use command for static IP configuration. It looks like it is automatically (may be via DHCP) getting 192.168.1.105 IP address everytime.

    Do I have to do “first time config” everytime? Currently I am doing it everytime I connect power to the board (i.e. connect board to USB port of my PC).

    Regards,

    Bhavin

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • chethu gowda
    Posted by chethu gowda
    on Aug 17 2012 10:09 AM
    Genius3745 points

    BhavinKharadi

      UDP    192.168.1.106:137      *:*

      UDP    192.168.1.106:138      *:*

    Your UDP ports are 137/138 also your PC's Ip address is 192.168.1.106

    1. have you changed the send command according to this ip address?

    2. what are the default gateways of PC and CC3000? are the same?

    BhavinKharadi
    Do I have to do “first time config” everytime? Currently I am doing it everytime I connect power to the board (i.e. connect board to USB port of my PC

    I too do the same whenever I boot the board, just check it if doing the first time configuration once is enough..

    Thanks & Regards,

    cbn

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bhavin K
    Posted by Bhavin K
    on Aug 20 2012 08:35 AM
    Prodigy80 points

    Hi cbn,

    Yes, my send command is modified to send it to PC IP address.

    Default gateway of my PC is 192.168.1.1 from ipconfig command on my PC. I don't know how to check default gateway for CC3000. I can ping CC3000 @192.168.1.105 successfully and I can see those packets in wireshark as well.

    As per my previous log, i sent the memory capture for the wlan_tx_buffer before it is sent via SPI to CC3000. I think that is the command which goes to CC3000 finally to do any actions. Is that correct? If answer is yes, then do you see any thing wrong in that command?

    Regards,

    BK

    basic wifi CC3000HostDriver
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Pedro5084
    Posted by Pedro5084
    on Aug 20 2012 10:25 AM
    Intellectual2390 points

    Hi BK, 

    Have you checked if you are able to receive UDP packets on your PC? If you try from another device, such as an iPhone with  a UDP client/server app, can you receive UDP packets on your PC? Sometimes firewalls block UDP connections. I use windows 7 and I have to disable the firewall temporary to receive UDP packets. 

    Pedro 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • chethu gowda
    Posted by chethu gowda
    on Aug 20 2012 10:58 AM
    Verified Answer
    Verified by Bhavin K
    Genius3745 points

    Hi BK,

    According to you CC3000 is responding with DONE for send command and also you are able to see the ICMP packets on the wireshark.

    It means that the data is actually being sent from CC3000 to the PC.

    Please confirm your wireshark settings that UDP,IPV4 and Ethernet protocols are enabled under "analysis->enabled protocols" tab.

    Also as pedro said check your firewall settings.

    Thanks & Regards,

    cbn

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bhavin K
    Posted by Bhavin K
    on Aug 21 2012 09:08 AM
    Prodigy80 points

    Hi cbn,

    I could now send and receive data from CC3000. It was windows firewall settings on Windows 7 which was causing this issue.

    Thanks for the prompt responses.

    Regards,

    BK

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Hsiung Chia-Wei
    Posted by Hsiung Chia-Wei
    on Nov 21 2012 01:14 AM
    Prodigy210 points

    Hello

     I use EXP430F5438A to link CC3000.

    Hyper Terminal shows:

    My Example App: driver version is 1.6.1.2       (is it correctly)

    1: command 01.  Then return Simple config DONE.
    2: command 02.  Then return  DONE. (Should I choose which SSID I join? But I can not type SSID on theTerminal)
    3. command 03.  Then return DONE.(OPEN UDP socket)

    4. command 04.  Then return DONE.Then I type 0512345020089C0A80065

    (For sending data of 12345 to 192.168.0.101  on socket 137 (0x0089))
    Then it shut down

    5.Should command 08 be set? But i can not type IP address on theTerminal.

    I can ping to cc3000 from pc

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use