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.

CC3220: CC3220 and AWS plugin for video stream to AWS cloud

Part Number: CC3220

Hello Everyone,

We are planning to work on CC3220 simplelink Microcontroller for one of our IOT application.

Below are the related query regarding our application

1.Using CC3220 and AWS plugin can we stream RTSP/RTP video stream to AWS cloud?

2.Or if there are any other method for cloud streaming (any steps,demos or Guides are available?)

Regards,

Sanath Rai

  • Hi Sanath Rai,

    The AWS plugin doesn't support video streaming. It is up to you to add this.
    We do have an example in our Video Doorbell reference design : www.ti.com/.../TIDC-CC3200-VIDEO
    You will need to merge both.

    Br,
    Kobi
  • Hi Kobi,

    Thanks for the response.

    We were planning to stream the video/audio  directly to the cloud media server which is hosted in any cloud provider(Google,AWS) using RTSP/RTP protocol.

    Please provide if any reference or implementation guide is available.

    Regards,

    Sanath Rai

  • Hi Sanath Rai,

    The reference design link I've provided before is all we have.
    It is working in the local network: a phone connects to the accessory to request the video content using RTSP, then the accessory connects over RTP to the phone to send the video data.
    In order to port it to connects to a cloud server, you will need to make some changes mainly in regards to the control channel (RTSP), since currently the accessory serves as TCP server which can't be accessed from the cloud. Probably you'll need to reverse the roles.
    The RTP should basically work as is (having the cloud server address).

    Br,
    Kobi
  • Hello Kobi,

    Right now i have started implementing example application (subscribe_publish_sample_CC3220SF_LAUNCHXL_tirtos_ccs).

    I have created the required certificates in AWS account according to AWS developer setup.

    below is the screen shot of the output i got after the step

    Connecting .... it is stuck there what might be the issue?

    I am using

    CCS 8.10 version

    SDK - simplelink_cc32xx_sdk_2_30_00_05

    Regards,

    Sanath Rai

  • Hi Sanath Rai,

    Which version of the AWS plugin are you using? You may not be building against the correct version of the SimpleLink CC32xx SDK. You can check your AWS Plugin's Release Notes, and under dependencies it lists which version of the SimpleLink SDK you should be using. Try building against the correct version to see if your issue is solved.

    Hope that helps,
    Gerardo

  • Hi Gerardo,

    AWS IOT Plugin is 2.0.0.09

    Simplelink CC32xx SDK 2.30.0.05

    i also tried with  Simplelink CC32xx SDK 2.10.0.04

    but with Simplelink CC32xx SDK 2.10.0.04 below is the isuue i am getting

    Regards,

    Sanath Rai

  • Hi Gerardo,

    Thank you for suggestion.
    I went through the release note The SDK plugin compatible was 2.20.0.10

    But Still it is getting stuck at "connecting"


    Regards,
    Sanath Rai
  • hi Gerardo,

    Below is the way i am storing the certificates and i am accessing them from C drive.that will not be an issue right?

    #define AWS_IOT_ROOT_CA_FILENAME "C:/us_certs/VeriSign-Class_3-Public-Primary-Certification-Authority-G5.pem" ///< Root CA file name
    #define AWS_IOT_CERTIFICATE_FILENAME "C:/us_certs/xxxxxxxxx-certificate.pem.crt" ///< device signed certificate file name
    #define AWS_IOT_PRIVATE_KEY_FILENAME "C:/us_certs/xxxxxxxxx-private.pem.key" ///< Device private key filename

    This is my HOST url

    #define AWS_IOT_MQTT_HOST "xxxxxxxxxxxxx-ats.iot.us-west-2.amazonaws.com" ///< Customer specific MQTT HOST. The same will be used for Thing Shadow

    Below is my root ca Array

    unsigned char root_ca_pem[] ="\
    -----BEGIN CERTIFICATE-----\
    MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCB\
    yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL\
    ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJp\
    U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxW\
    ZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0\
    aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCByjEL\
    MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW\
    ZXJpU2lnbi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\
    WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ\
    4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N\
    hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq\
    -----END CERTIFICATE-----";
  • Sanath Rai,

    Your certificates are incorrect; it looks like you are confusing where the certs are being stored in your PC with where they need to be stored on the device. You currently have the paths to where they are on your PC which is incorrect, these have to be restored to their original values.

    Next, for the C array that contains the actual content of the certificates, you will need to add “\r\n” to each line. This is really easy to mess up, so I would suggest you look at the QuickStart Guide’s section titled “Update the Example to use the certificates”, there it will show you an example of what this should look like.

    BR,
    Gerardo
  • Hello Gerardo,

    Thank you Gerardo.That was the issue.i flashed certificates using Uniflash and then using CCS i debugged the application .it worked.

    Now we will move on to our IOT application.

    Our Idea is to push the video /audio stream (RTSP/RTP) to media live server(cloud).

    We are planning to refer the document with SimpleLink™ CC3220-OV788 Audio/Video Streaming Reference(SWRA599).

    I didn't get the source code for the above for video/audio application using CC3220 with OV788 can you provide the link for that?

    Any suggestions from your side to be able to develop it in fast mode?

    Regards,

    Sanath Rai

  • Hi Gerardo,

    Also one more doubt about flashing the code to the Launchpad board through CCS.its not flashing ie: when i program its going to SRAM i want the code to be there even after the power on reset.do i need to change any other .CMD file to change .

    Regards,
    Sanath Rai
  • Hi Sanath Rai,

    The Software for SimpleLink™ CC32xx-OV788 Video/Audio Streaming Over Wi-Fi Reference Design can be downloaded on the link below. Scroll down to the “Order Now” section and there you’ll find a Download link. 
    http://www.ti.com/tool/TIDC-CC3200-VIDEO

    In order to program the on-chip flash memory on your CC3220 you have to use the Uniflash Tool. Details on using that can be found on the link below. As stated there, if you are developing with CCS, your MCU image will be in your CCS workspace in the project's Debug folder. 
    http://dev.ti.com/tirex/#/?link=Software%2FSimpleLink%20CC32xx%20SDK%2FSimpleLink%20Academy%2FWi-Fi%2FUniFlash%20ImageCreator%20Basics

    BR,
    Gerardo

  • Hi Gerardo,

    I will look into those reference design.

    I got a CC3220OV788videostreaming-1.0.0-windows-installer from http://www.ti.com/tool/TIDC-CC3200-VIDEO 

    I will go through the source code..

    Regards,

    Sanath Rai

  • Hello Kobi and Gerardo,

    Can you please explain the above scenario of connecting to cloud server with some details.
    as in where exactly we need to change the code ?


    Regards,
    Sanath Rai
  • Hello Gerardo ,

    I am trying to run subscribe_publish_sample_CC3220SF_LAUNCHXL_freertos_ccs FreeRTOS example.

    I went through the initial setup for freertos of installing FreeRtos10.1.1 version .the example is built and i have the certificates and the endpoint everything which was same as for TIRTOS.

    But the issue is when i debug this example its not getting started,it is getting stuck somewhere in the loop.to be exactly its getting lost at 

    status = pthread_create(&slThread, &pthreadAttrs, sl_Task, NULL);

    Anything more i am missing in case of FreeRtos example?

    Regards,

    Sanath Rai

  • Hi Sanath Rai,

    That version of FreeRTOS is not compatible with your version of the AWS plugin. You would need to download FreeRTOSv10.0.0 and change your workspace or projects to use that version instead.

    BR,
    Gerardo
  • Hi Gerardo,

    Thanks for the reply.

    That was the issue. I installed FreeRTOS10.0.0 .its working now.

    I am building video_streaming_ov788_CC3220SF_LAUNCHXL_freertos_ccs application to run on CC3220 launchpad and OV788 To stream video/audio data.

    Firstly for my IOT application

    i want to merge the MQTT application  which i just built for publishing message using AWS IOT plugin with  video_streaming_ov788_CC3220SF_LAUNCHXL_freertos_ccs application.

    so that i can send a message initially to the AWS server and get a reply back from there.

    Can i do that?

    Regards,

    Sanath Rai

  • Hi Sanath Rai,

    Yes, as Kobi stated before you can merge the two projects.

    Kobi Leibovitch said:
    In order to port it to connects to a cloud server, you will need to make some changes mainly in regards to the control channel (RTSP), since currently the accessory serves as TCP server which can't be accessed from the cloud. Probably you'll need to reverse the roles.
    The RTP should basically work as is (having the cloud server address).

    BR,
    Gerardo

  • Hello Gerardo,

    Yes Got it.i am working on merging those two projects.

    But I didn't understand the below point made by Kobi. Can you please elaborate on this.

    "In order to port it to connects to a cloud server, you will need to make some changes mainly in regards to the control channel (RTSP), since currently the accessory serves as TCP server which can't be accessed from the cloud.Probably you'll need to reverse the roles.

    The RTP should basically work as is (having the cloud server address)."

     

    In the sense reverse the role means are you telling to make AWS server as TCP server(to establish RTSP server) and the CC3220 as Client?

     

    Regards,

    Sanath Rai

  • The reference works in the local network. A controller (phone or PC) connects to the RTSP server that is implemented by the cc3220 accessory.

    When sending data to the cloud, the accessory should be the RTSP client connecting to the Cloud RTSP server.

    Br,

    Kobi

  • Hello Kobi,

    Thanks for the reply.

    I got the point you are trying to make.

    Any reference projects or documents associated with CC32xx series where we can refer for RTSP role reversal?

    It will be helpful for us in  moving forward.

    Regards,

    Sanath Rai

  • Hello Kobi,

    While going through all the related documents i found a product bulletin document from TI with respect to door bell application .

    Design a video doorbell with optimized cloud streaming and enhanced security features using SimpleLink™ Wi-Fi®

    document-SWAT009A

    Any updates on this ,it's been discussed here the streaming of data to the cloud.

    Right now i am working on RTSP client implementation in CC3220 device.

    Regards,

    Sanath Rai

  • Hi Sanath Rai,

    Unfortunately, the doorbell application (at least currently) only supports connections within the local network.

    This title of this document is confusing and is not aligned with the existing reference we have (we'll update the title for now).

    Br,

    Kobi

  • Hello Kobi,

    Thanks for the clarification.

    Coming back to the point we discussed in earlier posts does that mean i need to completely remove the RTSP server part code in Example reference design and write new code for RTSP client? So that CC3220 acts as RTSP client?

    As i understood  CC3220  will act as RTSP client and RTSP server will be running on cloud and once the initial events such as Describe,options etc. are all done then the video streaming will be done through RTP as usual right?

    Regards,

    Sanath Rai

  • Hi Kobi,

    To support RTSP cloud streaming, can we port the clients below and implement it on top of existing RTSP streaming app of TI ?

    Ex:

    1. github.com/.../amazon-kinesis-producer

    2. github.com/.../EasyPusher_RTSP


    Thanks.
  • Hi Kiran,

    I'm not familiar with these solutions but at least the first one doesn't seems to fit an IOT device.
    You still can use them as reference to the porting you need to do using our reference application.

    br,
    Kobi

  • Hello Kobi,

    Right Now in our Application we are thinking of Removing whole RTSP part and just keeping RTP to directly stream the video audio data.

    We are planning to remove the RTSP which does the initial events instead we are planning to stream data directly using RTP.

    In the reference source code to bypass can you suggest which part of the source code we need to comment to bypass RTSP and move directly into RTP part?

    Regards,

    Sanath Rai

  • HI Sanath,

    Take a look at the function start_media_streaming, as this is what kickstarts the RTP streaming process

    -Aaron
  • Hello Aaron,

    Thank you for the reply.

    I will look into it and make the changes needed.

    Best Regards,

    Sanath Rai

  • Hello Aaron,

    I have bypassed RTSP and now i am directly trying to send the data to cloud where i am able to see custom data in the cloud.

    1.But For steaming the video i have opened a .mpg using file operations method and able to stream to the cloud but we are getting a error in VLC player when trying to stream the video in VLC player,Below is the error generated in VLC player

    SDP required:

    A description in SDP format is required to receive the RTP stream. Note that rtp:// URIs cannot work with dynamic RTP payload format (96).

    2.How to get file with .sdp for the current encoder?
    Regards,

    Sanath Rai
  • HI Sanath,

    SDP is Session Description Protocol: https://tools.ietf.org/html/rfc4566

    -Aaron

  • Hi ,

    We used the sdp format which is in the protocol sourcecode of TI as below. We opened the VLC client with " ti_cc3200_1.sdp " file. But still VLC is not capturing and playing both audio and video.

    VLC is giving below error.

    [00007fb420c9ee90] live555 demux error: no data received in 10s, aborting
    [00007fb3e8c13740] live555 demux error: no data received in 10s, aborting
    [00007fb3e8c09330] live555 demux error: no data received in 10s, aborting
    [00007fb3e8c08d40] live555 demux error: no data received in 10s, aborting
    [00007fb420c615a0] live555 demux error: no data received in 10s, aborting

    SDP file:

    $ cat ti_cc3200_1.sdp
    v=0\r\n\
    o=- 1422939350613525 1 IN IP4 10.84.2.29\r\n\
    s=CC32XX + OV788 video streaming\r\n\
    i=A/V\r\n\
    t=0 0\r\n\
    a=type:unicast\r\n\
    a=control:*\r\n\
    a=range:npt=0-\r\n\
    a=x-qt-text-nam:H.264 Video\r\n\
    a=x-qt-text-inf:Video.264\r\n\
    m=video 5000 RTP/AVP 96\r\n\
    c=IN IP4 0.0.0.0\r\n\
    a=rtpmap:96 H264/90000\r\n\
    a=framerate:30.0\r\n\
    a=fmtp:96 packetization-mode=1;profile-level-id=42001F;sprop-parameter-sets=Z00AKKlQFAeyAAAA,aO48gAAAAAAAAAAA\r\n\
    a=control:track1\r\n\
    m=audio 5000 RTP/AVP 0\r\n\
    a=rtpmap:0 PCMU/11025\r\n\
    a=ptime:80\r\n\
    a=control:track2\r\n

    Please suggest anything needs to be changed in SDP file. SDP file had port 0 and we changed it to 5000 for both audio/video.

    Thanks,
    Kiran.
  • Hi,

    We streamed stored file and observed from wireshark tool, the captured packets are shown as RDT. Please find the attached screenshot.

    Please let us know what could be the issue.

    Thanks,

    Kiran.

  • Hi Kiran,

    We can’t provide expertise on higher level networking protocols not integrated into our device.

    BR,
    Gerardo
  • Sanath / Kiran (if you are working together) -
    RE: your #2 question above: I found these links which may assist you:

    AWS also has developer support here, similar to this forum, but also with a few more levels