vovagorodok / ArduinoBleOTA

Upload firmware over Bluetooth
MIT License
19 stars 7 forks source link

Precised MTU/ATTR sizes #19

Closed vovagorodok closed 1 year ago

vovagorodok commented 1 year ago

Prepare more clear understanding and code for MTU/ATTR sizes. Currently doesn't work for nano_33_iot.

vovagorodok commented 1 year ago

Created issue: https://github.com/arduino-libraries/ArduinoBLE/issues/299

vovagorodok commented 1 year ago

Throughput: https://docs.silabs.com/bluetooth/4.0/general/system-and-performance/throughput-with-bluetooth-low-energy-technology Data Channel PDUs: https://microchipdeveloper.com/wireless:ble-link-layer-packet-types

vovagorodok commented 1 year ago

We can sipmlify protocol by removing ATTR_SIZE from begin_resp of protocol. We can read MTU_SIZE from central libraries and ATTR_SIZE = MTU_SIZE - 3 for write. bluezero: https://github.com/ukBaz/python-bluezero/issues/397 flutter_reactive_ble: has requestMtu method

vovagorodok commented 1 year ago

ATTR_SIZE can be less than MTU_SIZE - 3, and work incorrectly. That why ATTR_SIZE still transmited via protocol

vovagorodok commented 1 year ago

Done by: https://github.com/vovagorodok/ArduinoBleOTA/commit/517f4e2b06812979dfb6261d13aadb38aa15254c https://github.com/vovagorodok/ble_ota_app/commit/0f822d6a5567d93334b703a640815af66c6bd19e