I would like to know how to configure these parameters to minimum values in order to achieve best low power scenario:
拼速度= 160个基点
-Connection interval = 1s
-Connection event lenght = 20bytes
我这nk maybe changing these params on llc.h could help:
/// Connection interval min (N*1.250ms)
#define LLC_CNX_INTERVAL_MIN 6 //(0x06) ----->800
/// Connection event length Max (N*0.625ms)
#define LLC_CNX_CE_LGTH_MAX 65535 //(0xFFFF) ---->1
But not able to find data rate.
Thanks for helping!
Ed
Device:
Hi edlofau,
You cannot just define the data rate in the DSPS so that the device will follow the specific rate, the datarate is a parameter that is controlled by different kind of other parameters like the connection interval agreed in both devices, the packets that master supports in each connection interval etc. The connection interval is something that is determined by the client and not the peripheral, the peripheral can indicate the prefered connection interval, but its the client that will determine what is the interval that should be applied to the connection. The DSPS central should accept those parameters indicated by the peripheral, in the reference design you can change the .intv_min and .intv_max members in the user_connection_param_conf in order to change the connection interval that should be followed for the upcomming connection. Regarding the connection event length that you mention, i suppose that you mean the bytes exchanged in every BLE packet, which are 20 bytes of payload allready, the thing is that the DSPS uses the MTU exchange feature which means that during one connection event if the device has more than 20 bytes to send it will send 20 bytes on the first packet and sub-sequent packets will have 27-bytes of data in their payload, not sure if this is what you really want/need. If you would like to send only 20 bytes in every connection interval you will have to configure that from the application level since the stack is designed to send as many data as instructed from application level, i mean that you can't send from the application level a serious amount of data toward the stack and configure the stack to send only 20 bytes of the data instructed to send. The defines that you mention are values used by the stack, you should not apply any changes to this.
Thanks MT_dialog