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

how to enable bidirectional comunication on my nrf51822

Hi,

I'm using the nrf51822 and I want to merge Server and Client roles in one Peripheral device. I am already able to send a history of temperature and humidity measurements to my phone, but I don't have possibility to set measurement period in my phone and send this parameter to nrf51. It seems to me that only reasonable way to do it is to convert GATT role of nrf51, to be Server and Client in the same time. In other words, besides sending characteristics from nrf51, I also must read them. Unfortunately, I can't find any example or even clues how to do it. Only example that brings up the issue of setting GATT role is that one: devzone.nordicsemi.com/questi... but it relates to other SoftDevice, and purpose of this application is quite different. I use S130 SoftDevice and SDK 11. I would be grateful for any advice.

Parents
  • Hmm i'm not sure i understand you fully. During a connection the central can write data to peripheral anytime using write command/request. The peripheral can write data to the central if the central registered itself for HandleValue Notifications/indications.

    If you want to Disconnect - and after some time - create a connection from the former peripheral to the smartphone... then you need to do what i sad in my response. Act as both central & peripheral at the same time.

Reply
  • Hmm i'm not sure i understand you fully. During a connection the central can write data to peripheral anytime using write command/request. The peripheral can write data to the central if the central registered itself for HandleValue Notifications/indications.

    If you want to Disconnect - and after some time - create a connection from the former peripheral to the smartphone... then you need to do what i sad in my response. Act as both central & peripheral at the same time.

Children
Related