Skip to content

Commit

Permalink
FW: only BLE central device should request coded
Browse files Browse the repository at this point in the history
  • Loading branch information
dlktdr committed Aug 20, 2024
1 parent adf6d5c commit 2925523
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
4 changes: 2 additions & 2 deletions firmware/src/src/ble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ void bt_Thread()

switch (curmode) {
case BTPARAHEAD:
BTHeadExecute();
BTHeadExecute(); // Peripheral BLE device
break;
case BTPARARMT:
BTRmtExecute();
BTRmtExecute(); // Central BLE device
break;
case BTSCANONLY:
break;
Expand Down
9 changes: 0 additions & 9 deletions firmware/src/src/btparahead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,6 @@ static struct bt_conn_cb conn_callbacks = {
//.security_changed = securitychanged
};

static struct bt_conn_le_phy_param phy_params = {
.options = BT_CONN_LE_PHY_OPT_CODED_S8,
.pref_tx_phy = BT_GAP_LE_PHY_CODED,
.pref_rx_phy = BT_GAP_LE_PHY_CODED,
};

static bt_addr_le_t addrarry[CONFIG_BT_ID_MAX];
static size_t addrcnt = 1;

Expand Down Expand Up @@ -380,9 +374,6 @@ static void connected(struct bt_conn *conn, uint8_t err)
// Set Connection Parameters - Request updated rate
bt_conn_le_param_update(curconn, conparms);

LOG_INF("Requesting coded PHY - %s",
bt_conn_le_phy_update(curconn, &phy_params) ? "FAILED" : "Success");

// Start a Timer, If we don't see a Security Change within this time
// e.g. a CC2540 chip then force a subscription for the PARA chip
k_timer_start(&my_timer, K_SECONDS(2), K_SECONDS(0));
Expand Down

0 comments on commit 2925523

Please sign in to comment.