Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to run UART/Serial Port Emulation over BLE on SDK v14.2.0?

I try to run UART/Serial Port Emulation over BLE on SDK v14.2.0 with nRF52 DK and nRF Connect on Android phone following link "http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.2.0%2Fble_sdk_app_nus_c.html&cp=4_0_1_4_2_0_2". I compile and download example code with softdevice S132, the phone detect Nordic-Uart, and connected, but nothing more than that, if I try to send something, BLE will disconnected, even it will be re-connected if requested. I run Tera Term on PC, it shows Nordic-UART, but does not show anymore thing, no response to keyboard. There are some code displayed in this link, they are said added to be added in softdevice, it is not clear that they are already added and I do not have to add them in again, if that is the case, why they are displayed here. If not added, where they should be added, in main.c or ble_nus.c? Please help!

Parents Reply
  • Hi, Jorgen: Thank you for help. I did two changes:

    1. change

    err_code = nrf_ble_gatt_att_mtu_periph_set(&m_gatt, 64);

    to err_code = nrf_ble_gatt_att_mtu_periph_set(&m_gatt, BLE_GATT_ATT_MTU_DEFAULT); in gatt_init(void);

    2. Change 

    #define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247 to 
    #define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 23 in file sdk_config.h

    then re-compile and download, the response in SES are: <info> app: Disconnected
    <error> app: ERROR 8198 [Unknown error code] at C:\nRF52\nRF5_SD,

    is there more change should be done?

    Good night, see you later!

Children
No Data
Related