Dear Sir,
I wanted to make the peripheral connect to a predefined central device. Here I am using an android phone ( with nRFConnect installed in it) as the central device.
I was using ble_app_hrs code as reference and modified as follows to implement the whitelist operation.
I want the peripheral to be visible/connect to only those device whose address is mentioned in the whitelist.
I have made the following changes in the 'ble_app_hrs' code.
Inside function "advertising_init()" the following line is added
And the line
is changed as follows
Then insdie function "on_adv_evt(ble_adv_evt_t ble_adv_evt)" the following lines are added on top
And inside the same function in 'switch (ble_adv_evt)' added the following case also
Now I flashed the program to a peripheral device.
I have tried to connect to the peripheral in two ways
1) Using nRFConnect Desktop App with the help of another BLE DK from Rigado- In this case I could see the peripheral name in the App and I could establish the connection successfully.
2)Using ANdroid phone( with nRFConnect App installed in it) - In this case I had to give the address in reverse order and I could see the peripheral device while scanning .But here when I try to connect to the peripheral it fails with the following message( shown in the App in phone)
The following image shows the address in my mobile phone
Is there anything to do with the address type.?
Or anything else I am missing ?
Please shre your comments .
with regards,
Geetha