- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I receive over SPP a batches of bytes larger than 256 (varying between 81 bytes and 800 bytes per batch with max 1000 bytes per second). By HCI tracing I was able to see that the byte batches received completely.
This batch should be send to an external MCU by use of PUART (without HW handshake). The PUART is set up properly and tested okay on 115k and 38400 baud.
I am using in the callback function from SPP spp_rx_data_callback the buffer-pointer p_data and the buffer length data_len to send the by wiced_hal_puart_synchronous_write(p_data, data_len) it appears that large batches are not transferred correctly, say for batches larger than 256 bytes the maximum number of bytes transferred is around 256.
For batches smaller than 256 bytes (say 242) I get the correct 242 bytes plus some additional from the begin of the buffer plus some that are not assignable.
Is there a limit of 256 bytes in the TX buffer ?
Or is there a limit in the SPP reception buffer ?
How can I send securely these number of bytes?
WICED_BT_TRACE("###############################\n");
WICED_BT_TRACE("%s handle: %d len: %d %02x-%02x\n", __FUNCTION__, session_handle, data_len, p_data[0], p_data[data_len - 1]);
WICED_BT_TRACE("###############################\n");
wiced_hal_puart_print("\n########## BEGIN #############\n");
wiced_hal_puart_synchronous_write(p_data, data_len);
if (data_len>0)
{
wiced_hal_puart_synchronous_write(p_data, data_len);
}
wiced_hal_puart_print("\n########## END #############\n");
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The community had been experienced some problem(certain threads not published immediately) due to migration, sorry for the convenience.
In the datasheet (https://www.cypress.com/file/469126/download ), I can see that:-
"The Peripheral UART is functionally the same as HCI UART but with a 256 byte transmit and receive
FIFO"
I think here, you can try using wiced_hal_puart_write() because wiced_hal_puart_synchronous_write() does not wait FIFO empty. wiced_hal_puart_write() will wait till the FIFO can accept more data.
Thanks,
-Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The community had been experienced some problem(certain threads not published immediately) due to migration, sorry for the convenience.
In the datasheet (https://www.cypress.com/file/469126/download ), I can see that:-
"The Peripheral UART is functionally the same as HCI UART but with a 256 byte transmit and receive
FIFO"
I think here, you can try using wiced_hal_puart_write() because wiced_hal_puart_synchronous_write() does not wait FIFO empty. wiced_hal_puart_write() will wait till the FIFO can accept more data.
Thanks,
-Dheeraj