Okundu Omeni
/
wifi-https-ble-sm-uart-atcmd-5-13-1
this is using the mbed os version 5-13-1
Diff: source/ATCmdManager.cpp
- Revision:
- 88:7ffa053be662
- Parent:
- 87:99b37d26ff2a
- Child:
- 89:45f6db09a76d
--- a/source/ATCmdManager.cpp Fri Mar 29 22:18:33 2019 +0000 +++ b/source/ATCmdManager.cpp Sun Mar 31 22:09:45 2019 +0000 @@ -226,6 +226,7 @@ http_req.method = str2HttpMethod(s1); http_req.request_URI.assign(s2); http_req.http_version.assign(s3); + printf("\nhttp_req.method = %d \n", http_req.method); } else{ // scan header pairs //n = sscanf(nxtPtr,"%s %s", &s1[0], &s2[0]); @@ -261,7 +262,7 @@ wifi_data_msg_t data_msg; data_msg.wifi_cmd = WIFI_CMD_SEND_HTTPS_REQ; printf("\nsizeof(http_req) on population = %d\n", sizeof(http_req)); -/* + data_msg.dataLen = sizeof(http_req.method) + sizeof(http_req.body) + http_req.request_URI.capacity() + @@ -270,7 +271,8 @@ http_req.AcceptVal.capacity() + http_req.contentType.capacity() + http_req.contentLen.capacity(); -*/ + +/* data_msg.dataLen = sizeof(http_req.method) + sizeof(http_req.body) + http_req.request_URI.size() + @@ -279,6 +281,7 @@ http_req.AcceptVal.size() + http_req.contentType.size() + http_req.contentLen.size(); +*/ memcpy(data_msg.buffer,&http_req, data_msg.dataLen); // queue next data request queueWiFiDataRequest(data_msg); @@ -815,6 +818,8 @@ char * resp = (char *) resp_data->buffer; printf("\n[ATCMD MAN] received response:\n"); printf("%s\r\n", (char *)resp); + _parser.write(resp, resp_data->dataLen); _wiFi2ATDatamPool->free(resp_data); + }