Other Parts Discussed in Thread: CC2640, BLE-STACK
Tool/software: TI-RTOS
Hi
I am using multi_role example from 1.50.0.58 sdk. I use:
Log_infoX instead of display_printX.
uint8_t pairMode = GAPBOND_PAIRING_MODE_INITIATE; uint8_t mitm = TRUE; uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY; uint8_t bonding = TRUE; uint8_t security = GAPBOND_SECURE_CONNECTION_NONE
and MAX_NUM_BLE_CONNS=3 in predefined symbol of compiler.
I have noticed that when I print recently connected Android device address it changes with subsequent connections. Scenario is shown below:
1- I connect Xiaomi Android 7.1.2. to cc2640, Log_info shows random 6-byte address of type 1 (ADDRTYPE_RANDOM)
2- cc2640 requests pairing, so I enter passcode to Xiaomi and pair devices, Log_info shows "bond save success"
3- I click disconnect on nRFConnect on Xiaomi, reconnect again Log_info shows another 6-byte type 1 address, but no "bonding success" or even pairing request, eventually Xiaomi gets disconnected in seconds
4- I click connect on Xiaomi, Log_info finally shows 6-byte BT address of type 2 (ADDRTYPE_PUBLIC_ID), get pairing request and type in passcode
5- Log_info shows "bond save success" again! same smartphone
6- subsequent disconnects and reconnects lead to "bonding success" just like it is supposed to be.
A) Is it normal to ask a smartphone for passcode and then store the bond info in SNV twice?
B) Have just two bond records been completed?
C) Is it possible to force device (Xiaomi) to show factory BT address (the one I can find in Android options menu) from the beginning?
D) Why doesn't step 6 happen directly after step 2?