Hello, I am using ble_app_blinky on my BMD-300 evaluation kit (nrf52832) and I want to display a message via bluetooth on my phone with nrf connect. What function should I use in my main ?
Hello, I am using ble_app_blinky on my BMD-300 evaluation kit (nrf52832) and I want to display a message via bluetooth on my phone with nrf connect. What function should I use in my main ?
Hi,
What do you mean by displaying a message on your phone? If you just want to send a message from the device and receive it on your phone(in the app), then I suggest you have a look at the UART example in our SDK.
Hi,
What do you mean by displaying a message on your phone? If you just want to send a message from the device and receive it on your phone(in the app), then I suggest you have a look at the UART example in our SDK.
Hello, thank you for your reply but this is exactelly what I want.
I have a variable that contains the serial number of my nrf52 device and I want to send the value of my serial number to my phone.
I am sorry, what I meant is "this is not exactelly what I want",
Can you help me please find an example or a function I can use to do this.
Thank you
Just to clarify, in BLE, you send data over Services and Characteristics. We have tutorials that you can have a look at here.
The example mentioned uses the Service "Nordic UART Service" and the two Characteristics "TX" and "RX" to transfer data.
Take a look at the function uart_event_handle() to see how it transfers data via the Nordic UART Service. The data received over UART is stored in data_array
and sent using ble_nus_string_send()
. In your case, inside ble_nus_string_send() you will find the function sd_ble_gatts_hvx(). You can use this to send data. Have a look at this post.