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

How will we change the minimum and maximum connection interval in ble advertising code,once the device gets connected with the central device?

hi, I am working on nrf51822 chip and using sdk11.0.0 sdk,softdevice (s130 2.0.1) .I want to send 4Kb of data in a packet from the central device and on the other side my peripheral device will receive the data in a packet of 20 bytes. When I am setting the minimum connection interval to 500 and maximum connection interval to 1000 in the ble_ app_uart advertising code ,the rate of receiving the data slows done given below.

 #define MIN_CONN_INTERVAL               MSEC_TO_UNITS(500, UNIT_1_25_MS)            
 /**< Minimum acceptable connection interval (20 ms), Connection interval uses 1.25 ms units. */

 #define MAX_CONN_INTERVAL              	MSEC_TO_UNITS(1000, UNIT_1_25_MS)            
 /**< Maximum acceptable connection interval (75 ms), Connection interval uses 1.25 ms units. */

But when I am keeping the minimum connection interval to 7.5 and maximum to 75,the rate of receiving the data is fast , i.e 8-9 sec I am receiving 4kb of data(in a packet of 20 bytes).But the current consumption is high in this case.

I want minimum current consumption when my device will advetise(around 30 uA) but once connected with the central ,the rate of reception should be fast(8-10 sec).

Can anyone suggest how to achieve this?

Parents
  • Hi,

    With the S130, you will typically send about 6 packets with 20 bytes of payload in each packet on every connection event. Naturally, if you have connection events every 1000ms the transfer will be much slower than if you have connection events every 7.5ms. However, the nRF51's radio consumes the exact same energy transferring 4KB regardless of how fast you are doing it. If you transmit 6 packets every second the radio will spend a few ms transferring data and then your CPU will sleep the rest of the second. If you transfer packets every 7.5ms the radio will be on almost continuously, but the entire transfer will take a lot less time. So the average current consumption (which is what you should care about) is the same.

Reply
  • Hi,

    With the S130, you will typically send about 6 packets with 20 bytes of payload in each packet on every connection event. Naturally, if you have connection events every 1000ms the transfer will be much slower than if you have connection events every 7.5ms. However, the nRF51's radio consumes the exact same energy transferring 4KB regardless of how fast you are doing it. If you transmit 6 packets every second the radio will spend a few ms transferring data and then your CPU will sleep the rest of the second. If you transfer packets every 7.5ms the radio will be on almost continuously, but the entire transfer will take a lot less time. So the average current consumption (which is what you should care about) is the same.

Children
No Data
Related