apdu-over-ble
apdu-over-ble copied to clipboard
Protocol improvement for future versions
The "MTU" (minimum transfer unit) size negotiation is already defined in the BLE protocol stack. By default, the size available for data is 20 bytes, but some devices like the iPhone negotiates it automatically and uses the max size supported by the peripheral.
Because the data will be divided in small chunks by BLE internally, we'll have to deal with 3 levels of packets in our implementation:
- APDU fragmentation
- Custom BLE packet fragmentation
- BLE fragmentation
In order to simplify the protocol in future versions, we could evaluate to remove the middle layer (Custom BLE packe fragmentation) and its size negotiation characteristic (Max Memory for APDU processing). In this scenario we only have to send the APDUs and manage the packets with BLE native support.
@miguelcardo @sergkh