remove configServiceChanged()

since disable service change will cause issue with DFU OTA (inconsisten
att handle of dfu service)
This commit is contained in:
hathach committed 2018-05-25 14:09:06 +07:00
1 parent 0603230f65
commit 9419606df0
3 files changed
+2 -14

No files matched your search

@@ -40,7 +40,7 @@ void startAdv(void)
/* Start Advertising
* - Enable auto advertising if disconnected
* - Interval: fast mode = 20 ms, slow mode = 152.5 ms
* - Timeout for fast mode is 30 seconds
* - Timeout for fast mode is 30 seconds
* - Start(timeout) with timeout = 0 will advertise forever (until connected)
*
* For recommended advertising interval
+1 -11
View File
@@ -94,7 +94,6 @@ AdafruitBluefruit::AdafruitBluefruit(void)
_sd_cfg.attr_table_size = 0x800;
_sd_cfg.uuid128_max = BLE_UUID_VS_COUNT_DEFAULT;
_sd_cfg.service_changed = 0;
_prph_count = 0;
@@ -123,11 +122,6 @@ COMMENT_OUT(
)
}
void AdafruitBluefruit::configServiceChanged(bool changed)
{
_sd_cfg.service_changed = (changed ? 1 : 0);
}
void AdafruitBluefruit::configUuid128Count(uint8_t uuid128_max)
{
_sd_cfg.uuid128_max = uuid128_max;
@@ -284,7 +278,7 @@ err_t AdafruitBluefruit::begin(uint8_t prph_count, uint8_t central_count)
// VERIFY_STATUS( sd_ble_cfg_set(BLE_GAP_CFG_DEVICE_NAME, &blecfg, ram_start) );
varclr(&blecfg);
blecfg.gatts_cfg.service_changed.service_changed = _sd_cfg.service_changed;
blecfg.gatts_cfg.service_changed.service_changed = 1; // must be enabled to be consistent with DFU in OTA mode
VERIFY_STATUS ( sd_ble_cfg_set(BLE_GATTS_CFG_SERVICE_CHANGED, &blecfg, ram_start) );
// ATTR Table Size
@@ -615,10 +609,6 @@ void AdafruitBluefruit::printInfo(void)
Serial.printf(title_fmt, "ATTR Table Size");
Serial.println(_sd_cfg.attr_table_size);
// Service Changed
Serial.printf(title_fmt, "Service Changed");
Serial.println(_sd_cfg.service_changed);
if ( _prph_count )
{
Serial.println("Peripheral Connect Setting");
-2
View File
@@ -120,7 +120,6 @@ class AdafruitBluefruit
/* SoftDevice Configure Functions, must call before begin().
* These function affect the SRAM consumed by SoftDevice.
*------------------------------------------------------------------*/
void configServiceChanged (bool changed);
void configUuid128Count (uint8_t uuid128_max);
void configAttrTableSize (uint32_t attr_table_size);
@@ -191,7 +190,6 @@ class AdafruitBluefruit
/*------------- SoftDevice Configuration -------------*/
struct {
uint32_t attr_table_size;
uint8_t service_changed;
uint8_t uuid128_max;
}_sd_cfg;