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
============
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
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.
Bhavin
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
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.
Bhavin KI 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
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
UDP 0.0.0.0:123 *:*
UDP 0.0.0.0:500 *:*
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).
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?
BhavinKharadiDo 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..
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?
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.
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.
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.
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