File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
rxandroidble/src/main/java/com/polidea/rxandroidble2 Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -56,10 +56,17 @@ public interface RxBleConnection {
5656 int GATT_MTU_MINIMUM = 23 ;
5757
5858 /**
59- * The maximum supported value for MTU (Maximum Transfer Unit) used by a bluetooth connection on Android OS.
60- * https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/android-5.1.0_r1/stack/include/gatt_api.h#119
59+ * The maximum properly supported value for MTU (Maximum Transfer Unit) used by a bluetooth connection on Android OS.
60+ * <p>The theoretical maximum value for MTU Negotiation on Android OS is 517
61+ * (https://cs.android.com/android/platform/superproject/+/master:packages/modules/Bluetooth/system/stack/include/gatt_api.h;l=244;drc=1918034a0730839c7a07b1260b1ab74b80d6b4e6)
62+ * the real maximal supported MTU is 515 since the buffer size is capped on 512 bytes = 515 - GATT_READ_MTU_OVERHEAD
63+ * (https://cs.android.com/android/platform/superproject/+/master:packages/modules/Bluetooth/system/stack/include/gatt_api.h;l=250;drc=1918034a0730839c7a07b1260b1ab74b80d6b4e6;bpv=1;bpt=1)
64+ * <p>
65+ * <p>NOTE: before Android 13 (API 33) the maximal properly supported MTU was 517
66+ * see https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/android-5.1.0_r1/stack/include/gatt_api.h#119
6167 */
62- int GATT_MTU_MAXIMUM = 517 ;
68+ int GATT_MTU_MAXIMUM = 515 ;
69+
6370
6471 /**
6572 * Description of correct values of connection priority
You can’t perform that action at this time.
0 commit comments