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

Sending Strings from peripheral (nRF52840 DK) to Central (Android Device)

Hi,

I am working on a project where my mobile phone will be acting as a central device and nRF52840 DK will be acting as a peripheral device. I added the UART example to my code to see the strings Transmitted and received through TERMITE. I have also added the peer manager to my code with the following settings:

I am able to get the security features and the nRF Toolbox logs are attached below:

I am able to send a string from my central device (nRF Toolbox App) to my peripheral device (nRF52840 DK) but the vice versa communication that is from my Peripheral device (nRF52840 DK) to my central device (nRF Toolbox App) is not gegging displayed. Can anyone please help me with this problem???

The main.c file is attached below

for reference:

  • Could you upload your whole project as a zipped file?

    Zip this folder: nRF5_SDK_15.0.0_a53641a\examples\ble_xxxx\name_of_project

    Best regards,

    Simon

  • Hi,

    Thanks for the reply @Simon.

    Actually, the err_code returned by the uart_event_handle was giving a value 5 which means NRF_ERROR_NOT_FOUND.

    When I checked the ble_nus_data_send function I got to know that the m_conn_handle value was not correct. So I defined a new m_conn_handle1 and then I was able to send strings from my nRF52840 board to the nRFtoolbox app.