This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

What data will be updated with GAPROLE_PARAM_UPDATE_ENABLE enabled in peripheral?

Other Parts Discussed in Thread: CC2540

CC2540 Peripheral & Central projects:

If enable GAPROLE_PARAM_UPDATE_ENABLE,peripheral will be updated after connection is established,and i get some paramaters using function GAPRole_GetParameter(),they are:

    uint16 desired_min_interval = 6;               // about 7.5ms
    uint16 desired_max_interval = 800;         // about 1s
    uint16 desired_slave_latency = 0;            // 0
    uint16 desired_conn_timeout = 1000;    // about 10s

The communication speed is slow:send 1 byte user data need almost 2s.

Then i disable GAPROLE_PARAM_UPDATE_ENABLE and modify these paramater's macro-defined value,and few seconds later after connection is established,i get paramaters again and they are the same values ofcourse.

But the communication speed is much faster,it's almost about 50ms,maybe.

I do not know why this happens.what data updated in peripheral when GAPROLE_PARAM_UPDATE_ENABLE is enable?

  • When you set GAPROLE_PARAM_UPDATE_ENABLE the peripheral device will send a connection parameter update request to the central device, with the "desired" parameters. I would recommend keeping your min and max values closer together, and selecting a range that fits your application's power and latency requirements.

  • Thank you,Willis1.

    Is there any other updated paramaters besides those four paramaters?Why does communication speed become slower after paramaters updated?

    I want to know this very much to ensure that the power and latency performance is under control.

    And i noticed that the first time communication speed between peripheral and central is always fast,even if after paramaters updated.

    I have no idea,please tell me why this happens,god bless you all!

  • Hi,

    Depending upon the new min and maximum connection interval set, the host(if new values provided are withing the range of host device connection interval) and slave device reach an understanding of a new connection interval. So between 7.5ms to 1sec, any value in between can be chosen by host. If the host chooses 10 ms, the latency will be low, but power consumption will be higher. If the host chooses 800ms, the latency will be high but power consumption will be lower.

    Hence its better to give a narrow range of connection interval (min and max) and increase slave latency for power consumption reduction.

    Note 1: With Slave latency set, the salve device will set a keep alive packet(if not data is there to be sent), only at (slave latency +1)*Connection Interval frequency. When Data is there to be sent by slave, the effective connection interval will be connection interval itself. 

    Note 2: iOS devices have certain limitations on theconnection parameters. Please check page 22 in this link 

    https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf

    Regards,
    Arun

  • Thank you very much & Your answer has given me a great support!

    I just understood the dataflow of connection interval paramaters update:

    1.Slave send new paramaters to Master.

    2.Master send a respond-msg to Slave,if paramaters are withing the range of Master,it's yes,other for no.

    Is it right?

    Whether can we change the limitations of Master in source codes of project?

  • Yes. But its just that the master decides the connection interval finally( within its limitation) and sends the new parameter to slave.

    To change the limitations of master, you need to change the GAP profile parameters in the source code for master application(iOS, Android etc) which may not be the correct thing to do. I suggest, you change the GAP parameters in your application.

    Regards,

    Arun

  • I can do  a test in Central Project,but i don't know what paramaters i should change in central project.

    Or those are what mentioned before?