It has been few weeks that I am trying to learn about Bluetooth low energy (BLE). This is the first time I code for bluetooth and I spent a lot on learning the basics. I managed to get my python script to communicate with the Nucleo board via the BLE expansion board. It seems the BLE is not designed for relatively large data. Every packet is like around 20 bytes of data. I read about L2CAP which seems it can increase the throughput. But I do not find an example or any code to use the BLE and L2CAP. L2CAP is marked as supported in the BLE exansion board but I do not know how to activate it and how it works.
My purpose is to be able to send the ADC measurements over BLE to the PC and do the rest of calculation on PC. It has been impossible to have a good speed of data transfer for this purpose. For example when I send 250 bytes from nucleo board to PC without L2CAP, it takes more than 1 seconds. The alternative is to do calculations on the nucleo board and use the BLE just as a notification.
If you know about the L2CAP and BLE please help me. I do not find anyway to send data using L2CAP with the bluenrg library as a server. bluenrg library has few functions to receive L2CAP stuff or sending as a client, but I could not find anything to initiate the communication over the L2CAP as server.