This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to implement "Fast advertising" with SDK 14.10

Hi All

I'd like to implement "Fast advertising" with SDK14.10

Q1: I add some code in advertising_data_set() to do fast advertising, is that correct ?

Q2: If  want to test current consumption under different  conditions (in red box) these conditions is work for test ?

 

thank's 

Louis

Parents
  • Hi RMV,

    There should not be any problem using just slow advertising. Can you share your code so that I see what you have done, and clarify from which function call you get which error code?

    Hi Einar,

    Unfortunately I have worked around this issue by, like you say, just setting the values for my slow profile in the fast mode of the advertising module.

    I think it should be easy to reproduce what I am seeing. If this does not reproduce any runtime failures then I may need some time to set up the use case for you again.....

    Just cook up a basic advertising scenario and customize as listed below
    1. Set all values in the 'fast' data field/substructure to 0 i.e. fast_mode is disabled, and all the intervals are '0'.
    2. Set the 'slow' field/substructure to 'enable', and fill in some reasonable (non-zero) values for the various intervals.
    3. Make a call to 'start' the advertisement in 'SLOW' mode)

    If I recall (not sure at this time since I am not running into this issue now) you should observe that the device fails to launch the advertisement -- unless I am mistaken the call to 'start' the advertisement is where I recall the return value was indicating the 'invalid_parameter' (i.e. 7?)

    Cheers
    RMV

  • Hi RMV,

    Ah, you are right. I had forgot about this. The implementation in ble_advertising.c assumes that fast advertising is always used, so you need to specify config.ble_adv_fast_interval and config.ble_adv_fast_timeout in the struct (ble_advertising_init_t) you pass to ble_advertising_init().

    This constitutes a bug, but the workaround you did is perfectly good though, as there is no difference between fast and slow advertising except for the internal concept of the advertising module. So as unfortunately using only slow does not work (without a slightly ugly hack of configuring both fast and low to the same value), then using only fast will give you the exact same behavior.

    Einar

Reply Children
No Data
Related