Hi,
I am working on the nRF52832 ,If i want my data to be transmit every 7.5ms then what should I set the minimum connection interval and maximum connection interval ? please suggest me
Thanks & Regards
pspavi
Hi,
I am working on the nRF52832 ,If i want my data to be transmit every 7.5ms then what should I set the minimum connection interval and maximum connection interval ? please suggest me
Thanks & Regards
pspavi
Hi
A low connection interval will enable your device to send packets more frequently. To modify the connection interval in any BLE example adjust the following constants that are located at the top of the project's main.c file (see snippet below). If you need the connection interval to be a specific value (7.5ms for instance) you can set both the minimum and maximum value to this.
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS) /**< Minimum acceptable connection interval (0.1 seconds). */ #define MAX_CONN_INTERVAL MSEC_TO_UNITS(200, UNIT_1_25_MS) /**< Maximum acceptable connection interval (0.2 second). */
Best regards,
Simon
Thank you simonr.
The above snippet for 7.5ms Configuration right. How these are calculated? Can you explain , because I want to send the data on three different configuration 7.5ms , 10ms, 20ms
Thanks &Regards
Pspavi
If i set above minimum and maximum connection interval i am getting fatal error . while debugging i am getting the ble_advertising_start function error
The snippet I provided does not set the connection interval to 7.5ms. In that specific snippet the connection interval it sets MIN_CONN_INTERVAL to 100ms, and MAX_CONN_INTERVAL to 200ms. You have to change the parameter in MSEC_TO_UNITS(100, UNIT_1_25_MS) to the amount of ms you would like to have in your application.
What kind of error code is returning from the ble_advertising_start() function?
Best regards,
Simon
Thanks alot simonr .It worked but i am not getting the same interval between the two events plus or minus 3 varying .
even i have set min and max connection interval same .
MIN_CONN_INTERVAL to 9 ms, and MAX_CONN_INTERVAL to 9 ms.