Hi teams
After I follow this post.
And I modify my source code succeed.
The data was separate by 64 bytes?
How to change or define this "64" bytes in SDK15.2?
Please help me. Thank you.
Hi teams
After I follow this post.
And I modify my source code succeed.
The data was separate by 64 bytes?
How to change or define this "64" bytes in SDK15.2?
Please help me. Thank you.
Hi,
How to change or define this "64" bytes in SDK15.2?
Could you try the following setting in the sdk_config.h?
#define NRF_SDH_BLE_GAP_DATA_LENGTH 68
#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 64
-Amanda H.
Hi Amanda
Please refer to the picture below.
It looks like not config by this two parameter.
Hi,
Did you call nrf_ble_gatt_att_mtu_periph_set() in main.c with the value set to 64 like
err_code = nrf_ble_gatt_att_mtu_periph_set(&m_gatt, 64);
-Amanda H.
Hi Amanda
No. I don't use this method.
Hi JaxLiao,
Jax said:I don't use this method.
I think you should have nrf_ble_gatt_att_mtu_periph_set to setting the ATT_MTU size for the next connection that is established as peripheral.
In e.g. SDK 15.2 in the ble_app_uart example you can set the ATT_MTU with the nrf_ble_gatt_att_mtu_periph_set()
function:
/**@brief Function for initializing the GATT library. */ void gatt_init(void) { ret_code_t err_code; err_code = nrf_ble_gatt_init(&m_gatt, gatt_evt_handler); APP_ERROR_CHECK(err_code); err_code = nrf_ble_gatt_att_mtu_periph_set(&m_gatt, NRF_SDH_BLE_GATT_MAX_MTU_SIZE); APP_ERROR_CHECK(err_code); }
-Amanda H.
Hi Amanda
Is this operate equal to directly modify sdk_config.h?
If it's yes. I have already modify sdk_config.h.
But it still separator by 64bytes.
I also added this in my source code.
void conn_evt_len_ext_set(void) { ret_code_t err_code; ble_opt_t opt; memset(&opt, 0x00, sizeof(opt)); opt.common_opt.conn_evt_ext.enable = 1; err_code = sd_ble_opt_set(BLE_COMMON_OPT_CONN_EVT_EXT, &opt); APP_ERROR_CHECK(err_code); }
What do you think about this?
Hi Amanda
Is this operate equal to directly modify sdk_config.h?
If it's yes. I have already modify sdk_config.h.
But it still separator by 64bytes.
I also added this in my source code.
void conn_evt_len_ext_set(void) { ret_code_t err_code; ble_opt_t opt; memset(&opt, 0x00, sizeof(opt)); opt.common_opt.conn_evt_ext.enable = 1; err_code = sd_ble_opt_set(BLE_COMMON_OPT_CONN_EVT_EXT, &opt); APP_ERROR_CHECK(err_code); }
What do you think about this?
Hi,
Jax said:Is this operate equal to directly modify sdk_config.h?
It set with the NRF_SDH_BLE_GATT_MAX_MTU_SIZE value in the sdk_config.h.
Could you add nrf_ble_gatt_att_mtu_periph_set() into your main.c?
-Amanda H.
It's a same result.
Hi,
Did you use the nrf_ble_gatt_data_length_set() in the project?
At any time, you can call nrf_ble_gatt_eff_mtu_get or nrf_ble_gatt_data_length_get to retrieve the current parameter value for a given connection.
-Amanda H.