What is the best way to provide bidirecational communication using CoreBluetooth framework? I want to use BLE stack protocal as tcp-similar(only as a way for sending data) and then add upper layes: as tls, http, grpc etc.
We have 2 ways(I guess):
Which way is the best and why? Maybe examples are present anywhere?
Using "write without response" + "notifications" is almost the same in terms of performance compared to l2cap coc. In the end it is just a different header if you look at the raw BLE packets over the air that will be the difference (a few bytes might differ in the overhead, but nothing of importance if you have the LE Data Length extension enabled). One difference though is that you have the flow control mechanism for l2cap coc that you don't have for gatt.
My suggestion is to try both and pick the API that you like the most.