User's Manual

Enhanced Class 1 Bluetooth v2.1 Module
User’s Guide
Americas: +1-800-492-2320 Option 2
Europe: +44-1628-858-940
Hong Kong: +852-2923-0610
www.lairdtech.com/wireless
87
CONN-GUIDE-BT740_v0.2
8.15.5 PinCode (Confirmation)
This is a confirmation packet which sends a pincode in response to an EVT_PINCODE_REQUEST
message while making an outgoing connection to a legacy pairing device and there was a pairing
challenge by the peer prior to connection acceptance.
This packet, just like the command version of this packet, can also register a pincode for all subsequent
incoming legacy pairings from BT2.0 and older devices. In that case the BDADDR[] field MUST be set to
all zeros.
Command Packet
Offset
Field
Value
Comments
0
LENGTH
28
Fixed
1
CHANNEL
0
Fixed
2
COMMAND
[CNF_PINCODE]
3
FLOW_IN
??
Runtime value
4
TIMEOUT
5..120
Pairing timeout in seconds
5..10
BDADDR[]
Nap[0,1]:Uap[2]:Lap[3,4,5]
Bluetooth address of device requesting the
pairing. Or all zeros to register a pincode for
incoming pairings
11..27
PIN[]
17 byte string array
Null Terminated Pin code String. Maximum
pin code length is 16.
If pairing is successful, the event message EVT_LINK_KEY or EVT_LINK_KEY_EX is sent to the host
after the response. The latter event sends if S Register 47 is set to one.
Note: A successful connection to an unpaired 2.0 and newer device requires this confirmation packet
because the MP protocol does not process new commands unless the previous command was
completed by sending an appropriate response packet.
The packet processor in the module queues all commands until a response sends, but processes
confirmation packets as they come hence in this case CMD_PINCODE does not work.
8.15.6 Trusted Database Record Count
This command obtains the number of trusted devices in the database specified.
Command Packet
Offset
Field
Value
Comments
0
LENGTH
5
Fixed
1
CHANNEL
0
Fixed
2
COMMAND
[CMD_ TRUSTED_DB_COUNT]
3
FLOW_IN
??
Runtime value
4
DBTYPE
0..1
0 = ROLLING DATABASE
1 = PERSISTANT DATABASE