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

Top Replies

Parents
  • Hello,

    I have done all the steps of the link you have have send when sending data from my application it appears on the com but it does not give any notification log on the mobile

    Thanks,

  • Perhaps we are misunderstanding each other here. By application log I am referring to the nRF Connect's "See logs" option, where you should see a logging read "Received notification .. " whenever something is written to the serial port of the connected nRF52840 DK.

    If you are not seeing any such loggings in the log, what does you logger say? Please share the entire log using the Insert -> Code -> Text option.

    Best regards,
    Karl

  • Hello,

    Below link is the example code which is sending decimal data, but i want to send string data and receive the string data

    https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/getting-started/posts/ncs-ble-tutorial-part-1-custom-service-in-peripheral-role

    Thanks,

  • 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

Reply
  • 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

Children
No Data
Related