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.

Help with Bidirectional Communication Between 2 CC3200's

Other Parts Discussed in Thread: CC3200, UNIFLASH

Hello,

My senior design group has received our CC3200 boards and we have managed to run the simple WLAN station in the Getting Started Guide. So we have successfully connected to our campus WiFi and pinged a website to confirm they can connect to the internet.

The next step is sending simple data between the boards (we will probably start with turning on/off some onboard LEDs with the pushbuttons)

On a previous post, the Bidirectional WiFi audio application was pointed out as a good place to start. We have some concerns though (we are complete novices with wireless communication)

-We are going to need high speed switching. We plan on one LP taking in voltage/current measurements, sending them to the other LP where it passes the data to another MCU. After this MCU is done processing, it will pass a command back to its LP where it will send the command back to the first LP and it will use this to produce a PWM signal to control a buck converter. If you know anything about buck converters, the switching speed can be on the order of 100-200kHz, so will need to perform all of these actions many times per millisecond.

-Is the WiFi audio app a good place to start for this?

-We are unsure of the steps to getting the project compiled and modified to suit our needs. Its difficult to figure out which files we need to modify and which we need to leave alone.

-Is the process of getting the project set up the same as the user guide project?

-Should we take this route or look into the TCP socket example? I've also seen this referenced when setting up communication between 2 CC3200 LPs.

We are just a little lost at this point. We are probably making this more difficult than it should be because what we are wanting to do is fairly simple. We are just a little overwhelmed I guess. Any guidance would be appreciated. 

Thanks,

John

  • Hi,

    I think serial_wifi example can be better startpoint.

    Jan
  • Would the serial_wifi example be a good starting point if we want to add a third CC3200 in our project? We eventually would like to have two CC3200s communicating with a third central CC3200, configured in a star topology network.

    Dalen
  • Hi Dalen,

    It depends how do you want do communication between your devices. E.g.:
    - serial_wifi example is good example of client-server approach (one module is TCP server, and 2nd is TCP client)
    - also you can use peer-to-peer approach using UDP broadcast (one module send UDP packet all modules on network it receives)
    - etc.

    You are the programmer of you application. Select best approach is on you.

    Jan
  • Okay, thank you.

    I'm going to try the serial_wifi example for now, but I've run into some issues.

    I've gotten to the point where I can debug and run the project and it automatically connects to the network and enters interpreter mode.
    I'm now trying to generate the certificates and key with openssl and flash them to the board and am a little confused. I've gotten openssl installed and am running the commands in the order presented in the "Generating certificates using OpenSSL" section and so far I've got this:

    -I've generated "server.key", "ca.pem", and "server.pem" and converted them to DER format (I think, anyway).
    -I flashed them to the device using uniflash.
    -I reran the project and its still connecting and entering interpreter mode.

    So is the next step to flash the same certificates and key to the other board? Or since the other board is on a different WiFi network, does it need to generate and flash its own certificates and key?

    After that, if the project is run on both boards, with they automatically connect? I used the mDNS command on one board to set it up as the server, does the other board need to run mDNS to become a client before they can connect?

    I'm little confused as to how to proceed.
  • Hi,

    Sorry, I don't understand what you want to say about SSL. Certificates are important for you, only when you want to use secure connection between devices. Nothing prevent to you use unsecured connection.

    One board is configured as mDNS server and 2nd board uses sl_NetAppDnsGetHostByService() API to discovery. Alternatively you can create your own discovery protocol using UDP broadcast.

    Jan
  • So the flashing of the certificates/key is completely optional?

    Also, when converting the certificates/key to DER format, do the file extensions have to be ".der", ".pem", or ".crt" for the certificates?
  • Another thing,

    We went ahead and flashed both devices with the certificates/key and tried to get them to connect.

    following the instruction at the bottom of this forum post:
    e2e.ti.com/.../418080
    The devices both power on and enter "interpreter mode" but then nothing happens.

    On one device, we used "mDNS 0" and the other we used "mDNS 1" while in local control mode. According to that forum post, after a few seconds, the terminals should both display "TCP Connection Established", but this never happens. The terminals just sit there. We tried restarting the devices and just letting them sit in interpreter mode and still, they don't connect.

    What could be going wrong?
  • Hi,

    secure connection)
    Certificates are mandatory only if you want to use secure connection. Please check macro SECURE_SOCKETS in this example. I think example code is quite explainable and obvious. Steps how to generate certificate you find here processors.wiki.ti.com/.../CC31xx_&_CC32xx_Generate_Certificate

    issue with example)
    Sorry, but this you need solve this by yourself. All necessary tools you have - JTAG, etc. If I can give you an advice, then try unsecured connection, it will eliminate potential problems with wrongly generated certificates.

    Jan