Physical Layer LE 1Mbps 고정

This commit is contained in:
2026-05-27 14:45:29 +09:00
parent b81ae1a868
commit 8f269776ed
@@ -1069,7 +1069,7 @@ static void peer_manager_init(void)
* Key events handled: * Key events handled:
* - DISCONNECTED: connection lost -> device sleep, state reset * - DISCONNECTED: connection lost -> device sleep, state reset
* - CONNECTED: connection established -> assign QWR handle, set TX power +8dBm * - CONNECTED: connection established -> assign QWR handle, set TX power +8dBm
* - PHY_UPDATE_REQUEST: auto-accept PHY update * - PHY_UPDATE_REQUEST: keep link on 1M PHY
* - TIMEOUT: connection/GATT timeout -> force disconnect * - TIMEOUT: connection/GATT timeout -> force disconnect
* - SEC_PARAMS_REQUEST: security parameter request (reject if security unused) * - SEC_PARAMS_REQUEST: security parameter request (reject if security unused)
* - PASSKEY_DISPLAY: display passkey (debug log) * - PASSKEY_DISPLAY: display passkey (debug log)
@@ -1155,40 +1155,22 @@ static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_CONN, m_conn_handle, 4); sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_CONN, m_conn_handle, 4);
// Request 2M PHY (falls back to 1M automatically if unsupported)
{
ble_gap_phys_t const phys = {
.rx_phys = BLE_GAP_PHY_2MBPS,
.tx_phys = BLE_GAP_PHY_2MBPS,
};
err_code = sd_ble_gap_phy_update(m_conn_handle, &phys);
APP_ERROR_CHECK(err_code);
}
led_set_state(LED_STATE_OFF); /* Connection complete -> LED OFF */ led_set_state(LED_STATE_OFF); /* Connection complete -> LED OFF */
break; break;
case BLE_GAP_EVT_PHY_UPDATE_REQUEST: case BLE_GAP_EVT_PHY_UPDATE_REQUEST:
{ {
/* Product is certified/tested as fixed 1M PHY. */
ble_gap_phys_t const phys = { ble_gap_phys_t const phys = {
.rx_phys = BLE_GAP_PHY_AUTO, .rx_phys = BLE_GAP_PHY_1MBPS,
.tx_phys = BLE_GAP_PHY_AUTO, .tx_phys = BLE_GAP_PHY_1MBPS,
}; };
err_code = sd_ble_gap_phy_update(p_ble_evt->evt.gap_evt.conn_handle, &phys); err_code = sd_ble_gap_phy_update(p_ble_evt->evt.gap_evt.conn_handle, &phys);
APP_ERROR_CHECK(err_code); APP_ERROR_CHECK(err_code);
} }
break; break;
case BLE_GAP_EVT_PHY_UPDATE:
{
ble_gap_evt_phy_update_t const * p_phy = &p_ble_evt->evt.gap_evt.params.phy_update;
DBG_PRINTF("[BLE] PHY updated: TX=%s, RX=%s\r\n",
p_phy->tx_phy == BLE_GAP_PHY_2MBPS ? "2M" : "1M",
p_phy->rx_phy == BLE_GAP_PHY_2MBPS ? "2M" : "1M");
}
break;
case BLE_GATTC_EVT_TIMEOUT: case BLE_GATTC_EVT_TIMEOUT:
case BLE_GATTS_EVT_TIMEOUT: case BLE_GATTS_EVT_TIMEOUT:
DBG_PRINTF("[BLE] GATT Timeout -> disconnect\r\n"); DBG_PRINTF("[BLE] GATT Timeout -> disconnect\r\n");