Can you share wiced transport config structure? Also which version of WICED are you using?
You could receive the error for multiple reasons: the pointer to the payload is NULL, if the transport is not defined.
//UART transport configuration
const wiced_transport_cfg_t stTheBlTransportConfig =
The failure seems to be caused by unstable CTS connection. Is it intended behavior for wiced_transport_send_buffer() to fail with result code 4 if host is not ready to receive? I will also test for NULL payload and see if that is the reason.
No, the API will not return error if the CTS is not asserted by the host. The data will remain in the buffer till the host asserts the CTS line and all the data will be sent to the host once the line is asserted.
Thanks yssu. Good to know about the CTS behaviour.