Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
[toble] Increase GATT table.
Browse files Browse the repository at this point in the history
  • Loading branch information
turon committed Oct 21, 2019
1 parent 7bf7051 commit cf56071
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,19 @@ int main(void)

{
uint32_t appRAMStart = 0;
ble_cfg_t bleCfg;

// Configure the BLE stack using the default settings.
// Fetch the start address of the application RAM.
ret = nrf_sdh_ble_default_cfg_set(WEAVE_DEVICE_LAYER_BLE_CONN_CFG_TAG, &appRAMStart);
APP_ERROR_CHECK(ret);

// Increase the GATT table size to allow room for both WoBLE and ToBLE services.
memset(&bleCfg, 0, sizeof(bleCfg));
bleCfg.gatts_cfg.attr_tab_size.attr_tab_size = NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE * 2;
ret = sd_ble_cfg_set(BLE_GATTS_CFG_ATTR_TAB_SIZE, &bleCfg, appRAMStart);
APP_ERROR_CHECK(ret);

// Enable BLE stack.
ret = nrf_sdh_ble_enable(&appRAMStart);
APP_ERROR_CHECK(ret);
Expand Down

0 comments on commit cf56071

Please sign in to comment.