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

Send RX value continuously in ble_uart when mobile phone gets connected

I want to send a string msg from nrf52832 to mobile when the device get connected to the mobile phone through uart app

Parents Reply Children
  • Could you explain your setup in more details? Are you using the nRF Connect mobile app, or are you developing your own mobile app?

    I assume you are using the nRF Connect app for mobile (client and central) and that the nRF52832 serves as a peripheral and server. In that case, I have to correct myself from the last post. It is not possible to start sending data immediately after a connection is established, you have to enable notifications on the central side (phone) first. Check this thread for more information. If you are using nRF Connect, you have to do this manually, but if you are developing your own app, you can make it do it by itself.

    Take a look at the ble app_hrs example, located in \nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_hrs\main.c, which you can use as a reference to your own project. It starts several timers, which will be started immediately, and will try notify different characterstics if there is a connection. The notifications will only go through when it is enabled by the phone.

    Best regards,

    Simon

Related