Skip to content

Commit 33a77d1

Browse files
committed
nRF52 Central: Lower min connection interval from 20->7.5ms, max 200->1000ms (allows some extra devices to be connected to)
1 parent 5b6fe1d commit 33a77d1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
Bangle.js2: Fix issue using touch handler with Bangle.setUI({mode:"updown",...}) (fix #2648)
1010
Bangle.js2: Menus now buzz when back button pressed or icon tapped (fix #2642)
1111
JIT: When referencing a built-in member function of a built-in (Math.*, E.*, PIN_NAME.*, etc) include address rather than looking up (#2398)
12+
nRF52 Central: Lower min connection interval from 20->7.5ms, max 200->1000ms (allows some extra devices to be connected to)
1213

1314
2v27 : nRF5x: Ensure Bluetooth notifications work correctly when two separate connections use the same handle for their characteristics
1415
nRF5x: Remove handlers from our handlers array when a device is disconnected

targets/nrf5x/bluetooth.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3553,11 +3553,11 @@ void jsble_central_connect(ble_gap_addr_t peer_addr, JsVar *options) {
35533553
memset(&gap_conn_params, 0, sizeof(gap_conn_params));
35543554
BLEFlags flags = jsvGetIntegerAndUnLock(jsvObjectGetChildIfExists(execInfo.hiddenRoot, BLE_NAME_FLAGS));
35553555
if (flags & BLE_FLAGS_LOW_POWER) {
3556-
gap_conn_params.min_conn_interval = MSEC_TO_UNITS(500, UNIT_1_25_MS); // Minimum acceptable connection interval (500 ms)
3557-
gap_conn_params.max_conn_interval = MSEC_TO_UNITS(1000, UNIT_1_25_MS); // Maximum acceptable connection interval (1000 ms)
3556+
gap_conn_params.min_conn_interval = MSEC_TO_UNITS(500, UNIT_1_25_MS); // Minimum acceptable connection interval (500 ms)
3557+
gap_conn_params.max_conn_interval = MSEC_TO_UNITS(1000, UNIT_1_25_MS); // Maximum acceptable connection interval (1000 ms)
35583558
} else {
3559-
gap_conn_params.min_conn_interval = MSEC_TO_UNITS(20, UNIT_1_25_MS); // Minimum acceptable connection interval (20 ms)
3560-
gap_conn_params.max_conn_interval = MSEC_TO_UNITS(200, UNIT_1_25_MS); // Maximum acceptable connection interval (200 ms)
3559+
gap_conn_params.min_conn_interval = MSEC_TO_UNITS(7.5, UNIT_1_25_MS); // Minimum acceptable connection interval (7.5 ms)
3560+
gap_conn_params.max_conn_interval = MSEC_TO_UNITS(1000, UNIT_1_25_MS); // Maximum acceptable connection interval (1000 ms)
35613561
}
35623562
gap_conn_params.slave_latency = SLAVE_LATENCY_CENTRAL;
35633563
gap_conn_params.conn_sup_timeout = CONN_SUP_TIMEOUT;

0 commit comments

Comments
 (0)