mynewt-nimble icon indicating copy to clipboard operation
mynewt-nimble copied to clipboard

(G)ATT transactions shall be queued by host

Open andrzej-kaczmarek opened this issue 6 years ago • 1 comments

NimBLE host seems to allow to send subsequent ATT requests without waiting for previous one to complete. This behavior is invalid as per Core 5.0, Vol 3, Part F, Section 3.3.2:

Once a client sends a request to a server, that client shall send no other request to the same server until a response PDU has been received.

We could just let application handle this, however:

  1. it makes apps more complicated
  2. there are already sample apps which seem to assume that multiple concurrent requests are handled properly (see blecent_read_write_subscribe in apps/blecent)

Since we already have ble_gattc_procs, we should leverage this to implement proper handling of GATT procedures inside host.

andrzej-kaczmarek avatar Feb 26 '19 09:02 andrzej-kaczmarek

And, I should add, responses should be assigned properly. Right now it is possible to send two GATT reads but responses can get mixed up - when processing a response, the first proc from the queue will be used, which in fact it could be the wrong one (different handle).

rojer avatar Sep 05 '24 14:09 rojer