TI team,
I have couple of questions regarding the BT_spp_send function. I hope you can help.
- When BT_spp_send() is executed, sdk_error_handler() goes into an endless-loop condition sometimes. In this case, sdk_error_code is 22(SDK_BT_MEM_ALLOC_FAIL) . What could be causing this error? How can I debug it? What should I change?
- If BT_spp_send() is called consecutively, should it be called in the callback routines named “API_RESULT appl_spp_notify_cb()” or “API_RESULT appl_spp_l2cap_tx_queue_flow_cb()”? From our experiments, we observe the following: When BT_spp_send() returns API_SUCCESS and then BT_spp_send() is called next with 70 byte data transfer, it becomes SDK_BT_MEM_ALLOC_FAIL at 4th transfer. For example, 70byte(OK) --> 70byte(OK) --> 70byte(OK) --> failed.
- BT_spp_send() may return “SPP_ERR_INVALID_STATE” . What is the condition that would return this state? What should I check under this state?
Thank you for you help,