diff options
author | Sven Gothel <[email protected]> | 2022-04-19 06:26:22 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-04-19 06:26:22 +0200 |
commit | fda49ef5ba0d3fb03aefb6f119f4196f9c05dc51 (patch) | |
tree | a5c7463a5408551a994f8f4e5dd4e828f6611dca /doc | |
parent | 6c3451536ea6f468079349daec647d01354a3435 (diff) |
README: Bump v2.6.4. Convert Connection_Paramter.md to markdown and link.v2.6.4
Also add scripts/run-trials-until.sh script.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Connection_Parameter.md | 42 | ||||
-rw-r--r-- | doc/Connection_Parameter.txt | 46 |
2 files changed, 42 insertions, 46 deletions
diff --git a/doc/Connection_Parameter.md b/doc/Connection_Parameter.md new file mode 100644 index 00000000..42082756 --- /dev/null +++ b/doc/Connection_Parameter.md @@ -0,0 +1,42 @@ +# Direct-BT Default Connection Parameter + +## Server + +* BTAdapter::setDefaultConnParam(): + - const uint16_t conn_min_interval = 8; // 10ms + - const uint16_t conn_max_interval = 40; // 50ms + - const uint16_t conn_latency = 0; + - const uint16_t supervision_timeout = 50; // 500ms + - status = adapter->setDefaultConnParam(conn_min_interval, conn_max_interval, conn_latency, supervision_timeout); + +* BTAdapter::startAdvertising() + - static const uint16_t adv_interval_min=160; // x0.625 = 100ms - default is 640 -> 400ms + - static const uint16_t adv_interval_max=480; // x0.625 = 300ms - default is 640 -> 400ms + - static const AD_PDU_Type adv_type=AD_PDU_Type::ADV_IND; + - static const uint8_t adv_chan_map=0x07; + - static const uint8_t filter_policy=0x00; + - eir.setConnInterval(8, 12); // 10ms - 15ms + + +## Client + +* BTAdapter::startDiscovery(): + - static DiscoveryPolicy discoveryPolicy = DiscoveryPolicy::PAUSE_CONNECTED_UNTIL_READY; // default value + - static bool le_scan_active = true; // default value + - static const uint16_t le_scan_interval = 24; // 15ms, default value + - static const uint16_t le_scan_window = 24; // 15ms, default value + - static const uint8_t filter_policy = 0; // default value + - adapter->startDiscovery( discoveryPolicy, le_scan_active, le_scan_interval, le_scan_window, filter_policy ); + + +* BTDevice::connectLE(): + - static const uint16_t le_scan_interval = 24; // 15ms, default value + - static const uint16_t le_scan_window = 24; // 15ms, default value + - uint16_t conn_interval_min = (uint16_t)8; // 10ms + - uint16_t conn_interval_max = (uint16_t)12; // 15ms + - const uint16_t conn_latency = (uint16_t)0; + - const uint16_t supervision_timeout = (uint16_t) getHCIConnSupervisorTimeout(conn_latency, (int) ( conn_interval_max * 1.25 ) /* ms */); + - device->connectLE(le_scan_interval, le_scan_window, conn_interval_min, conn_interval_max, conn_latency, supervision_timeout); + + + diff --git a/doc/Connection_Parameter.txt b/doc/Connection_Parameter.txt deleted file mode 100644 index d9233e88..00000000 --- a/doc/Connection_Parameter.txt +++ /dev/null @@ -1,46 +0,0 @@ -Server: -======== - -BTAdapter::setDefaultConnParam(): - const uint16_t conn_min_interval = 8; // 10ms - const uint16_t conn_max_interval = 40; // 50ms - const uint16_t conn_latency = 0; - const uint16_t supervision_timeout = 50; // 500ms - status = adapter->setDefaultConnParam(conn_min_interval, conn_max_interval, conn_latency, supervision_timeout); - -BTAdapter::startAdvertising() - static const uint16_t adv_interval_min=160; // x0.625 = 100ms - default is 640 -> 400ms - static const uint16_t adv_interval_max=480; // x0.625 = 300ms - default is 640 -> 400ms - static const AD_PDU_Type adv_type=AD_PDU_Type::ADV_IND; - static const uint8_t adv_chan_map=0x07; - static const uint8_t filter_policy=0x00; - - eir.setConnInterval(8, 12); // 10ms - 15ms - - -Client: -======== - -BTAdapter::startDiscovery(): - static DiscoveryPolicy discoveryPolicy = DiscoveryPolicy::PAUSE_CONNECTED_UNTIL_READY; // default value - static bool le_scan_active = true; // default value - static const uint16_t le_scan_interval = 24; // 15ms, default value - static const uint16_t le_scan_window = 24; // 15ms, default value - static const uint8_t filter_policy = 0; // default value - - adapter->startDiscovery( discoveryPolicy, le_scan_active, le_scan_interval, le_scan_window, filter_policy ); - - -BTDevice::connectLE(): - static const uint16_t le_scan_interval = 24; // 15ms, default value - static const uint16_t le_scan_window = 24; // 15ms, default value - - uint16_t conn_interval_min = (uint16_t)8; // 10ms - uint16_t conn_interval_max = (uint16_t)12; // 15ms - const uint16_t conn_latency = (uint16_t)0; - - const uint16_t supervision_timeout = (uint16_t) getHCIConnSupervisorTimeout(conn_latency, (int) ( conn_interval_max * 1.25 ) /* ms */); - device->connectLE(le_scan_interval, le_scan_window, conn_interval_min, conn_interval_max, conn_latency, supervision_timeout); - - - |