This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Basic wifi application send receive data problems



HI,

My device cc3000 is connected to AP, It shows Simple config done. 

Now if i press 03 for socket open hyper terminal doesn't respond. And how will i know which port my AP is connected.

Nothing is mentioned in code like which port cc3000 should connect and all.

Please let me know if any body have sent and received data through AP.

  • Hi,

    There is a parallel thread you openned so I would reply on this one as well.

    Can you elaborate what you mean by "hyper terminal doesn't respond"?

    Basically, you should see 'Done' on the hyper terminal. If you don't get it, it might be that the WiFi connection is not established properly.

    You need to be connected to the AP and gets a valid IP address before openning a socket.

    After the socket is opened successfuly, you can send data via '04' command.

    If you want to recieve data you need to bind first to a local UDP port using '06' command.

    Please note: you may be stuck when openning a socket if you don't have an IP address assigned. E.g. if the AP you are using does not have a DHCP server, the open socket command would be stuck. In this case, you need to assign the IP address statically using '08' command.

    BR,

    Shlomi

  • Hi, 

    I get simple config done respond on hyper terminal.

    My AP is DHCP enabled and IP is 192.168.1.101 and i am taking port as 1204.

    But when i press 03 for socket open hyper terminal doesn't show DONE response. 

    Do i need to connect static IP by 08 command?

    Please let me know how to open socket. 

  • Hi,

    you must make sure that you have an IP address.

    I tested it locally and verified I get the 'Done' after pressing '03'.

    Do you have the ability to use breakpoints in debug mode?

    Shlomi

  • Good to know that you got DONE response. Even though my cc3000 is connected to AP my socket is not opening. Hyper terminal is not showing done response when i press 03

    And how can i make sure i have IP address as my device is connected to AP and i get DONE response, then again which IP address i need? 

  • Hi,

    There are several ways to know the IP address:

    1. if you have the ability to debug, you can call netapp_ipconfig() API and get the IP address.
    2. You can connect to the administrator menus on the AP and check for the connected devices. I believe you can find there whether the IP address is assigned.
    3. air sniffer: you have the ability to spoof the air and look for the DHCP packets.

    If you cannot do neither and you have debug capabilities, you can place a breakpoint inside "case UART_COMMAND_SOCKET_OPEN:" and see where you fail.

    Shlomi

  • My DHCP is enabled and i have IP address. I can connect a smartphone to this AP which i am using and it shows an IP address, Then how come cc3000 is not able to detect IP. 

    Is there any other problem?

  • Hi,

    Can you confirm your CC3000 did not receive IP address? 

    If not, this is the issue and not opening the socket - can you try configuring the CC3000 to use a dynamic DHCP? you can do that by applying 08 with value 0 to the IP address and default gateway.

    Yael

     

  • Do you mean i should apply 0800000000ffffff00,

    Where IP is 0.0.0.0 and default gateway is 255.255.255.0

  • Yes.

    This will make the cc3000 ask for DHCP and not use a static IP.