Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-11753

Advertisements with Limited Discoverable Flag not terminating within lim_adv_timeout (180 s)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • SimpleLink Lowpower SDK F3 BLE5 Stack
    • BLE_LOKI-1146
    • BLE Stack BLE5-3.2.4 RC3
    • BLE Stack BLE5-3.3.1
    • CC2340R5
    • Hide
      In GapAdv_enable function, check if the discoverable mode is set to "limited".
      If so, check that enableOptions = GAP_ADV_ENABLE_OPTIONS_USE_DURATION or GAP_ADV_ENABLE_OPTIONS_USE_MAX_EVENTS.

      1. if enableOptions = GAP_ADV_ENABLE_OPTIONS_USE_DURATION:
      in this case durationOrMaxEvents param represents duration for advertising.
      therefore, we check that the given duration is no longer then 180 seconds.
      if its longer then 180s, we will return an error "bleInvalidRange".

      2. if enableOptions = GAP_ADV_ENABLE_OPTIONS_USE_MAX_EVENTS:
      in this case durationOrMaxEvents param represents num of advertising events to perform.
      therefore, we need to calculate the duration of performing this number of adv events, with the given interval.
      also, we need to take advDelay into account (advDelay is set randomly in each adv event and its value is 0..10 [ms]).
      we will focus on the worst case when advDelay is 10ms.
      so the final value to compare will be: (interval + max_delay) * durationOrMaxEvents.
      if this value is longer the 180s, we will return an error "bleInvalidRange".

      Fixes related to Sysconfig:
      1. added a checker which make sure the advertising flags given by the user are legal (for example General & Limited can't be set together, according to the spec.
      2. added some comments which guide the user about how to use the parameters that are passed to gap_advenable function when using Limited Discoverable Mode.
      Show
      In GapAdv_enable function, check if the discoverable mode is set to "limited". If so, check that enableOptions = GAP_ADV_ENABLE_OPTIONS_USE_DURATION or GAP_ADV_ENABLE_OPTIONS_USE_MAX_EVENTS. 1. if enableOptions = GAP_ADV_ENABLE_OPTIONS_USE_DURATION: in this case durationOrMaxEvents param represents duration for advertising. therefore, we check that the given duration is no longer then 180 seconds. if its longer then 180s, we will return an error "bleInvalidRange". 2. if enableOptions = GAP_ADV_ENABLE_OPTIONS_USE_MAX_EVENTS: in this case durationOrMaxEvents param represents num of advertising events to perform. therefore, we need to calculate the duration of performing this number of adv events, with the given interval. also, we need to take advDelay into account (advDelay is set randomly in each adv event and its value is 0..10 [ms]). we will focus on the worst case when advDelay is 10ms. so the final value to compare will be: (interval + max_delay) * durationOrMaxEvents. if this value is longer the 180s, we will return an error "bleInvalidRange". Fixes related to Sysconfig: 1. added a checker which make sure the advertising flags given by the user are legal (for example General & Limited can't be set together, according to the spec. 2. added some comments which guide the user about how to use the parameters that are passed to gap_advenable function when using Limited Discoverable Mode.

      Description of issue: The device is still advertising after 180+ seconds which is not compliant with BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 3, Part C, ยง9.2.3.2. The application should ensure the advertising set is disabled after 180 seconds.

      Steps to reproduce (using basic_ble): Using SysConfig, enable the Limited Discoverable Flag.

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: