want to know how can i judge that the variation is caused in the connection interval, connection supervision timeout, slave latency once i have flashed ble_app_template code in nrf52832 s132.
want to know how can i judge that the variation is caused in the connection interval, connection supervision timeout, slave latency once i have flashed ble_app_template code in nrf52832 s132.
no karl, putting in ble_App_template or ble_blinky code doesnt show up advertsing
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(3000, UNIT_1_25_MS)
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(3000, UNIT_1_25_MS)
Karl Ylvisaker said:If you do not see the device advertise after the change you will need to proceed with regular debugging techniques.
- Does your application build and flash without errors or warnings?
- Is there any indication that your program is running as it should, or to the contrary?
- What does your logger output when you attempt to run your program? Are there any LEDS or other peripheral indicating that the program is executed as expected?
- Are you able to open a debug session? Does the programcounter get stuck anywhere in your program, or end up someplace unexpectedly?
If you make sure to add DEBUG in your preprocessor defines, like shown in the included image, the logger will output a detailed error message whenever a non-NRF_SUCCESS error code is passed to an APP_ERROR_CHECK.
Please answer the questions and perform the steps in my previous comment so we may proceed with the debugging of your issue.
Best regards,
Karl
Does your application build and flash without errors or warnings?
-Yes
Is there any indication that your program is running as it should, or to the contrary?
-I have ran ble_blinky code/ ble_App tempalate which on advertsing ideally blinks with Nordic Blinky / Nordic template name
What does your logger output when you attempt to run your program? Are there any LEDS or other peripheral indicating that the program is executed as expected
-blinky code
Are you able to open a debug session? Does the program counter get stuck anywhere in your program, or end up someplace unexpectedly
-no
in nordic blinky code nrf sdk v17 s132 on dev kit nrf52832 ideally:
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(7.5, UNIT_1_25_MS) /**< Minimum acceptable connection interval (0.5 seconds). */
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS) /**< Maximum acceptable connection interval (1 second). */
then the code runs and flashes adv name with led blinking.
I am working on ble power optimization. I want to change the connection parameters and check the current consumption.
As suggested by you in above discussion Connection interval had to be set like:
----For 100ms Connection Interval
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS) /**< Minimum acceptable connection interval (0.5 seconds). */
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS) /**< Maximum acceptable connection interval (1 second). */
----For 1000 ms Connection Interval
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS) /**< Minimum acceptable connection interval (0.5 seconds). */
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS) /**< Maximum acceptable connection interval (1 second). */
But the max range of Connection interval from ble specs is 7.5 to 4000ms.
so, when i set
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(2000 or 3000 or 4000, UNIT_1_25_MS) /**< Minimum acceptable connection interval (0.5 seconds). */
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(2000 or 3000 or 4000, UNIT_1_25_MS) /**< Maximum acceptable connection interval (1 second). */
the device doesnt advertise anything??
Hello,
I just tried this with the Blinky example on my end, and it works as expected.
Could you confirm for me whether you are updating your connection supervision timeout in accordance with these new connection interval parameters?
The supervision timeout must uphold the conn_sup_timeout * 4 > (1+ slave_latency)*max_conn_interval constraint.
If this is not upheld you will get an NRF_ERROR_INVALID_PARAMS or similar. In your case, that means that a 2000 ms interval will need more than 8000 ms supervision timeout, with a slave latency of 0.
Though, if this was the case I would expect the program counter to go to the APP_BREAKPOINT_COND unexpectedly, so if you are not seeing this happening that might be something to look into.
@note If both conn_sup_timeout and max_conn_interval are specified, then the following constraint applies: conn_sup_timeout * 4 > (1 + slave_latency) * max_conn_interval that corresponds to the following Bluetooth Spec requirement: The Supervision_Timeout in milliseconds shall be larger than (1 + Conn_Latency) * Conn_Interval_Max * 2, where Conn_Interval_Max is given in milliseconds.
i have set max min Connection interval as 2000 and supervision tiemout as 8000ms. This in blinky code worked. But when i am setting max min CI as 4000ms it is not working.
Also, i am not getting what is this connection supervision timeout.