Jump to content

Search the Community

Showing results for tags 'ccs ide'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 1 result

  1. JINU

    CC3200 https

    Hi, In http client demo works fine ,when i POST data in https got 400 error,can any suggest How to POST data in HTTPS. https post method works fine in energia ,but not in CCS ide ,below i added functions in the code int connectToServer(HTTPCli_Handle httpClient) { long retVal=-1; unsigned long g_ulDestinationIp=0; struct sockaddr_in addr; int iAddrSize; if(cur_DestinationIP==0){ retVal=sl_NetAppDnsGetHostByName((signed char *)HOST_NAME, strlen((const char *)HOST_NAME), &cur_DestinationIP, SL_AF_INET); if(retVal<0){ Report("Ip fetch error \n\r"); return -1; } } g_ulDestinationIp=cur_DestinationIP; struct HTTPCli_SecureParams sparams; /* Set secure TLS connection */ /* Security parameters */ sparams.method.secureMethod = SL_SO_SEC_METHOD_SSLV3; sparams.mask.secureMask =SL_SEC_MASK_TLS_RSA_WITH_AES_256_CBC_SHA256 ; //SL_SEC_MASK_TLS_RSA_WITH_AES_256_CBC_SHA; strncpy(sparams.cafile, ROOTCA_PEM_FILE, strlen(ROOTCA_PEM_FILE)); sparams.privkey[0] = 0; sparams.cert[0] = 0; sparams.dhkey[0] = 0; HTTPCli_setSecureParams(&sparams); //Report("fetched ip %d \n\r",g_ulDestinationIp); /* Set up the input parameters for HTTP Connection */ addr.sin_family = SL_AF_INET; addr.sin_port = sl_Htons(HOST_PORT); addr.sin_addr.s_addr = sl_Htonl(g_ulDestinationIp); /* Testing HTTPCli open call: handle, address params only */ HTTPCli_construct(httpClient); retVal = HTTPCli_connect(httpClient, (struct sockaddr *)&addr,0, NULL); if (retVal < 0) { Report("Connection failed !\n\r"); return -1; } return 0; } int httpPost(HTTPCli_Handle httpClient,const char * requestURI,char * postData){ char contLength[4]; int postDataLen=strlen(postData); sprintf((char *)contLength, "%d",postDataLen); //sprintf((char *)contLength, "%d",(sizeof(postData)-1)); HTTPCli_Field fields[6]={ {HTTPCli_FIELD_NAME_HOST, HOST_NAME}, {HTTPCli_FIELD_NAME_ACCEPT, "*/*"}, {HTTPCli_FIELD_NAME_CONNECTION,"close"}, {HTTPCli_FIELD_NAME_CONTENT_TYPE, "application/x-www-form-urlencoded"}, //{HTTPCli_FIELD_NAME_CONTENT_LENGTH, contLength}, {NULL, NULL} }; HTTPCli_setRequestFields(httpClient, fields); HTTPCli_sendRequest(httpClient, HTTPCli_METHOD_POST, requestURI, 1); HTTPCli_sendField(httpClient, HTTPCli_FIELD_NAME_CONTENT_LENGTH, (const char *)contLength, 1); int rt=HTTPCli_sendRequestBody(httpClient, postData, postDataLen); return rt; }
×