Other Parts Discussed in Thread: CC3235S, UNIFLASH
Hello. I am following this guide on provisioning my CC3235S with AWS using AWS SDK plugin.
I am using the subscribe_publish_sample project straight from Resource Explorer for CC3235S, TIRTOS, and CCS Compiler found here.
I am using latest SI SDK (5.20.00.06), latest AWS Plugin (4.30.00.02), and have the latest Service Pack installed (4.11.0.0).
I am unable to complete my HTTP POST request. Inside sendCSR(), I successfully create the HTTP client, but I am getting -111 Connection Refused error returned by HTTPClient_connect. I understand that one of the arguments for this function is the DEFINE I updated called AWS_IOT_PROVISIONING_HOST. This is a possible source of error, but when the terminal reads “Sending POST HTTP Request to <URL >, that makes sense to me.
My understanding is that this is the API Gateway invoke URL, but I could be wrong. The guide and comments from TI do a poor job of explaining things.
I am getting socket-related errors. When
ret = SlNetSock_startSec(cli->ssock, secAttribs, SLNETSOCK_SEC_START_SECURITY_SESSION_ONLY | SLNETSOCK_SEC_BIND_CONTEXT_ONLY);
Is called inside HTTPClient_connect2, which is inside HTTPClient_connect, the program hangs forever at:
case SL_DEVICE_EVENT_FATAL_DRIVER_ABORT: /* FATAL ERROR: Driver Abort detected */ while (1);
Inside SlNetSock_startSec, When it gets to
retVal = (netIf->ifConf)->sockstartSec(realSd, sdContext, secAttrib, flags);
, my program seems to hang, but it brings me to the Driver Error above.
This is the entire function:
int32_t SlNetSock_startSec(int16_t sd, SlNetSockSecAttrib_t *secAttrib, uint8_t flags) { int32_t retVal = SLNETERR_RET_CODE_OK; int16_t realSd; uint8_t sdFlags; SlNetIf_t *netIf; void *sdContext; /* Check if the sd input exists and return it */ retVal = SlNetSock_getVirtualSdConf(sd, &realSd, &sdFlags, &sdContext, &netIf); /* Check if sd found or if the non mandatory function exists */ if (SLNETERR_RET_CODE_OK != retVal) { return retVal; } if (NULL == (netIf->ifConf)->sockstartSec) { /* Non mandatory function doesn't exists, return error code */ return SLNETERR_RET_CODE_DOESNT_SUPPORT_NON_MANDATORY_FXN; } /* StartSec function called, set bit */ sdFlags |= flags; /* Function exists in the interface of the socket descriptor, dispatch the startSec command */ retVal = (netIf->ifConf)->sockstartSec(realSd, sdContext, secAttrib, flags); SLNETSOCK_NORMALIZE_RET_VAL(retVal,SLNETSOCK_ERR_SOCKSTARTSEC_FAILED); return retVal; }
I don’t know what this means or how to remedy it.
I have done the following:
- Used Postman to verify my API gateway URL works and returns expected value (AWS side looks good)
- Filled in working Wifi credentials (Using Open Guest Network, Confirmed successful POST using this network manually)
- Filled in aws_iot_config.h to the best of my abilities (possible source of error)
- Flashed Certificates onto device and verified correct filepath in aws_iot_config.h DEFINEs
- Tried different variations of URL for POST Request.
- Increased the HTTP Client Buffer stack size as instructed in the AWS Provision Guide
My code is the entire project straight from Resource Explorer. I will however share my aws_iot_config.h file:
I do not know exactly what my Request URI is, but I am using the URI for the lambda I'm using to provision.
I'm happy to share any more details if I can.
Would someone mind helping with this? I'm sure other people will run into this issue as well, if they haven't already.
Thank you.