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

BLE init Advertising

Hi.

I'm developing a ble module now.

I have a question about time out, interval among BLE init Advertising.

As shown in the picture below, time out (in units of 10ms) is set to Advertise for 2 minutes, and interval is set to 60.

I want to do Advertising continuously, but it stops after 2 minutes.

Question 1. Does the event occur separately after 2 minutes as set by timeout?
Question 2. What is the unit of interval?
Question 3. I want to turn on Advertising without turning it off, do I need to change the mode or need another setting?

Thank you for reading it.

  • Hello,

    Question 1. Does the event occur separately after 2 minutes as set by timeout?

     I am not exactly sure what you are asking here. The advertising timeout event happens after 2 minutes with the configuration you have sent above, because of the timeout configuration. The timeout is given in units of 10 ms, and is in your case set to 12000, which translates to 2 minutes.

    Question 2. What is the unit of interval?

    The advertising intervals are given in units of 625 us. It seems this is not mentioned in the documentation for the ble_adv_modes_config_t documentation, unfortunately.

    Question 3. I want to turn on Advertising without turning it off, do I need to change the mode or need another setting?

    To advertise without a timeout you will need to change the following in your configuration:

    adv_params.advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    ..
    adv_params.config.ble_adv_fast_timeout = 0;

    Advertising without timeout is demonstrated in the ble_app_beacon example, which could be helpful for you to have a look at. In the example, a beacon is created, and its advertisements never time out.
    Try this, and let me know if you achieve the desired functionality.

    Please do not hesitate to ask if you should encounter any other issues or questions!

    Best regards,
    Karl

  • Wow, thank you so much for your reply.

    BLE on constantly working well

    Thank you so much.

  • Minseo said:

    Wow, thank you so much for your reply.

    BLE on constantly working well

    I am happy to hear that you found my comment helpful, and that it is now working as you had intended!

    Minseo said:
    Thank you so much.

    No problem at all! :) 

    Please do not hesitate to open a new ticket if you should encounter any issues or questions in the future.

    Good luck with your development!

    Best regards,
    Karl

  • Hi,

    i wanna ask if you could post all the software so i can easily benefit from it, cause i'm struggling with a project same as yours.

    thank you in advance.

  • Hello,

    I dont think there is any particular software to share in this case, since the questions from the original post primarily revolves around what the different parameters do and how to use them. Please also keep in mind that this post is 3 years old already, and relates to our older nRF5 SDK.

    If your require further technical support with this issue then I highly recommend that you open a new ticket here on DevZone.
    If you do this, please elaborate thoroughly on the functionality you are trying to implement and the issues you are encountering.

    Best regards,
    Karl

Related