Other Parts Discussed in Thread: CC3100, CC3100SDK,
Hi. I have a msp430f5529lp and cc3100boost and have modified the http_client example from the cc3100sdk_1.2.0. My app should grab data from a remote server every minute for 1 hr. As is currently set up, it will execute the first 8 GET requests then the call to HTTPCli_connect fails within the call to ConnectToHTTPServer. Monitoring the requests from the server side, I see that there are no more requests made from the cc3100 client (after the 8th) and my router indicates that the device is still attached with an IP. I can change the duration between requests made by the client to every 2 minutes and still only 8 requests are made so this does not appear to be a time out issue.
I have searched the sdk files and see that functions HTTPCli_destruct, delete, disconnect are only found in the netapps/http/client/httpcli.c and .h files so they are not used by the http_client example in the sdk. It doesn't appear that the httpcli struct is ever destroyed.
Below is the overall design of the app in the main func. I have tried other permutations (e.g., where the device is started, connection made with AP before entering the loop) and same issue. My questions are 1) is this the appropriate way to manage requests that are made with this frequency (1 request/minute)? 2) Should I delete and (re)create the httpClient struct each cycle? I'd be happy to post all of the related code if necessary. Thanks for any suggestions!
CODE DESIGN OVERVIEW
configure clocks, etc.
configures the cc3100 device to default state
loop forever
check if minute has elapsed
initialize the 3100 with sl_Start
establish connection with AP
connect to HTTP server
send HTTP GET and process response
stop the 3100 with sl_Stop