Hello,
I am using a Murata module based on WL1271L running Linux 3.10.
For my application, Bluetooth must be encrypted, so I try to enable encyption with no success
# hciconfig hci0 version
hci0: Type: BR/EDR Bus: UART
BD Address: 88:33:14:03:F4:E3 ACL MTU: 1021:4 SCO MTU: 180:4
HCI Version: 4.0 (0x6) Revision: 0x0
LMP Version: 4.0 (0x6) Subversion: 0x1f55
Manufacturer: Texas Instruments Inc. (13)
# hciconfig hci0 features
hci0: Type: BR/EDR Bus: UART
BD Address: 88:33:14:03:F4:E3 ACL MTU: 1021:4 SCO MTU: 180:4
Features page 0: 0xff 0xfe 0x2d 0xfe 0xdb 0xff 0x7b 0x87
<3-slot packets> <5-slot packets> <encryption> <slot offset>
<timing accuracy> <role switch> <hold mode> <sniff mode>
<RSSI> <channel quality> <SCO link> <HV2 packets>
<HV3 packets> <u-law log> <A-law log> <CVSD> <power control>
<transparent SCO> <EDR ACL 2 Mbps> <EDR ACL 3 Mbps>
<enhanced iscan> <interlaced iscan> <interlaced pscan>
<inquiry with RSSI> <extended SCO> <EV4 packets> <EV5 packets>
<AFH cap. slave> <AFH class. slave> <LE support>
<3-slot EDR ACL> <5-slot EDR ACL> <sniff subrating>
<pause encryption> <AFH cap. master> <AFH class. master>
<EDR eSCO 2 Mbps> <EDR eSCO 3 Mbps> <3-slot EDR eSCO>
<extended inquiry> <LE and BR/EDR> <simple pairing>
<encapsulated PDU> <err. data report> <non-flush flag> <LSTO>
<inquiry TX power> <EPC> <extended features>
Features page 1: 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00
# hciconfig hci0
hci0: Type: BR/EDR Bus: UART
BD Address: 88:33:14:03:F4:E3 ACL MTU: 1021:4 SCO MTU: 180:4
UP RUNNING PSCAN
RX bytes:1197 acl:0 sco:0 events:61 errors:0
TX bytes:1595 acl:0 sco:0 commands:61 errors:0
# hciconfig hci0 encrypt
Can't set encrypt on hci0: Invalid request code (56)
# hciconfig hci0
hci0: Type: BR/EDR Bus: UART
BD Address: 88:33:14:03:F4:E3 ACL MTU: 1021:4 SCO MTU: 180:4
UP RUNNING PSCAN AUTH
RX bytes:1211 acl:0 sco:0 events:63 errors:0
TX bytes:1605 acl:0 sco:0 commands:63 errors:0
AUTH has been automatically enabled as it should be but it seems that WL1271L refuse HCI_OP_WRITE_ENCRYPT_MODE commands.
I have enabled DEBUG in hci_core.c and hci_event.c and I hace the following log in dmesg:
// Succesfull HCI_OP_WRITE_AUTH_ENABLE command
[ 263.560000] hci0 start
[ 263.560000] hci0 1
[ 263.560000] hci0 opcode 0x0c20 plen 1
[ 263.560000] skb len 4
[ 263.560000] length 1
[ 263.560000] hci0 cmd_cnt 1 cmd queued 1
[ 263.560000] hci0 type 1 len 4
[ 263.560000] hci0
[ 263.560000] hci0 Event packet
[ 263.560000] hci0 status 0x00
[ 263.560000] hci0 opcode 0x0c20
[ 263.560000] opcode 0x0c20 status 0x00
[ 263.560000] hci0 opcode 0x0c20
[ 263.560000] hci0 result 0x00
[ 263.560000] hci0 end: err 0
// Fail HCI_OP_WRITE_ENCRYPT_MODE command
[ 263.560000] hci0 start
[ 263.560000] hci0 1
[ 263.560000] hci0 opcode 0x0c22 plen 1
[ 263.560000] skb len 4
[ 263.560000] length 1
[ 263.560000] hci0 cmd_cnt 1 cmd queued 1
[ 263.560000] hci0 type 1 len 4
[ 263.560000] hci0
[ 263.570000] hci0 Event packet
[ 263.570000] hci0 status 0x01
[ 263.570000] hci0 opcode 0x0c22
[ 263.570000] opcode 0x0c22 status 0x01
[ 263.570000] hci0 opcode 0x0c22
[ 263.570000] hci0 result 0x01
[ 263.570000] hci0 end: err -56
Anyone has an idea?
Regards
Baptiste Moraine