By the way,
sometimes I found that heart_rate_collector send NACK after data received from heart_rate_monitor.
Does PSoC heart_rate_collector program involve this action?
Does PSoC heart_rate_collector program can't involve this action?
I haven't worked with the heart rate collector/monitor programs. That said, I would imagine the NACK is sent by the heart rate collector if it failed to get the data in some way. I would suggest looking through both projects to see the behavior it is implementing involving the NACK.
I'm investigating PSoC source program.
I am guessing whether the receive buffer size is small at heart_rate_collector side.
But I can't found where NACK send (NESN is countinues 1 ) logic.
Looking through the PSoC 4 BLE_Heart_Rate_Sensor" example, I don't see any code that would send a type of NACK back; Do you have an example of the data that is being returned on a NACK? Have you tried looking for code/text related to that data being returned? There is a UART debug console, have you tried using that to see what is going on? Is it important to not have NACKs occurring? Are you sure the NACK is being used as a NACK for data exchange, and not to signal something else?
Are you observing the NAK using a BLE Sniffer?
The NAK is handled automatically automatically by the internal BLE Stack and cannot be viewed in the generated sources. How often do you observe this issue?
- Madhu Sudhan
This NACK transmission has occurred at high frequency.
Below is trace data by air capture tool.
Please look NESN.
10,781 20 0xda14d79d 0x008c 1 Empty 1M 0 0 0 0 18 00:00:00.000351 2017/04/14 8:06:48.013065
10,782 20 0xda14d79d 0x008c 2 Start 1M 1 0 1 15 33 00:00:00.000230 2017/04/14 8:06:48.013295
10,783 20 0xda14d79d 0x008c 1 Empty 1M 1 1 0 0 18 00:00:00.000351 2017/04/14 8:06:48.013646
10,784 20 0xda14d79d 0x008c 2 Start 1M 0 1 1 15 33 00:00:00.000230 2017/04/14 8:06:48.013876
10,785 20 0xda14d79d 0x008c 1 Empty 1M 1 0 0 0 18 00:00:00.000351 2017/04/14 8:06:48.014227
This retry is not occured at between PSoC's heart_rate_monitor and android's heart_rate_collector.