My Project:
I want to control 2 outputs on the nRF51DK from my mobile device(Android & iOS). Its a simple program:
left button is pressed -> PIN 21 High / left button is released -> PIN 21 Low
right button is pressed -> PIN 22 High / right button is released -> PIN 22 Low
My setup:
-nRF51DK
-SD 8.1
-SDK 8.1
I have realized my idea with Notification. It works, but not perfectly. Because sometimes when I release a button, I wont get the notification.
I would like to get something like an ACK, when the information is recieved on the nRF51 board.
So I will have to use Indication instead of Notification.
I know there are a lot of examples, which are using Indication(BPS, CGM, GLS, HTS).
The thing is, in this examples the data will be send form the nRFBoard to the Client. But I want the other way. I want to send data from mobile device to nRF51 DK.
Are there any examples where the data will be send form mobile device to nRF51Board with Indication?
Or could me somebody explain how I will get into the write_handler() function when I use Indication?
Do I have to call the write handler, when I get the confirmation?
Like this:
case BLE_HTS_EVT_INDICATION_CONFIRMED:
up_write_handler();
break;
I know how I have to set up the characteristic for Indication. I need to know how do I get into the write_handler?