Skip to content

setConnectionParams info #253

@johntaves

Description

@johntaves

I have a bunch of questions that I hope you can answer.

Can you provide a more complete explanation of the settings passed to setConnectionParams?
[in] | minInterval | The minimum connection interval in 1.25ms units.
[in] | maxInterval | The maximum connection interval in 1.25ms units.
[in] | latency | The number of packets allowed to skip (extends max interval).
[in] | timeout | The timeout time in 10ms units before disconnecting.
[in] | scanInterval | The scan interval to use when attempting to connect in 0.625ms units.
[in] | scanWindow | The scan window to use when attempting to connect in 0.625ms units.

I am using NimBLE on both the server and the client. There will be 8 servers to the client. The client will also be a web page server via wifi. Each server needs to send a few bytes of data every few seconds. My goal is to minimize power and free up the radio for wifi. The client wants to know if any of the servers die.

The settings above seem somewhat redundant. I expect the min and maxInterval is how often it will send a ping to ensure the connection is still alive, but then why both min and max? Is the timeout the max time allowed with no response from the other end before declaring the connection lost, how is that different from maxInterval? What is latency? I mean what is skipping a packet?

Do the ping's get sent only if no other writeValue or notify happens? For example, can I set the minInterval to say 4 seconds and have the server do notify() every 2 seconds so that all will be quiet on the radios except when that notify happens?

How does all this relate to putting the ESP32 to sleep? I am thinking that if I set these values properly, I can then put the chip to sleep for say 2 seconds and have the timer wake it before the BLE would have timed out.

I apologize for failing to find this info, and appreciate any info you can provide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions