-
Notifications
You must be signed in to change notification settings - Fork 178
BLE: Add ATT_MTU and Data Length docs #937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
11bcb20
184ca7d
3288074
6a551b7
a3e9ae1
b4fd1fb
3b2d5a0
6ec7367
5e84262
a297fe7
ec646b8
c4f6254
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,14 @@ As a result of the discovery process, the client can start interacting with the | |
|
||
Mbed BLE abstracts read and write operations to offer a single API that can be used to read or write characteristic values. The application code does not have to handle the necessary fragmentation or reassembly process if the attribute value to be transported can't fit in a single data packet. | ||
|
||
#### ATT_MTU | ||
paul-szczepanek-arm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
ATT_MTU is the maximum size of the attribute that can fit in an L2CAP packet. This is independent of the Data Length which controls the over-the-air packet payload size (which is dealt with in the GAP). An L2CAP packet will be fragmented over many such packets if required. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can improve the first sentence. What do you think of: |
||
|
||
Only `GattClient` can trigger the exchange of ATT_MTU between client and server. The host may trigger the exchange which may also be requested manually using `negotiateAttMtu`. If an exchange happens the biggest value possible across both devices will be used. Negotiation is only a best effort process and does not guarantee a higher value being set. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be interesting to detail the negotiation behaviour and clarify the term host. |
||
|
||
ATT_MTU is at least 23 octets by default. If a larger size is negotiated the user application will be informed through the `onAttMtuChange` function called in the `GattClient::EventHandler` (`GattServer::EventHandler` will also be informed). | ||
|
||
#### Server initiated events | ||
|
||
When a server updates a characteristic value, it can forward the new value to any registered clients. Clients may register for these updates on a per-characteristic basis. The server sends the updates by using notifications (no confirmation from client) or indications (client confirms receipt). This mechanism minimizes the number of transactions between a client and a server by avoiding polling. | ||
|
Uh oh!
There was an error while loading. Please reload this page.