I'm using the RSCS demo as the peripheral and the Relay demo as the central. I've modified each to use stored bond information if it is found in flash upon startup. I make sure they are connected and bonded, then I reset each board. Looking at Debug output, it appears that the central sees the advertisement from the peripheral, but the connection gets abruptly disconnected before discovery can occur. Error code 0x3E is reported. Here's a snippet of the output:
Found 1 bonds (keys)
Found 0 addrs, first is below
00 00 00 45 2F 02 addr type: 0
[APPL]: scan mode: 1, pstorage count: 0
[DM]: >> dm_whitelist_create
[DM]: Created whitelist, number of IRK = 0x01, number of addr = 0x00
[DM]: << dm_whitelist_create
[ADV]: Starting fast advertisement.
[APPL]: 1814
RSC found
[DM]: Request to allocation connection instance
[DM]:[00]: Connection Instance Allocated.
[DM]: Searching for device 0x21 0x3C 0xF6 0x04 0x9B 0x50.
[DM]:[DI 0x00]: Device type 0x01.
[DM]: Device Addr 0xB9 0x34 0x46 0x6B 0x19 0xE3.
[DM]:[DI 0x01]: Device type 0xFF.
[DM]: Device Addr 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF.
[DM]:[DI 0x02]: Device type 0xFF.
[DM]: Device Addr 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF.
[DM]:[DI 0x03]: Device type 0xFF.
[DM]: Device Addr 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF.
[DM]:[DI 0x04]: Device type 0xFF.
[DM]: Device Addr 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF.
[DM]:[DI 0x05]: Device type 0xFF.
[DM]: Device Addr 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF.
[DM]:[DI 0x06]: Device type 0xFF.
[DM]: Device Addr 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF.
[DM]: Notifying application of event 0x11
[APPL]: >> DM_EVT_CONNECTION
[APPL]:[21 3C F6 04 9B 50]: Connection Established
[DB]: Starting disc[DM]: Disconnect Reason 0x003E
[DM]: Notifying application of event 0x12
[APPL]: >> DM_EVT_DISCONNECTION
[APPL]: Begin in state: 1, event 4
[APPL]: Transition to state: 1
[APPL]: << DM_EVT_DISCONNECTION
[DM]:[CI 0x00]: Freeing connection instance
[DM]:[00]: Freed connection instance.
[DM]: Initializing Connection Instance 0x00000000.
I just want to make sure using whitelist advertising and scanning at the same time is supposed to work. I'll keep looking at this and see if there's any way my application could be doing anything wrong, though.
EDIT: added attachments
relay main.c: main.c wireshark capture sniff1.pcapng wireshark screen sniff1.PNG rscs main.c main.c
modified relay project: ble_richv_demo.zip
modified rscs project: ble_app_rscs_richv.zip