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

Using BLE in the ble_thread_dyn_mtd_coap_cli example

Hello

I have a few questions regarding the "ble_thread_dyn_mtd_coap_cli" example:

  • In the "main.c" file, I notice that you have created timers to call "sd_ble_gap_conn_param_update ()" 5 seconds after a BLE connection and then every 30 seconds: is this necessary? What is the goal of doing this?
  • If I want to have a connection where packets are sent every 20ms, I would have to put "MIN_CONN_INTERVAL = 10ms" and "MAX_CONN_INTERVAL = 20ms", is that correct?
  • Since the Bluetooth and the Thread use the same radio component, is it possible that the smartphone temporarily modifies the connection speed when it wants to send all its messages and then return to a slow connection in order to disrupt the Thread on less possible?

Thank you

  • Hi,

    In the "main.c" file, I notice that you have created timers to call "sd_ble_gap_conn_param_update ()" 5 seconds after a BLE connection and then every 30 seconds: is this necessary? What is the goal of doing this?

    It does not do thin indefinitely, only until MAX_CONN_PARAMS_UPDATE_COUNT have been reached. This means that the 30 second interval is the retry interval for the connection parameter update procedure. In case the central does not accept the update, the Connection Parameters Negotiation library will retry the procedure after 30 seconds. If the procedure succeeds, the library will not retry it again.

    If I want to have a connection where packets are sent every 20ms, I would have to put "MIN_CONN_INTERVAL = 10ms" and "MAX_CONN_INTERVAL = 20ms", is that correct?

    Yes, but you may also get faster interval than 20 ms with these parameters. Also note that the central may choose to not accept the parameters, it thy are not suitable for that device.

    Since the Bluetooth and the Thread use the same radio component, is it possible that the smartphone temporarily modifies the connection speed when it wants to send all its messages and then return to a slow connection in order to disrupt the Thread on less possible?

    Yes, the central can send a connection parameter update to the peripheral if it has lots of data to send, and then reduce the interval when it is done with transfers.

    Best regards,
    Jørgen

Related