Another answer is wrongly right, but for the wrong reasons.
Of course, you can send any data to BLE, not just GATT. It's just that iOS makes you work with GATT . There are no iOS APIs for anything else. So yes, this is iOS that is stopping you from doing this.
If you are not forced to work with GATT, other options are possible:
- L2CAP Credit-Based Channels - you create a channel that allows you to send the full 23 octets of data to one packet (which in BLE 4.0 and 4.1; 4.2 allows more), in any format that you choose.
- When accessing the HCI, you can send a custom ACL data packet to avoid the L2CAP header. But you also need to change the other side to make sure that it parses it correctly.
Bogdan alexandru
source share