I have a project with a PSOC 4, specifically CYBLE 222014-1.
I need to make a 100MB data transfer in a reasonable time. We are considering compressing the data but I don't think it can be reduced to much more than half.
In the example provided by CYPRESS called "Project #024: Bluetooth Low Energy Throughput - Pushing the Limits" they directly use the l2cap layer.
The problem is that this transfer has to be done between the MCU and an ANDROID mobile phone.
Android has implemented an l2cap socket in the latest version of the API, specifically the 29 (Android 10). This version offers the functions listenUsingL2capChannel() and listenUsingInsecureL2capChannel(). Probably with these functions you can replicate the example shown between mobile and MCU.
The problem is that it is not compatible with previous versions of ANDROID.
On the other hand from API 5 there is RFCOMM support in android (listenUsingRfcommWithServiceRecord()). It uses the l2cap layer to simulate a serial port. RFCOMM is a layer superior to l2cap that was used in previous versions of bluetooth.
I am not sure if the RFCOMM protocol can be implemented with PSOC 4 in order to have compatibility with previous versions of ANDROID.
In this other thread the topic is discussed: https://community.cypress.com/thread/1942?start=0&tstart=0 indicating that it is not possible.
I would like to have a confirmation if it is possible or not to use RFCOMM.
The other alternative is to use the feature set offered by classic BLE. But here again the limitations of ANDROID comes into play. Although in other websites it is specified that for each connection interval you can send up to 6 packets (features), I have not been able to send more than 2. Since the MTU in ANDROID cannot be changed and for each packet you can send 20 bytes per packet, and this is a problem.
Apart from these limitations, there can be a maximum of 89 connection intervals. Although in previous versions of ANdroid a connection interval of 7 was allowed in higher versions it has been increased to 9. If we multiply 9 by 1.25 we have an interval every 11.25 seconds and if we divide 1000/11.25 ~89 packets.
With all this we have that 40 bytes per interval * 89 packets per second we have 3560 bytes/s. Without considering losses this speed is quite low.
Given this case, is there any way to make this type of data transfer faster?
Thank you very much.