This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

How to set the code in continuous advertising mode?

Hi,

I am using the sample ble_gls code from Nordic. Currently it advertises for 180 sec and than resets or goes into sleep mode. If i want to advertise continuously what are the changes that i need to make. I have set APP_ADV_TIMEOUT_IN_SECONDS to 0. Also i have changed advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE; in advertising init function. Are there any more changes that i need yo make?

Thanks

  • You can also set the interval down to 20 ms which is the lowest interval allowed.

  • Thanks for your reply. But the issue i am facing is after i make the changes as described in the query, MCP is not able to scan for the device. Hence, to make my peripheral ble_gls code work what all other changes i need to make.

  • I tested the ble_app_gls_s110 example in SDK 10 with #define APP_ADV_INTERVAL 32 (units of 0.625, equals 20ms), #define APP_ADV_TIMEOUT_IN_SECONDS 0 and advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;. I am able to scan the device and connect to it using MCP.

  • Well i was testing with SDK 8. Let me check with SDK 10. Will check and get back to you.

  • Hi,

    Thanks. I was using SDK version 8.1.0. This version had issues with continuous advertising. It had been fixed in version 9.0.0.