Hello,
I'm modifying the ble_peripheral/ble_app_hids_keyboard example on a custom board. When I pair my board with the first phone, it works fine.
APP:INFO:Timer tick APP:INFO:Uart IN: AT+PSWD=001234 APP:INFO:Uart OUT: C_OK APP:INFO:Uart IN: AT+BOND APP:INFO:Uart OUT: C_OK APP:INFO:Stop advertising APP:INFO:Timer tick APP:INFO:Timer tick APP:INFO:Restart advertising without whitelist APP:INFO:BLE_ADV_EVT_FAST APP:INFO:Timer tick APP:INFO:Timer tick APP:INFO:Connected to 4B.03.1E.BE.35.4B APP:INFO:Timer tick APP:INFO:GAP sec passkey display. APP:INFO:Passkey: 001234 APP:INFO:Timer tick APP:INFO:Timer tick APP:INFO:Connection secured. Role: 1. conn_handle: 0, Procedure: 1 APP:INFO:New Bond, add the peer to the whitelist if possible APP:INFO: m_whitelist_peer_cnt 1, MAX_PEERS_WLIST 8 APP:INFO:Uart OUT: PAIRED:0000 APP:INFO:Timer tick APP:INFO:Timer tick APP:INFO:Disconnected APP:INFO:BLE_ADV_EVT_FAST_WHITELIST APP:INFO:Stop advertising APP:INFO:Timer tick
But I can pair it with a second phone only if I turn off the bluetooth on the first one otherwise it will connect to the first phone that I paired earlier. How I could prevent that?
APP:INFO:Uart IN: AT+PSWD=001234 APP:INFO:Uart OUT: C_OK APP:INFO:Uart IN: AT+BOND APP:INFO:Uart OUT: C_OK APP:INFO:Stop advertising APP:INFO:Timer tick APP:INFO:Timer tick APP:INFO:Restart advertising without whitelist APP:INFO:BLE_ADV_EVT_FAST_WHITELIST APP:INFO:BLE_ADV_EVT_FAST APP:INFO:Timer tick APP:INFO:Connected to a previously bonded device. APP:INFO:Connected to 4B.03.1E.BE.35.4B APP:INFO:Connection secured. Role: 1. conn_handle: 0, Procedure: 0 APP:INFO:Disconnected APP:INFO:BLE_ADV_EVT_FAST_WHITELIST APP:INFO:Stop advertising APP:INFO:Timer tick