SWRU271I October 2010 – January 2020 CC2540 , CC2540T , CC2541 , CC2541-Q1 , CC2640R2F
Authenticated pairing requires MITM protection. This method is a way of transferring a passcode between the devices. The passcode cannot transmit wirelessly and is displayed on one device (typically on an LCD screen or a serial number on the device) and entered on the other device.
To pair with MITM authentication, use the following settings:
This method requires an additional step in the security process in Figure 5-7. After pairing is started, the GAPBondMgr notifies the application that a passcode is required through a passcode callback. Depending on the input and output capabilities of the device, the device must display and/or enter the passcode. If entering a passcode, the application sends this passcode to the GAPBondMgr.
This passcode communication with the GAPBondMgr uses a passcode callback function when registering with GAPBondMgr. You must add a passcode function to the GAPBondMgr application callbacks. The following is an example of a passcode function.
When the GAPBondMgr requires a passcode, the GAPBondMgr use the following callback to request a passcode from the application. Depending on the input and output capabilities of the devices, the callback function should either display a passcode or read in an entered passcode. This passcode must be sent by the application to the GAPBondMgr using the GAPBondMgr_PasscodeRsp() function. The following is an example of the SimpleBLECentral.
In the previous example, a random password is generated and displayed on an LCD screen by the passcode callback function. The other connected device must then enter this passcode.