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

If nRf52 works in a peripherial mode and receive a packets. When can I send next packet from a central device?

Hi!

I have nrf52 periperial mode, SDK15, s132.

I connect a smartphon in the central mode to my nRF52 and start to send some data.

In the nRF52 I receive those data in a 

void nus_data_handler(ble_nus_evt_t * p_evt)

When possible to send next data from my central smartphone to nRF52? If I need send a lot of data from smartphon, how to know what should send next data packet?

Parents
  • Hi,

    Are you using our UART example without modifications? Are you ucing the nRF Connect/nRF Toolbox app on your phone to connect and send data? How much data is "a lot"?

    The RX characteristic is set to write without response, so you should be able to just send data from your phone without waiting for an ACK.

  • Thought you used the UART example from our SDK, there is a RX characteristic there. Yes on the nRF side.

    There is no ACKing implemented so you will have to define some ACK mechanism on application layer which will tell to the phone that it can continue.

    I think you can also use send WRITE_REQUEST from the phone. This will require the peripheral to respond before next packet is sent. This will of course lower the throughput as you have to wait for the peripheral to respond before continuing.

Reply
  • Thought you used the UART example from our SDK, there is a RX characteristic there. Yes on the nRF side.

    There is no ACKing implemented so you will have to define some ACK mechanism on application layer which will tell to the phone that it can continue.

    I think you can also use send WRITE_REQUEST from the phone. This will require the peripheral to respond before next packet is sent. This will of course lower the throughput as you have to wait for the peripheral to respond before continuing.

Children
Related