- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When we sending data via SPP, we are using API 'wiced_bt_spp_rx_flow_enable'
We are testing In case of above, last some data cannot be sent
Test condition :
PC : Bluetooth intergrated on board
Teraterm Termianl : PC Side & Device(CYW20719) Side
Setting -> local echo off
Eclipsed IDE Modustoolbox2.3 Wiced BTSDK v3.10
Test application :
Modustoolbox RFCOMM_Serial_port base
Timer added for writing data through PUART
MEMCPY will be called in case of RFCOMM data receiving or Timer calling.
wiced_bt_spp_rx_flow_enable function will be called as following the buffer size increasing .
Test method :
PC scanning DEVICE(20719EVK) -> Connect -> Open Serial port with TERATERM -> Local Echo off -> Sending file( more than 20KB) -> Log check
spp_rx_data_callback handle:2 len:100 20-61, total rx 18500 |
If you send a one byte character by press keyboard in PC Side terminal, You can find out 100byte length data be recieved in device side on teraterm.
ex) spp_rx_data_callback handle:2 len:100 6d-64, total rx 66400
this phenomenon will keep going until bluetootn connection lost.
Solved! Go to Solution.
- Labels:
-
AIROC™ Bluetooth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you try to enable the flow control in the connection_up event? Per my test, there is no problem to enable the flow control once the connection is created. Please do not disable/enable the flow control during the transfer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you see the problem with the demo code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It doesnt' happened in original demo code because it doesn't use API 'wiced_bt_spp_rx_flow_enalbe' .
But we should use that API above for the implementation.
I attacehd my code because I didn't ask customer whether to expose or not.
So, It doesn't use timer. I substituted button interrupt insttead of timer.
But result is same as well.
Test method :
During the sending file, if you push the user button, sending sequence stopped, After that if you push the user button again, rest of data will be sent. But, it doesn't send whole data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you try to enable the flow control in the connection_up event? Per my test, there is no problem to enable the flow control once the connection is created. Please do not disable/enable the flow control during the transfer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi~
Yes, you are right. In case of that situation you mentioned, there is no problem at all.
But, we need to disable/ enable flow control during the transfer.
Is there any solution for the case above?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I actually didn't mentioned other simillar sample application ( ex RFCOMM_Serial_Port_Multi-Port).
Because it might make a confustion.
Even if RFCOMM_Serial_port_multi-port used same API (wiced_bt_spp_rx_flow_enable), But it also has same problem.
Please refer to the attached code file