You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/11/17 20:33:58 UTC

[4/4] incubator-mynewt-core git commit: BLE Host - Increase max ATT MTU to 527 (was: 240).

BLE Host - Increase max ATT MTU to 527 (was: 240).

Now that there are no restrictions or known bugs involving transmission
of chained mbufs, we can lift the artificial ceiling on ATT MTU.

The new number, 527, was derived as follows:
    * Largest ATT command, signed write: 15 + attribute length.
    * Max attribute size: 512
    * 15 + 512 = 527


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/8813bdf0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/8813bdf0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/8813bdf0

Branch: refs/heads/develop
Commit: 8813bdf0040cb9a6583e1d4f7003293545631e77
Parents: b4c9f85
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Nov 17 12:31:41 2016 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Thu Nov 17 12:31:41 2016 -0800

----------------------------------------------------------------------
 net/nimble/host/include/host/ble_att.h | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/8813bdf0/net/nimble/host/include/host/ble_att.h
----------------------------------------------------------------------
diff --git a/net/nimble/host/include/host/ble_att.h b/net/nimble/host/include/host/ble_att.h
index 452a744..e852b0b 100644
--- a/net/nimble/host/include/host/ble_att.h
+++ b/net/nimble/host/include/host/ble_att.h
@@ -94,9 +94,14 @@ struct os_mbuf;
 #define BLE_ATT_ACCESS_OP_READ              1
 #define BLE_ATT_ACCESS_OP_WRITE             2
 
-#define BLE_ATT_MTU_DFLT                23  /* Also the minimum. */
-#define BLE_ATT_MTU_MAX                 240
-#define BLE_ATT_MTU_PREFERRED_DFLT      240
+#define BLE_ATT_MTU_DFLT                    23  /* Also the minimum. */
+
+/**
+ * An ATT MTU of 527 allows the largest ATT command (signed write) to contain a
+ * 512-byte attribute value.
+ */
+#define BLE_ATT_MTU_MAX                     527
+#define BLE_ATT_MTU_PREFERRED_DFLT          527
 
 int ble_att_svr_read_local(uint16_t attr_handle, struct os_mbuf **out_om);
 int ble_att_svr_write_local(uint16_t attr_handle, struct os_mbuf *om);