Get data delay for BLE control point for Fitness machine profile.

Hi,

   We are developing cycling trainer, so we use BLE fitness machine profile. Our functions are basically completed and we are testing with some VR cycling windows or desktop APP(Zwift and BKool). We have one issue.

When I use BKool APP, BKOOL APP will send slope to our device by BLE control point interface.

I use same cycling map on desktop and tablet and I will printf some information

1. If I use desktop APP, I always get slope data from control point every 1~2s. It is work well to us.

Get control parameter = (11)(0)(0)(d1)(0)(0)(25) -> raw data get from control point 
2.09,1996      -> Slope value and time interval
Get control parameter = (11)(0)(0)(d1)(0)(0)(25)
2.09,1997
Get control parameter = (11)(0)(0)(d1)(0)(0)(25)
2.09,993
Get control parameter = (11)(0)(0)(d1)(0)(0)(25)
2.09,1997
Get control parameter = (11)(0)(0)(d1)(0)(0)(25)
2.09,994
Get control parameter = (11)(0)(0)(d1)(0)(50)(25)
2.09,1996
Get control parameter = (11)(0)(0)(d1)(0)(50)(25)
2.09,1002
Get control parameter = (11)(0)(0)(d1)(0)(50)(25)
2.09,1988
Get control parameter = (11)(0)(0)(d1)(0)(50)(25)
2.09,1997
Get control parameter = (11)(0)(0)(76)(fe)(50)(25)
0.00,1996
Get control parameter = (11)(0)(0)(76)(fe)(50)(25)
0.00,994
Get control parameter = (11)(0)(0)(76)(fe)(50)(25)
0.00,1003
Get control parameter = (11)(0)(0)(76)(fe)(50)(25)
0.00,1996
Get control parameter = (11)(0)(0)(76)(fe)(50)(25)
0.00,994
Get control parameter = (11)(0)(0)(76)(fe)(50)(25)
0.00,994
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,1997
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,1002
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,1989
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,1002
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,994
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,1997
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,1002
Get control parameter = (11)(0)(0)(34)(ff)(50)(25)
0.00,1988
Get control parameter = (11)(0)(0)(34)(ff)(50)(25)
0.00,1003
Get control parameter = (11)(0)(0)(34)(ff)(50)(25)
0.00,994
Get control parameter = (11)(0)(0)(34)(ff)(50)(25)
0.00,1997
Get control parameter = (11)(0)(0)(34)(ff)(50)(25)
0.00,994
Get control parameter = (11)(0)(0)(34)(ff)(50)(25)
0.00,1002
Get control parameter = (11)(0)(0)(34)(ff)(50)(25)
0.00,1997
Get control parameter = (11)(0)(0)(67)(ff)(50)(25)
0.00,994
Get control parameter = (11)(0)(0)(67)(ff)(50)(25)
0.00,994
Get control parameter = (11)(0)(0)(67)(ff)(50)(25)
0.00,1997
Get control parameter = (11)(0)(0)(67)(ff)(50)(25)
0.00,1002
Get control parameter = (11)(0)(0)(67)(ff)(50)(25)
0.00,994

2. If I use tablet APP, I often get slope data from control point every 2~4s. It is fail to us.

Get control parameter = (11)(0)(0)(d1)(0)(0)(25)
2.09,3985
Get control parameter = (11)(0)(0)(d1)(0)(50)(25)
2.09,1996
Get control parameter = (11)(0)(0)(d1)(0)(50)(25)
2.09,1996
Get control parameter = (11)(0)(0)(d1)(0)(50)(25)
2.09,1997
Get control parameter = (11)(0)(0)(d1)(0)(50)(25)
2.09,994
Get control parameter = (11)(0)(0)(d1)(0)(50)(25)
2.09,2990
Get control parameter = (11)(0)(0)(76)(fe)(50)(25)
0.00,1997
Get control parameter = (11)(0)(0)(76)(fe)(50)(25)
0.00,1996
Get control parameter = (11)(0)(0)(76)(fe)(50)(25)
0.00,995
Get control parameter = (11)(0)(0)(76)(fe)(50)(25)
0.00,3993
Get control parameter = (11)(0)(0)(76)(fe)(50)(25)
0.00,1996
Get control parameter = (11)(0)(0)(76)(fe)(50)(25)
0.00,1997
Get control parameter = (11)(0)(0)(76)(fe)(50)(25)
0.00,994
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,1997
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,1996
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,1988
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,1003
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,1996
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,994
Get control parameter = (11)(0)(0)(d4)(ff)(50)(25)
0.00,2991
Get control parameter = (11)(0)(0)(34)(ff)(50)(25)
0.00,1997
Get control parameter = (11)(0)(0)(34)(ff)(50)(25)
0.00,1996
Get control parameter = (11)(0)(0)(34)(ff)(50)(25)
0.00,994
Get control parameter = (11)(0)(0)(34)(ff)(50)(25)
0.00,1003
Get control parameter = (11)(0)(0)(34)(ff)(50)(25)
0.00,4987
Get control parameter = (11)(0)(0)(34)(ff)(50)(25)
0.00,1996
Get control parameter = (11)(0)(0)(67)(ff)(50)(25)
0.00,1988
Get control parameter = (11)(0)(0)(67)(ff)(50)(25)
0.00,1996
Get control parameter = (11)(0)(0)(67)(ff)(50)(25)
0.00,1997
Get control parameter = (11)(0)(0)(67)(ff)(50)(25)
0.00,1996
Get control parameter = (11)(0)(0)(67)(ff)(50)(25)
0.00,1997
Get control parameter = (11)(0)(0)(67)(ff)(50)(25)

Why? Have any parameter can change for BLE control point? I don’t understand why the same source app has different results?

Any suggestion?

Thank you.

Parents
  • Hello,

    I suspect that this might be due to the tablet forcing different connection parameters.
    Does your peripheral device do any logging, or indicate that something is different when connected to the tablet?
    The central device is the one that determines the actual connection parameters - the peripheral may only request a certain range of preferences, but it is ultimately up to the central to decide.
    Some tablets / phones have limitations on which connection parameters they will choose, in order to decrease power consumption etc.

    Could you capture a sniffer trace of the communication between the two devices for each scenario, so we may take a look at what is being transmitted on air? You could use the nRF Sniffer tool for this, and read more about its installation and usage here.

    Best regards,
    Karl

  • Hi Karl,

         Thank you for your support. I will prepare BLE sniffer. 

    Your question - Does your peripheral device do any logging, or indicate that something is different when connected to the tablet?

    Answer: No, My code for desktop and tablet is same. No different.

    Before we use sniffer tool to check this issue,Have any parameter I can change to try it? 

    Thank you.

  • Hello,

     Thank you for your support.

    No problem at all, I am happy to help!

    I will prepare BLE sniffer. 

    Great, I look forward to hearing what you find.

    Answer: No, My code for desktop and tablet is same. No different.

    My apologies, I should have been more explicit: does the two connections look different from the peripheral's side? I.e does the peripheral indicate that something is different with the two connections - independent of what is happening on the central side?

    Regarding that the central code is the case; The application code may be the same, while the OS of the devices still impose some other limitations.
    For example, the peripheral may request to use 7.5 ms connection interval in both cases, and the application may be configured to accept any incoming connection parameter requests from the peripheral, but behind the scenes the OS limits the connection to a 15 ms connection interval. This will depend on the operating systems of the devices, and their possible limitations.

    If this is the case it will be clear as soon as we see a sniffer trace of the two connections.

    Best regards,
    Karl

  • Hi Karl,

          Good news. I follow your suggestion to change connect interval parameter and I fixed this issue.

    My previous settings is

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(500, UNIT_1_25_MS) 
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS)

    After I follow your suggestion, I change this parameter to 

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(50, UNIT_1_25_MS)
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS) 

    Thank you for your support.

Reply
  • Hi Karl,

          Good news. I follow your suggestion to change connect interval parameter and I fixed this issue.

    My previous settings is

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(500, UNIT_1_25_MS) 
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS)

    After I follow your suggestion, I change this parameter to 

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(50, UNIT_1_25_MS)
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS) 

    Thank you for your support.

Children
  • JohnCC said:
    Thank you for your support.

    No problem at all, Johncc - I am happy to help!

    JohnCC said:
    Good news. I follow your suggestion to change connect interval parameter and I fixed this issue.

    Great - this means that the tablet opted for the longer interval, likely as a power consumption measure on their side.
    You should therefore ensure that the full range of the connection interval preferences suffices for your peripheral.
    Please also note that it is the central that has the final say in what connection parameters are going to be used, and the central may disregard the peripheral's preferences and choose something else entirely.
    The only thing the peripheral may do about this (not having its preferences fulfilled) is to terminate the connection. If it is paramount for your application that the connection parameters used are within a certain range for correct operation / performance you should consider adding this mechanism to your application.

    Please do not hesitate to open another ticket if you should encounter any other issues or questions in the future.

    Good luck with your development!

    Best regards,
    Karl

Related