Merge pull request #40 from se7ensong/OTA_fix

Fix OTA using nRF toolbox on iPhone (tested on SE and XS)
This commit is contained in:
hathach 2019-01-31 22:35:12 +07:00 committed by GitHub
commit 7ec0ff51f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -885,6 +885,22 @@ static void on_ble_evt(ble_evt_t * p_ble_evt)
APP_ERROR_CHECK( sd_ble_gap_data_length_update(m_conn_handle, NULL, NULL) );
break;
case BLE_GAP_EVT_PHY_UPDATE_REQUEST:
{
// ble_gap_phys_t* req_phy = &evt->evt.gap_evt.params.phy_update_request.peer_preferred_phys;
// Tell SoftDevice to choose PHY automatically
ble_gap_phys_t phy = { BLE_GAP_PHY_AUTO, BLE_GAP_PHY_AUTO };
(void) sd_ble_gap_phy_update(m_conn_handle, &phy);
}
break;
case BLE_GAP_EVT_PHY_UPDATE:
{
// ble_gap_evt_phy_update_t* active_phy = &evt->evt.gap_evt.params.phy_update;
}
break;
case BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST:
{
uint16_t att_mtu = MIN(p_ble_evt->evt.gatts_evt.params.exchange_mtu_request.client_rx_mtu, BLEGATT_ATT_MTU_MAX);

View File

@ -66,7 +66,7 @@
#define HCI_MEM_POOL_ENABLED 1
#define HCI_TX_BUF_SIZE 600
#define HCI_RX_BUF_SIZE 600
#define HCI_RX_BUF_QUEUE_SIZE 4
#define HCI_RX_BUF_QUEUE_SIZE 8
//==========================================================
// <e> UART_ENABLED - nrf_drv_uart - UART/UARTE peripheral driver