This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to send string from application to nrf_conncet_mobile through zephyr

Hi all,

I'm trying to send string data from zephyr software application to mobile nrf connect application using nrf52840 board, how can i send the data ?

~Thanks

Parents Reply Children
  • Hello,

    By this I suppose you have moved on from the BLE UART example mentioned earlier.
    The custom service from the tutorial functions much the same way as the NUS service though, and will transfer any byte array you provide it with. So long as you know what to expect on the other side (i.e that you format and cast the appropriate bytes you have received) you may use the custom service from the tutorial to transfer either integers or characters, or both.

    So, if you provide it with a c string / array of characters, and make sure to interpret / cast it as characters on your receiver side, you may use the custom service as it is to achieve this.
    Try this, as demonstrated in Step 6 of the tutorial, and see if you are able to send some characters to your connected device.

    Best regards,
    Karl

Related