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.

Server client cc3200

Other Parts Discussed in Thread: CC3200

Hi guys,

I am working with client and server subject.I want to communicate to the cc3200 with my pc.I looked through the (UDP,TCP) examples but i didn't understand the function can I communicate with only one code running on the cc3200. As far as i know is that i should run two codes(one on my pc and the other in the cc3200)  in order to establish the communication is that true?

cheers

  • This depends on what you mean by communicate....if you are accessing services on your PC that are already developed and are exposed in someway, then you do not need to write anything. But if you are wanting to do something specific on the PC, then yes you will need to write an application that enables this communication, like a TCP or UDP Server application, or a HTTP service like a REST API.

    I have an example that has a iOS app communicate with a CC3200 device using UDP, it basically turns LEDs on and off. You need the startproject_cc3200_tirtos and the startproject_ios repositories - https://github.com/remixed123

    I do not have a Windows Application example created yet, but will develop one soon enough, as this is very simple to do with Visual Studio .Net

    Glenn.
  • Dear Glenn,

    thanks for your response.Actually my project is to control the colour by changing the illumination of the three leds (green,red,blue) by PWM signals by Wifi, in which I should send a command from my computer to control the colour.I have built the code for PWM and now I am working with UDP, so I need my computer to work as a client and CC3200 as a server because I want to send one or more integer values to control the duty cycle for PWM. As I saw from your example that it is somehow related to my project but I am working on windows not iOS, as I far understand that I can use (UDP test tool) on my computer to send the packets for the cc3200 is that true?!

    note:- I am an Automation Engineer and not IT expert so maybe my questions will be little inconvenient   

  • Hi Haitham,

    Yes, you can use a UDP Test tool to perform exactly what you want. I have used them often to test communicating to a CC3200 with UDP. You will not from my startproject_cc3200_tirtos project I have explained how you can do this and have code to show you how.

    Since you are controlling RGB LEDs, you might be interested in a product I have developed, it does not use PWM as it is all digital with LED drivers,, you can see the videos here - vimeo.com/.../3015956

    Glenn.
  • Dear Glenn,

    I tried to download UDP Test Tool www.simplecomtools.com/reg_freeware.asp
    but there is a problem,always i got this message "This sign-up form is not available. Please contact this site's Webmaster for assistance." Anyway I am working in the other side in which to build client code on my computer and run it by (cmd,command prompt) and of course the second server code to be run in the cc3200. Is that a good option or the UDP test ?!
  • It looks like there are issues with downloading that one. There are many more available on the Internet, you can also find some on Google Play for Android and Apple App Store for iOS. Just search on UDP test or client.

    And of course you can develop one, which is pretty easy in Visual Studio .Net, you can create a command line or a Windows Form program.

    Glenn.
  • Dear Glenn,

    I downloaded successfully the UDP test tool and I  tried to use it with  the UDP example in the cc3200 examples but i am not getting any results.I tried to send numbers or letters but i am not receiving something at the cc3200 .Can you help me with this problem  

  • Hi Haitham,

    This is likely due to a mismatch in the type of character you send, I believe you need to set your UDP tool to send HEX and not Character. This is usually an option you select in your tool

    If this does not help, then debug the code, look at the receive buffer and make sure it matches what the code is expecting.

    Glenn,
  • Haitham, Let me know if you need additional information.

    -/Praneet
  • Dear Praneet,

    Ya I need alot of information.Actually I am using (UDP test tool) with UDP example of the cc3200 in which I am sending values from my pc to the cc3200 but I am not able to see what I am sending, surely that there is something wrong,I tried to print the value of the buffer after receiving I only get 0123456789 which corresponds to beginning of the server function in the code 

    for (iCounter=0 ; iCounter<BUF_SIZE ; iCounter++)
     {
        g_cBsdBuf[iCounter] = (char)(iCounter % 10);
     }

    also I don't understand why we fill the buffer with this code??

  • Hi Haitham,

    What data are you sending from the UDP test tool? Which function of cc3200 example contains the above code snippet?
    Instead of printing the values, I would suggest to add a breakpoint after receiving the packet and check the receive buffer's data.

    Regards,
    Raghavendra
  • Hi raghavendra,

    I am sending hex values from the UDP test tool to the cc3200.The code snippet is from the UDP example of the cc3200 documents specifically from the client& server functions that I still i don't know for what!.I tried to put a break point to see the value of the buffer but i am not receiving anything from the udp test tool.  

  • I was under the assumption you are using my startproject_cc3200_tirtos application

    If so, the README.md that comes with it is very clear - github.com/.../README.md

    The following HEX data sent on UDP port 4000 will control the specific LED.
    Send FF00 to turn Red light off
    Send FF11 to turn Red light on
    Send EE00 to turn Orange light off
    Send EE11 to turn Orange light on

    You need to use a break point and then view the buffer, to make sure the correct data is being sent. And when doing so, you need to make sure you set the variable to HEX and not CHAR for viewing.

    FF00 is 2 bytes, as in 0xFF and 0x00......it is not 4 bytes, as in characters FF00

    Glenn
  • Haitham, I'm closing this thead. For any additional questions that you might have, request you to start a new thread w/ references to the current one for us to track it better.

    -/Praneet