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

Want to communicate between two devices using customised commands

Hi

I have 2 customised board with nrf52832, I wanted to communicate between 2 devices. Like to send commands like turn on/off LED from my one board to on/off LED on my second board. If I press button on one device it should be notified at other device etc.

Which BLE functionality I should refer for this ? Do I need to create any separate GATT service for this?

Thanks,

KRA

Parents Reply Children
  • Hello KRA,

    KRA said:
    I have gone through these examples from sdk. That will serve my purpose in few cases.

    I am glad to hear that you found the examples useful!

    KRA said:

    But in few commands I wanted to read data like string from other device. 

    Which functionality is suitable for communicating these kind of data between two devices??

    For sending a string between devices, I would recommend seeing the BLE Nordic UART central and peripheral examples.
    They emulate UART communication over BLE - i.e if something is written on the COM port of device 1, it will transfer it to device 2 over BLE, and device 2 will write the contents out on its own COM port - and visa versa.
    You may of course instead do something else with the received UART commands - such as toggling a LED - that is up to you. I will suggest that the easiest way to implement this would be to merge the relevant BLE Blinky example functionality you are already familiar with into the BLE Nordic UART examples.

    Using the Nordic UART service you may send strings / data between your devices, with minimal work required to get it up and running.

    Best regards,
    Karl

Related