aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-06-01 06:26:31 +0200
committerSven Gothel <[email protected]>2020-06-01 06:26:31 +0200
commit0617cb3c695f709a5488987dcd464d5d03c72d5c (patch)
tree4517bd783be0bc27e5a1852add5fbf3cad29af7d /api
parente462d079db0a3f77a631016a557cfceea3506307 (diff)
Specify le_create_connection arguments (API doc) and set default le_scan_* to 30ms from 2.5ms
Diffstat (limited to 'api')
-rw-r--r--api/direct_bt/DBTDevice.hpp12
-rw-r--r--api/direct_bt/HCIComm.hpp14
2 files changed, 19 insertions, 7 deletions
diff --git a/api/direct_bt/DBTDevice.hpp b/api/direct_bt/DBTDevice.hpp
index 724aa529..325ed9c5 100644
--- a/api/direct_bt/DBTDevice.hpp
+++ b/api/direct_bt/DBTDevice.hpp
@@ -180,17 +180,17 @@ namespace direct_bt {
*
* @param peer_mac_type
* @param own_mac_type
- * @param le_scan_interval default value 0x0004
- * @param le_scan_window default value 0x0004
- * @param conn_interval_min default value 0x000F
- * @param conn_interval_max default value 0x000F
- * @param conn_latency default value 0x0000
+ * @param le_scan_interval in units of 0.625ms, default value 48 for 30ms, min value 4 for 2.5ms -> 0x4000 for 10.24s
+ * @param le_scan_window in units of 0.625ms, default value 48 for 30ms, min value 4 for 2.5ms -> 0x4000 for 10.24s. Shall be <= le_scan_interval
+ * @param conn_interval_min in units of 1.25ms, default value 15 for 19.75ms
+ * @param conn_interval_max in units of 1.25ms, default value 15 for 19.75ms
+ * @param conn_latency slave latency in units of connection events, default value 0
* @param supervision_timeout in units of 10ms, default value 1000 for 10000ms or 10s.
* @return
*/
uint16_t connectLE(const HCIAddressType peer_mac_type=HCIAddressType::HCIADDR_LE_PUBLIC,
const HCIAddressType own_mac_type=HCIAddressType::HCIADDR_LE_PUBLIC,
- const uint16_t le_scan_interval=0x0004, const uint16_t le_scan_window=0x0004,
+ const uint16_t le_scan_interval=48, const uint16_t le_scan_window=48,
const uint16_t conn_interval_min=0x000F, const uint16_t conn_interval_max=0x000F,
const uint16_t conn_latency=0x0000, const uint16_t supervision_timeout=HCI_LE_CONN_TIMEOUT_MS/10);
diff --git a/api/direct_bt/HCIComm.hpp b/api/direct_bt/HCIComm.hpp
index 2f5e4dc1..2f7d1800 100644
--- a/api/direct_bt/HCIComm.hpp
+++ b/api/direct_bt/HCIComm.hpp
@@ -216,11 +216,23 @@ namespace direct_bt {
* <p>
* Set window to the same value as the interval, enables continuous scanning.
* </p>
+ *
+ * @param handle_return
+ * @param peer_bdaddr
+ * @param peer_mac_type
+ * @param own_mac_type
+ * @param le_scan_interval in units of 0.625ms, default value 48 for 30ms, min value 4 for 2.5ms -> 0x4000 for 10.24s
+ * @param le_scan_window in units of 0.625ms, default value 48 for 30ms, min value 4 for 2.5ms -> 0x4000 for 10.24s. Shall be <= le_scan_interval
+ * @param conn_interval_min in units of 1.25ms, default value 15 for 19.75ms
+ * @param conn_interval_max in units of 1.25ms, default value 15 for 19.75ms
+ * @param conn_latency slave latency in units of connection events, default value 0
+ * @param supervision_timeout in units of 10ms, default value 1000 for 10000ms or 10s.
+ * @return
*/
HCIErrorCode le_create_conn(uint16_t * handle_return, const EUI48 &peer_bdaddr,
const HCIAddressType peer_mac_type=HCIAddressType::HCIADDR_LE_PUBLIC,
const HCIAddressType own_mac_type=HCIAddressType::HCIADDR_LE_PUBLIC,
- const uint16_t le_scan_interval=0x0004, const uint16_t le_scan_window=0x0004,
+ const uint16_t le_scan_interval=48, const uint16_t le_scan_window=48,
const uint16_t conn_interval_min=0x000F, const uint16_t conn_interval_max=0x000F,
const uint16_t conn_latency=0x0000, const uint16_t supervision_timeout=HCI_LE_CONN_TIMEOUT_MS/10);