Hi Tim,

On Wed, Aug 24, 2016 at 11:04:15PM +0100, Tim Hutt wrote:
> Hi,
> 
> With the bleprph example, whenever a central connects it seems to use a
> small connection interval (like 50ms). I'd like a longer one (around
> 500ms).

[...]

To use different connection parameters, one of the two peers needs to
perform a connection update procedure.  A central may read the
peripheral's preferred connection parameters and initiate a connection
update with those values, but I don't think this is very common.

As the slave, you can update the connection by calling
ble_gap_update_params()
(http://mynewt.apache.org/develop/network/ble/ble_hs/ble_gap/functions/ble_gap_update_params/)
after the connection is established.  Note: the NimBLE host API has
changed quite a bit lately, so if you are using 0.9.0 (instead of the
master branch), the API reference may be inaccurate.

The spec recommends that a peripheral allow at least five seconds after
connection establishment before updating the connection, but this is not
a requirement.  Probably the easiest place to call
ble_gap_update_params() is within the GAP event callback itself (i.e.,
as soon as the stack notifies you taht the connection has been
established).

Please pipe up if you run into any issues :).

Thanks,
Chris

Reply via email to