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

Write to characteristic with manual ACK

Hi all,

I believe it should be possible to defined a characteristic which can be written to but have no automatic write response ACK sent. Instead I want to send a manual ACK once I have processed the written data on the micro-controller received via a DATA event from the Nordic chip.

So I setup the characteristic in this way in nRFgo Studio with the properties 'Set pipe' and 'Write' checked. Note 'Send Write Response Automatically' isn't checked. When I write to the characteristic from my Android device I don't see a DATA event come through from the Nordic chip to my micro-controller. If I check 'Send Write Response Automatically' then I see the DATA events coming through. Why would DATA events stop coming through when I just uncheck the 'Send Write Response Automatically' option? I'm guessing this isn't expected behaviour?

I would be grateful for any advice. I assume it is possible in theory to have this kind of setup with a manual ACK?

I'm using the nRF8001 and STM micro-controller.

  • Hi Simon,

    I believe that the nRF8001 can only handle authorization (application choose to ACK or NACK) with write request.

    So you need to make sure you don't check "write without response" when you configure the nRF8001. And that your client write with write request, not write command.

    Also, please make sure you handle all DATA event. Because if you missed the first DataReceivedEvent, and don't send a response either SendDataAck or SendDataNack then you won't receive any further Data event.

    A sniffer trace would be useful to see what happened over the air.

    Best Regards,

    Hung

Related