zephyr/net/bluetooth
Arkadiusz Lichwa dcd04f2a68 Bluetooth: BR/EDR: Add pairing mode flag
Since right now the stack supports as acceptor pre-2.1 devices pairing,
start set the state pairing flag in legacy PIN request handler and
resets it on Encryption Changed event.
When connection is 'in-pairing' mode disallow of local user to trigger
change security level on link.

> HCI Event: Command Status (0x0f) plen 4
	Accept Connection Request (0x01|0x0009) ncmd 1
	Status: Success (0x00)
> HCI Event: PIN Code Request (0x16) plen 6
	Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
	Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
	PIN length: 4
	PIN code: 1234
> HCI Event: Command Complete (0x0e) plen 10
	PIN Code Request Reply (0x01|0x000d) ncmd 1
	Status: Success (0x00)
	Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
> HCI Event: Link Key Notification (0x18) plen 23
	Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
	Link key: 2a4eae1018ed248064166e765d946313
	Key type: Combination key (0x00)
> HCI Event: Connect Complete (0x03) plen 11
	Status: Success (0x00)
	Handle: 12
	Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
	Link type: ACL (0x01)
	Encryption: Disabled (0x00)
> ACL Data RX: Handle 12 flags 0x02 dlen 10
	L2CAP: Information Request (0x0a) ident 1 len 2
	Type: Extended features supported (0x0002)
< HCI Command: Host Number of Completed Packets (0x03|0x0035) plen 5
	Num handles: 1
	Handle: 12
	Count: 1
> HCI Event: Encryption Change (0x08) plen 4
	Status: Success (0x00)
	Handle: 12
	Encryption: Enabled with E0 (0x01)

Change-Id: I5cbdaab1d6d52197795bfffd465ba59216afee00
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
2016-03-09 12:41:44 +00:00
..
att_internal.h
att.c
conn_internal.h Bluetooth: BR/EDR: Add pairing mode flag 2016-03-09 12:41:44 +00:00
conn.c Bluetooth: BR/EDR: Add pairing mode flag 2016-03-09 12:41:44 +00:00
gatt_internal.h
gatt.c Bluetooth: Fix compare logic in ATT read rsp 2016-03-09 10:16:38 +00:00
hci_core.c Bluetooth: BR/EDR: Add pairing mode flag 2016-03-09 12:41:44 +00:00
hci_core.h Bluetooth: Fix latency versus timeout check 2016-03-08 10:56:34 +00:00
Kconfig
keys.c
keys.h Bluetooth: Cleanup dependency build for LE/BREDR 2016-03-09 10:55:31 +00:00
l2cap_internal.h
l2cap.c
Makefile
smp_null.c Bluetooth: Cleanup dependency build for LE/BREDR 2016-03-09 10:55:31 +00:00
smp.c Bluetooth: Use bt_auth_cancel for pairing cancel 2016-03-08 15:38:59 +00:00
smp.h Bluetooth: Use bt_auth_cancel for pairing cancel 2016-03-08 15:38:59 +00:00
stack.h
uuid.c