We have built existing mqx(4.1) qcom_api on freescale FRDM-K22F120M board with ARM GCC toolchain 4.9.3.
We wanted to build IoT demo application that collects data from built-in sensors present on FRDM-K22F120M board and have some edge level pre-processing before reporting to cloud. While doing so we couldn't find HTTP client API's to manipulate HTTP headers like x-api-key, Content-type, Headers for method, URLs etc to connect to HTTP server.
We tried to create TCP client socket conection by referring throughput_qapi.c and added HTTP headers to make a valid HTTP client request. We used following sequence in a function which is called inside one MQX task in every 1 sec (TCP payload size 662 bytes, buffer alloc size 768 ).
func {
TX:: qcom_socket(); -> qcom_connect(); -> CUSTOM_ALLOC(); -> qcom_send(); -> CUSTOM_FREE();
RX:: A_MALLOC(); -> t_select(); -> qcom_recv(); -> zero_copy_free();
qcom_socket_close();
}
But after running for few secods successfully, it hangs either at qcom_socket() call or qcom_send() call. It takes lot of time and enters into driver ASSERT call. We tried with t_socket() , t_connect(), t_send() API's . Results are same.
We need one sample high throughput TCP client source or HTTP client with Header options enabled.
Please help.
Regards,
Avijit