diff --git a/pandora/host.proto b/pandora/host.proto index 3218263..8e7766a 100644 --- a/pandora/host.proto +++ b/pandora/host.proto @@ -59,6 +59,10 @@ service Host { // Unlike BR/EDR `Connect`, this must not trigger or wait any // pairing/encryption and return as soon as the connection is complete. rpc ConnectLE(ConnectLERequest) returns (ConnectLEResponse); + // Like `ConnectLE`, but streams updates about the connection after the + // initial ConnectLEResponse. Currently the only update supported is + // connection parameter updates. + rpc ConnectLEWithUpdates(ConnectLERequest) returns (stream ConnectLEWithUpdatesResponse); // Disconnect an ACL connection. // The related Connection must not be reused afterwards. rpc Disconnect(DisconnectRequest) returns (google.protobuf.Empty); @@ -257,6 +261,34 @@ message ConnectLEResponse { } } +// Response of the `ConnectLEWithUpdates` method. +message ConnectLEWithUpdatesResponse { + oneof update { + // The first message sent on the stream. Contains the Connection on success + // or an error on failure. + ConnectLEResponse connect_response = 1; + // Sent when the connection parameters are updated. + ConnectionParameters connection_parameter_update = 2; + } +} + +message ConnectionParameters { + // Connection interval used on this connection. + // Range: 0x0006 to 0x0C80 + // Time = N × 1.25 ms + // Time Range: 7.5 ms to 4000 ms. + uint16 connection_interval = 1; + // Peripheral latency for the connection in number of subrated connection + // events. + // Range: 0x0000 to 0x01F3 + uint16 peripheral_latency = 2; + // Supervision timeout for this connection. + // Range: 0x000A to 0x0C80 + // Time = N × 10 ms + // Time Range: 100 ms to 32000 ms + uint16 supervision_timeout = 3; +} + // Request of the `Disconnect` method. message DisconnectRequest { // Connection that should be disconnected.