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

How to achieve the maximum transmission rate through ble_app_uart with IOS nrfconnect app

Excuse me:

                      I want to achieve the maximum transfer speed between ble_app_uart and IOS NRF connect app,How to modify the example to achieve the maximum transfer speed with the app,Can we achieve a speed of more than 50kb / s?

Parents
  • Hi 

    How have you set the core BLE settings in sdk_config?

    // <i> Requested BLE GAP data length to be negotiated.
    
    #ifndef NRF_SDH_BLE_GAP_DATA_LENGTH
    #define NRF_SDH_BLE_GAP_DATA_LENGTH 251
    #endif
    
    // <o> NRF_SDH_BLE_PERIPHERAL_LINK_COUNT - Maximum number of peripheral links. 
    #ifndef NRF_SDH_BLE_PERIPHERAL_LINK_COUNT
    #define NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 1
    #endif
    
    // <o> NRF_SDH_BLE_CENTRAL_LINK_COUNT - Maximum number of central links. 
    #ifndef NRF_SDH_BLE_CENTRAL_LINK_COUNT
    #define NRF_SDH_BLE_CENTRAL_LINK_COUNT 0
    #endif
    
    // <o> NRF_SDH_BLE_TOTAL_LINK_COUNT - Total link count. 
    // <i> Maximum number of total concurrent connections using the default configuration.
    
    #ifndef NRF_SDH_BLE_TOTAL_LINK_COUNT
    #define NRF_SDH_BLE_TOTAL_LINK_COUNT 1
    #endif
    
    // <o> NRF_SDH_BLE_GAP_EVENT_LENGTH - GAP event length. 
    // <i> The time set aside for this connection on every connection interval in 1.25 ms units.
    
    #ifndef NRF_SDH_BLE_GAP_EVENT_LENGTH
    #define NRF_SDH_BLE_GAP_EVENT_LENGTH 6
    #endif
    
    // <o> NRF_SDH_BLE_GATT_MAX_MTU_SIZE - Static maximum MTU size. 
    #ifndef NRF_SDH_BLE_GATT_MAX_MTU_SIZE
    #define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247
    #endif

    In order to maximize throughput you need to set GAP_DATA_LENGTH to 251 and the GATT_MAX_MTU_SIZE to 247. 

    Then you can send up to 244 bytes of user data in every notification in order to maximize throughput. 

    Secondly you might want to request 2M phy, which will increase the throughput even further, but I would focus on increasing the data length first. 

    Also, you should use 15ms connection interval for optimal throughput on both iOS and Android. 

    In our testing you can get up to around 600kbps on iPhone, but depends on the settings used, and on how you upload data on the peripheral side. 

    Best regards
    Torbjørn

Reply
  • Hi 

    How have you set the core BLE settings in sdk_config?

    // <i> Requested BLE GAP data length to be negotiated.
    
    #ifndef NRF_SDH_BLE_GAP_DATA_LENGTH
    #define NRF_SDH_BLE_GAP_DATA_LENGTH 251
    #endif
    
    // <o> NRF_SDH_BLE_PERIPHERAL_LINK_COUNT - Maximum number of peripheral links. 
    #ifndef NRF_SDH_BLE_PERIPHERAL_LINK_COUNT
    #define NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 1
    #endif
    
    // <o> NRF_SDH_BLE_CENTRAL_LINK_COUNT - Maximum number of central links. 
    #ifndef NRF_SDH_BLE_CENTRAL_LINK_COUNT
    #define NRF_SDH_BLE_CENTRAL_LINK_COUNT 0
    #endif
    
    // <o> NRF_SDH_BLE_TOTAL_LINK_COUNT - Total link count. 
    // <i> Maximum number of total concurrent connections using the default configuration.
    
    #ifndef NRF_SDH_BLE_TOTAL_LINK_COUNT
    #define NRF_SDH_BLE_TOTAL_LINK_COUNT 1
    #endif
    
    // <o> NRF_SDH_BLE_GAP_EVENT_LENGTH - GAP event length. 
    // <i> The time set aside for this connection on every connection interval in 1.25 ms units.
    
    #ifndef NRF_SDH_BLE_GAP_EVENT_LENGTH
    #define NRF_SDH_BLE_GAP_EVENT_LENGTH 6
    #endif
    
    // <o> NRF_SDH_BLE_GATT_MAX_MTU_SIZE - Static maximum MTU size. 
    #ifndef NRF_SDH_BLE_GATT_MAX_MTU_SIZE
    #define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247
    #endif

    In order to maximize throughput you need to set GAP_DATA_LENGTH to 251 and the GATT_MAX_MTU_SIZE to 247. 

    Then you can send up to 244 bytes of user data in every notification in order to maximize throughput. 

    Secondly you might want to request 2M phy, which will increase the throughput even further, but I would focus on increasing the data length first. 

    Also, you should use 15ms connection interval for optimal throughput on both iOS and Android. 

    In our testing you can get up to around 600kbps on iPhone, but depends on the settings used, and on how you upload data on the peripheral side. 

    Best regards
    Torbjørn

Children
No Data
Related