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: HTTP Client Problem

Part Number: CC3220

Hello,

I used new SDK 1.60 for CC3220 to create HTTP Client.

Could you tell me, Are you able to provide an example of implementation this HTTP Client driver?

I tried to connect with "https://swapi.co/api/" (HOST_NAME)

I still get error 2006 from function HTTPClient_connect

SlNetSock_init(0);
HTTP_handle = HTTPClient_create(&status, NULL);

HTTP_extSecParams.clientCert = NULL;
HTTP_extSecParams.privateKey = NULL;
HTTP_extSecParams.rootCa = NULL;


status = HTTPClient_connect(HTTP_handle, HOST_NAME2, &HTTP_extSecParams, 0);

Thanks for help in advence,

Best Regards

M

  • Hi M,

    The HTTP Client library is new to SDK 1.60.00.04. There is currently no http client example available for the CC3220.

    You could try referencing the CC3200 HTTP Client Demo for some guidance in the CC3200 SD:

    .

    Also, do you mean Error code -3006? I do not see a 2006 error code within httpclient.h

    /*!
     *  @brief Allocation failed during the CB creation.
     *
     *  Check whether there is free memory for CB allocation.
     */
    
    #define HTTPClient_ECBALLOCATIONFAILED                   (-3006)

    Hope this helps,

    Kevin

  • Hello,

    Thanks for reply.

    /* Parameters are invalid */
    #define SLNETERR_RET_CODE_INVALID_INPUT (-2006L)

    The error comes from the library slnetsocket. The error appears in the function SlNetSock_connectURI during the call SlNetSock_getVirtualSdConf.


    Best Regards,

    M
  • M,

    Can you track down where the SlNetSock_connectURI function is called and verify the parameters included make sense? The function definition is within httpclient.c

    static int16_t SlNetSock_connectURI(int16_t *sd, const char *URI, SlNetSockSecAttrib_t *secAttrib, uint32_t ifBitmap, int16_t *flags);

    Best,

    Kevin

  • Hi,

    I did some tests and I think the problem is somewhere else. Probably the error is caused by the lack of an interface SlNet

    So before function HTTPClient_Connect:

    SlNetSock_init(0);

    SlNetIf_Config_t SlNetIfConfigWifi;

    uint8_t priority = 10;
    SlNetIf_add(SLNETIF_ID_1, "WiFi_Interface", &SlNetIfConfigWifi, priority);

    HTTP_handle = HTTPClient_create(&status, NULL);

    And there is a problem with the structure SlNetif_Config_t which contains all the function callbacks that are expected to be filled by the relevant network stack interface. Is it necessary to write my own callback function?

    Best Regards,

    M
  • M,

    I don't believe you will need to write any callback functions for the SlNetIf_Config_t structure.

    It seems like some further investigation needs to be carried out to find where the issue truly stands. This library was added in the most recent SDK release, unfortunately there are no examples that utilize it right now to help guide you.

    Best,
    Kevin
  • Has someone solved this problem?

    Or has an example of a working client on a new SDK?

    Best Regards,

    M.
  • We are also running into the same issue.

    There is another (locked) thread about HTTP client support on the CC3220, in which TI states it will be available at the start of 2018.
    Unfortunately, there is still no example, and people are still not succeeding in using it.

    Again, I am pretty suprised that such a basic IOT feature is not provided as example..
  • Hi Kevin,

    Could you please provide the http client demo link and a step by step explanation of porting this into the TI CCS IDE version7.4.x ?

    I have followed several incomplete threads regarding this and even read responses to the latest v1.6.0 sdk but there are no clear complete explanations how to go about using the new lib to create a http client and then create from that a https client.

    regards,

    Antolin

  • Hi All,

    Please see the E2E post: e2e.ti.com/.../663977

    Thank you for your patience,
    Kevin