This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

mtu size error

● device : nRF52832 ● sdk : 13.0.0 ● softdevice : 4.0.2 Hi, I have a problem with change mtu size. I changed mtu size in sdk_config.h, but android application can't read mtu. So, i modified ble_stack_init() function in main.c like below.

	// Configure the maximum ATT MTU.
memset(&ble_cfg, 0x00, sizeof(ble_cfg));
ble_cfg.conn_cfg.conn_cfg_tag                 = 1;
ble_cfg.conn_cfg.params.gatt_conn_cfg.att_mtu = 222;
err_code = sd_ble_cfg_set(BLE_CONN_CFG_GATT, &ble_cfg, ram_start);
APP_ERROR_CHECK(err_code);

// Configure the maximum event length.
memset(&ble_cfg, 0x00, sizeof(ble_cfg));
ble_cfg.conn_cfg.conn_cfg_tag                     = 1;
ble_cfg.conn_cfg.params.gap_conn_cfg.event_length = 320;
ble_cfg.conn_cfg.params.gap_conn_cfg.conn_count   = BLE_GAP_CONN_COUNT_DEFAULT;
err_code = sd_ble_cfg_set(BLE_CONN_CFG_GAP, &ble_cfg, ram_start);
APP_ERROR_CHECK(err_code);

After modifying this function, i got a log that RAM start should be adjusted to 0x20002950. I changed RAM start address and size. And, i got a ERROR :FATAL(error code : 0x07) after ble_advertising_start() function.

Also, i just run example code, i returned log that nrf_ble_gatt:ERROR:sd_ble_gatts_exchange_mtu_reply() returned nexpected value 0x7.

What should i have to for reading MTU in android?

Best regards, Youngjun

Related