This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Conditional advertising

Hi.

In order to save battery in an "advertising only"  peripheral, would it be possible for this module to remain in sleep status and start advertising (for a preset period, though) only when it detects a central module scanning for peripherals?  Thanks.

  • Hello,

    would it be possible for this module to remain in sleep status and start advertising (for a preset period, though) only when it detects a central module scanning for peripherals?  Thanks.

    No, this is not possible since it would require that the peripheral constantly uses the RADIO peripheral to listen for central scan requests (which are directed at other devices, since itself is not advertising yet).
    This would consume more energy than regular advertising.

    Could it be an option to have the advertising started by an external event, such as a button press or sensor reading, instead? Alternatively, what is your application's requirements / constraints in regards to power consumption? 
    You could use the Online Power Profiler to estimate the power consumption of different advertising configurations, and to see how the different parameters affects your consumption.

    Best regards,
    Karl

  • Hi Karl.

    Thanks for your prompt answer, but just to make sure, let me, please ask you a few more questions.


    As I told you, my goal is to save even more battery in a permanently transmitting module, and I understand that online profiling would help with this, but before using this tool, I would like to have my ideas a bit more clear.


    Right now, to increase battery life, I trade with the radiated power and the advertising frequency with reasonably good results. Still, before I order sample PCBs, I want to make sure I can't get any better regarding battery consumption. So my douts are:


    1.- I understand that a module radio permanently advertising (therefore transmitting) consumes more battery than permanently scanning (therefore receiving). Am I right?
    2.- I also understand that advertising packets, if you don't connect with the central module, are simply broadcasted, so no being addressed to any particular module. Okey?

    So:

    3.- Would it be possible for the advertising module to set itself as a central scanning module A and the central module B as a permanently advertising module ONLY until module A detects the presence of B? Then, module A would set itself as a peripheral (for a preset period, though) and module B as a scanning module (for the same preset period).

    Would this make sense for you?

    Best regards, 

    Juan

  • Hello again, Juan

    p143 said:
    1.- I understand that a module radio permanently advertising (therefore transmitting) consumes more battery than permanently scanning (therefore receiving). Am I right?

    Not quite, because scanning is a continuous process within the configured scan window - meaning that the radio will be active continuously for the duration of the scan window - while advertisings only have the radio active for a limited time once during the advertising interval. There are many configurations you could change to reduce the advertising's power consumption as well, such as advertising mode, interval and duration.
    So, advertising is in the general case less power consuming than scanning.

    p143 said:
    2.- I also understand that advertising packets, if you don't connect with the central module, are simply broadcasted, so no being addressed to any particular module. Okey?

    This is also configurable - if you use directed advertising then you are looking for a specific central device to connect. All advertisements are visible to all nearby BLE devices, however.

    p143 said:
    3.- Would it be possible for the advertising module to set itself as a central scanning module A and the central module B as a permanently advertising module ONLY until module A detects the presence of B? Then, module A would set itself as a peripheral (for a preset period, though) and module B as a scanning module (for the same preset period).

    I think my answer to the first question might have negated the need for this question, since the assumption that scanning comes with a lesser power consumption was not valid.
    In short; you could have done this like you proposed, but it would waste a lot of power for very little / no gain.

    Please do not hesitate to ask if any part of my answer should be unclear, so that I may elaborate.

    Best regards,
    Karl

  • Hi Karl.

    In your last comment, you mention, "There are many configurations you could change to reduce the advertising's power consumption as well, such as advertising mode... ".
    In my project, I am permanently advertising, and my APP_ADV_INTERVAL is 128. My init.advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    May I ask you which "mode" you would suggest to save even more battery?
    Thanks.
    Best regards,

    Juan

  • Hello Juan,

    p143 said:
    May I ask you which "mode" you would suggest to save even more battery?

    By modes I was here referring to the different advertising modes of the Advertising library - The 'slow' is the least energy consuming of these.
    Other than that, the two most significant parameters to save power in your continuous advertising is advertising interval and payload. These dictate the time between each radio usage, and the length of the usage, respectively.

    You should also make sure to power down as many peripherals as possible while your device is sleeping for a prolonged period, if you do not need them.

    Best regards,
    Karl

Related