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

Problem in Code porting from nrf51 to nrf52: nrf52 automatically disconnects after few seconds

hello,

I had written a custom application based on ble_app_uart for nrf51, which works fine. But now I have to port it for nrf52. So I followed these steps:

  1. Changed the linker script for nrf52.
  2. Changed CFLAGS and ASMFLAGS in makefile for nrf52.
  3. use softdevice 132, include headers from s132.
  4. use s132 hex file for flashing

But after ble advertising, if a connection from android app is successful it lasts only for a few seconds and then disconnects. edit: There is no such code in neither custom application nor sample application which I modified in order to disconnect from android app. I am not able to figure out what is causing this problem. Please help. Edit: Now I also modified the sdk_config.h file according to nrf52 definitions. But I haven't observed any change in this behaviour

Edit: I am using SDK 12.1.0 and s132 v3

  • Please try to catch a sniffer trace. You only need a nRF51 DK or dongle to use as the backend.

    BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION telling it's disconnected from the other end.

    Have you used NRF_LOG_ERROR in your code ? Have you included all the modules and dependency ? You need to init the logger also. Please get familiar with it first on an example in the SDK v12.

Related