Hi Luiz, > -----Original Message----- > From: linux-bluetooth-owner@xxxxxxxxxxxxxxx [mailto:linux-bluetooth- > owner@xxxxxxxxxxxxxxx] On Behalf Of Luiz Augusto von Dentz > Sent: Monday, May 11, 2015 5:06 PM > To: Gowtham Anandha Babu > Cc: linux-bluetooth@xxxxxxxxxxxxxxx; Bharat Bhusan Panda; > cpgs@xxxxxxxxxxx; Grzegorz Kolodziejczyk > Subject: Re: Query regarding bneptest tool > > Hi Gowtham, > > On Mon, May 11, 2015 at 2:06 PM, Gowtham Anandha Babu > <gowtham.ab@xxxxxxxxxxx> wrote: > > Hi All, > > > > I am testing BlueZ bnep test tool (tools/bneptest) using PTS 6.1.0. > > The BNEP client test cases are not passing in BT_IO_SEC_MEDIUM > > security level. > > My PTS PICS and PIXIT are same as android/pixit-bnep.txt, > > android/pics-bnep.txt. > > Whereas when the security level is BT_IO_SEC_LOW, it is passing. > > If it is a valid fix, then I will send a patch for the same. > > This is tested in Linux, not sure about android. > > It might be related to pairing then, do you have any agent registered in the > system? Check the HCI logs with btmon, it should tell us what is happening. > I have attached both logs. Below is the procedure I followed. -------------------------------------------------------------------- PTS output: Test case : TC_CTRL_BV_02_C started - Received passkey: 564246, from: gowtham-ab-0 - User canceled the current operation MMI. - MMI CM_EXIT - got an OTHERWISE - MTC: Test case ended -Final Verdict: INCONC TC_CTRL_BV_02_C finished -------------------------------------------------------------------- BlueZ output: /latest_bluez/bluez/test$ sudo ./bneptest -c 00:1B:DC:07:33:4E -b pan0 -n bnep0 bnep_client_connect connecting 00:1B:DC:07:33:4E cannot initiate bnep connection connected_client_cb ^Cgot sig = 2, cleaning up... cleanup successful - exit -------------------------------------------------------------------- /latest_bluez/bluez/test$ ./simple-agent Agent registered Release gowtham.ab@gowtham-ab:~/latest_bluez/bluez/test$ ./simple-agent Agent registered RequestConfirmation (/org/bluez/hci0/dev_00_1B_DC_07_33_4E, 564246) Confirm passkey (yes/no): yes Release -------------------------------------------------------------------- After confirming the passkey, it becomes Authentication Failure and Remote User Terminated Connection as captured in btmon, hcidump logs. What might be the problem? > > > > diff --git a/tools/bneptest.c b/tools/bneptest.c index > > 98ee9b1..fccecd2 100644 > > --- a/tools/bneptest.c > > +++ b/tools/bneptest.c > > @@ -477,7 +477,7 @@ static int bnep_client_connect(void) > > BT_IO_OPT_SOURCE_BDADDR, &src_addr, > > BT_IO_OPT_DEST_BDADDR, &dst_addr, > > BT_IO_OPT_PSM, BNEP_PSM, > > - BT_IO_OPT_SEC_LEVEL, > > BT_IO_SEC_MEDIUM, > > + BT_IO_OPT_SEC_LEVEL, > > + BT_IO_SEC_LOW, > > BT_IO_OPT_OMTU, BNEP_MTU, > > BT_IO_OPT_IMTU, BNEP_MTU, > > BT_IO_OPT_INVALID); > > > > > > Regards, > > Gowtham Anandha Babu > > > > > > -- > Luiz Augusto von Dentz > -- Regards, Gowtham Anandha Babu > To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in > the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo > info at http://vger.kernel.org/majordomo-info.html
Bluetooth monitor ver 5.30 = New Index: 00:1A:7D:DA:71:13 (BR/EDR,USB,hci0) [hci0] 0.818376 @ Device Removed: 00:1B:DC:07:33:4E (0) @ Device Removed: 00:1A:7D:DA:71:13 (0) @ Device Removed: 00:02:CA:C0:54:EF (0) @ Device Removed: CC:C3:EA:FF:E2:5F (0) < HCI Command: Write Extended Inquiry.. (0x03|0x0052) plen 241 [hci0] 7.860053 FEC: Not required (0x00) Name (complete): gowtham-ab-0 TX power: 4 dBm Device ID: USB Implementer's Forum assigned (0x0002) Vendor: Linux Foundation (0x1d6b) Product: 0x0246 Version: 5.1.14 (0x051e) 16-bit Service UUIDs (complete): 2 entries Generic Access Profile (0x1800) Generic Attribute Profile (0x1801) > HCI Event: Command Complete (0x0e) plen 4 [hci0] 7.863002 Write Extended Inquiry Response (0x03|0x0052) ncmd 1 Status: Success (0x00) < HCI Command: Write Extended Inquiry.. (0x03|0x0052) plen 241 [hci0] 8.165743 FEC: Not required (0x00) Name (complete): gowtham-ab-0 TX power: 4 dBm Device ID: USB Implementer's Forum assigned (0x0002) Vendor: Linux Foundation (0x1d6b) Product: 0x0246 Version: 5.1.14 (0x051e) 16-bit Service UUIDs (complete): 3 entries Generic Access Profile (0x1800) Generic Attribute Profile (0x1801) A/V Remote Control (0x110e) > HCI Event: Command Complete (0x0e) plen 4 [hci0] 8.168976 Write Extended Inquiry Response (0x03|0x0052) ncmd 1 Status: Success (0x00) < HCI Command: Write Extended Inquiry.. (0x03|0x0052) plen 241 [hci0] 8.180847 FEC: Not required (0x00) Name (complete): gowtham-ab-0 TX power: 4 dBm Device ID: USB Implementer's Forum assigned (0x0002) Vendor: Linux Foundation (0x1d6b) Product: 0x0246 Version: 5.1.14 (0x051e) 16-bit Service UUIDs (complete): 4 entries Generic Access Profile (0x1800) Generic Attribute Profile (0x1801) A/V Remote Control (0x110e) A/V Remote Control Target (0x110c) > HCI Event: Command Complete (0x0e) plen 4 [hci0] 8.183971 Write Extended Inquiry Response (0x03|0x0052) ncmd 1 Status: Success (0x00) @ Device Unblocked: 00:00:00:00:00:00 (0) @ Device Added: CC:C3:EA:FF:E2:5F (0) 1 @ Device Added: 00:02:CA:C0:54:EF (0) 1 @ Device Added: 00:1A:7D:DA:71:13 (0) 1 @ Device Added: 00:1B:DC:07:33:4E (0) 1 < HCI Command: Write Scan Enable (0x03|0x001a) plen 1 [hci0] 8.203096 Scan enable: Page Scan (0x02) > HCI Event: Command Complete (0x0e) plen 4 [hci0] 8.203973 Write Scan Enable (0x03|0x001a) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32 [hci0] 8.204000 Length: 3 TX power: 8 dBm @ New Settings: 0x0ad1 powered bondable ssp br/edr le secure-conn > HCI Event: Command Complete (0x0e) plen 4 [hci0] 8.218973 LE Set Advertising Data (0x08|0x0008) ncmd 1 Status: Success (0x00) @ New Settings: 0x0ad3 powered connectable bondable ssp br/edr le secure-conn < HCI Command: Write Current IAC LAP (0x03|0x003a) plen 4 [hci0] 8.247932 Number of IAC: 1 Access code: 0x9e8b33 (General Inquiry) > HCI Event: Command Complete (0x0e) plen 4 [hci0] 8.248995 Write Current IAC LAP (0x03|0x003a) ncmd 1 Status: Success (0x00) < HCI Command: Write Scan Enable (0x03|0x001a) plen 1 [hci0] 8.249021 Scan enable: Inquiry Scan + Page Scan (0x03) > HCI Event: Command Complete (0x0e) plen 4 [hci0] 8.250973 Write Scan Enable (0x03|0x001a) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32 [hci0] 8.251005 Length: 6 Flags: 0x02 LE General Discoverable Mode TX power: 8 dBm > HCI Event: Command Complete (0x0e) plen 4 [hci0] 8.255980 LE Set Advertising Data (0x08|0x0008) ncmd 1 Status: Success (0x00) @ New Settings: 0x0adb powered connectable discoverable bondable ssp br/edr le secure-conn < HCI Command: Create Connection (0x01|0x0005) plen 13 [hci0] 124.720498 Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) Packet type: 0xcc18 DM1 may be used DH1 may be used DM3 may be used DH3 may be used DM5 may be used DH5 may be used Page scan repetition mode: R2 (0x02) Page scan mode: Mandatory (0x00) Clock offset: 0x0000 Role switch: Allow slave (0x01) > HCI Event: Command Status (0x0f) plen 4 [hci0] 124.734081 Create Connection (0x01|0x0005) ncmd 1 Status: Success (0x00) > HCI Event: Connect Complete (0x03) plen 11 [hci0] 127.725098 Status: Success (0x00) Handle: 70 Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) Link type: ACL (0x01) Encryption: Disabled (0x00) < HCI Command: Read Remote Supported... (0x01|0x001b) plen 2 [hci0] 127.725227 Handle: 70 > HCI Event: Command Status (0x0f) plen 4 [hci0] 127.730074 Read Remote Supported Features (0x01|0x001b) ncmd 0 Status: Success (0x00) > HCI Event: Page Scan Repetition Mode Change (0x20) plen 7 [hci0] 127.735080 Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) Page scan repetition mode: R1 (0x01) > HCI Event: Max Slots Change (0x1b) plen 3 [hci0] 127.738110 Handle: 70 Max slots: 5 > HCI Event: Command Status (0x0f) plen 4 [hci0] 127.751101 NOP (0x00|0x0000) ncmd 1 Status: Success (0x00) > HCI Event: Read Remote Supported Features (0x0b) plen 11 [hci0] 127.758124 Status: Success (0x00) Handle: 70 Features: 0xff 0xff 0x8f 0x7e 0xd8 0x1f 0x5b 0x87 3 slot packets 5 slot packets Encryption Slot offset Timing accuracy Role switch Hold mode Sniff mode Park state Power control requests Channel quality driven data rate (CQDDR) SCO link HV2 packets HV3 packets u-law log synchronous data A-law log synchronous data CVSD synchronous data Paging parameter negotiation Power control Transparent synchronous data Broadcast Encryption Enhanced Data Rate ACL 2 Mbps mode Enhanced Data Rate ACL 3 Mbps mode Enhanced inquiry scan Interlaced inquiry scan Interlaced page scan RSSI with inquiry results AFH capable slave AFH classification slave LE Supported (Controller) 3-slot Enhanced Data Rate ACL packets 5-slot Enhanced Data Rate ACL packets Sniff subrating Pause encryption AFH capable master AFH classification master Extended Inquiry Response Simultaneous LE and BR/EDR (Controller) Secure Simple Pairing Encapsulated PDU Non-flushable Packet Boundary Flag Link Supervision Timeout Changed Event Inquiry TX Power Level Enhanced Power Control Extended features < HCI Command: Read Remote Extended F.. (0x01|0x001c) plen 3 [hci0] 127.758157 Handle: 70 Page: 1 > HCI Event: Command Status (0x0f) plen 4 [hci0] 127.763096 Read Remote Extended Features (0x01|0x001c) ncmd 1 Status: Success (0x00) > HCI Event: Read Remote Extended Features (0x23) plen 13 [hci0] 127.770079 Status: Success (0x00) Handle: 70 Page: 1/1 Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Secure Simple Pairing (Host Support) < HCI Command: Remote Name Request (0x01|0x0019) plen 10 [hci0] 127.770117 Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) Page scan repetition mode: R2 (0x02) Page scan mode: Mandatory (0x00) Clock offset: 0x0000 > HCI Event: Command Status (0x0f) plen 4 [hci0] 127.776084 Remote Name Request (0x01|0x0019) ncmd 1 Status: Success (0x00) > HCI Event: Remote Name Req Complete (0x07) plen 255 [hci0] 127.806077 Status: Success (0x00) Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) Name: PTS-BNEP-GOWTHAM-AB < HCI Command: Authentication Requested (0x01|0x0011) plen 2 [hci0] 127.806149 Handle: 70 @ Device Connected: 00:1B:DC:07:33:4E (0) flags 0x0000 14 09 50 54 53 2d 42 4e 45 50 2d 47 4f 57 54 48 ..PTS-BNEP-GOWTH 41 4d 2d 41 42 AM-AB > HCI Event: Command Status (0x0f) plen 4 [hci0] 127.808035 Authentication Requested (0x01|0x0011) ncmd 1 Status: Success (0x00) > HCI Event: Link Key Request (0x17) plen 6 [hci0] 127.809039 Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) < HCI Command: Link Key Request Negat.. (0x01|0x000c) plen 6 [hci0] 127.809070 Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) > HCI Event: Command Complete (0x0e) plen 10 [hci0] 127.815041 Link Key Request Negative Reply (0x01|0x000c) ncmd 1 Status: Success (0x00) Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) > HCI Event: IO Capability Request (0x31) plen 6 [hci0] 127.816039 Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) < HCI Command: IO Capability Request... (0x01|0x002b) plen 9 [hci0] 127.816068 Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) IO capability: DisplayYesNo (0x01) OOB data: Authentication data not present (0x00) Authentication: General Bonding - MITM required (0x05) > HCI Event: Command Complete (0x0e) plen 10 [hci0] 127.820040 IO Capability Request Reply (0x01|0x002b) ncmd 1 Status: Success (0x00) Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) > HCI Event: IO Capability Response (0x32) plen 9 [hci0] 127.842137 Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) IO capability: DisplayYesNo (0x01) OOB data: Authentication data not present (0x00) Authentication: General Bonding - MITM not required (0x04) > HCI Event: User Confirmation Request (0x33) plen 10 [hci0] 128.242120 Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) Passkey: 564246 @ User Confirmation Request: 00:1B:DC:07:33:4E (0) hint 0 value 564246 > HCI Event: Simple Pairing Complete (0x36) plen 7 [hci0] 158.243129 Status: Authentication Failure (0x05) Address: 00:1B:DC:07:33:4E (Vencer Co., Ltd.) > HCI Event: Auth Complete (0x06) plen 3 [hci0] 158.244139 Status: Authentication Failure (0x05) Handle: 70 @ Authentication Failed: 00:1B:DC:07:33:4E (0) status 0x05 < HCI Command: Read Clock Offset (0x01|0x001f) plen 2 [hci0] 158.270357 Handle: 70 > HCI Event: Command Status (0x0f) plen 4 [hci0] 158.272106 Read Clock Offset (0x01|0x001f) ncmd 1 Status: Success (0x00) < HCI Command: Disconnect (0x01|0x0006) plen 3 [hci0] 158.272142 Handle: 70 Reason: Remote User Terminated Connection (0x13) > HCI Event: Read Clock Offset Complete (0x1c) plen 5 [hci0] 158.277091 Status: Success (0x00) Handle: 70 Clock offset: 0x1f88 > HCI Event: Command Status (0x0f) plen 4 [hci0] 158.278089 Disconnect (0x01|0x0006) ncmd 1 Status: Success (0x00) > HCI Event: Disconnect Complete (0x05) plen 4 [hci0] 158.356112 Status: Success (0x00) Handle: 70 Reason: Connection Terminated By Local Host (0x16) @ Device Disconnected: 00:1B:DC:07:33:4E (0) reason 2 < HCI Command: Write Scan Enable (0x03|0x001a) plen 1 [hci0] 174.927620 Scan enable: No Scans (0x00) > HCI Event: Command Complete (0x0e) plen 4 [hci0] 174.929118 Write Scan Enable (0x03|0x001a) ncmd 1 Status: Success (0x00) @ Class of Device Changed: 0x000000 @ New Settings: 0x0ada connectable discoverable bondable ssp br/edr le secure-conn
HCI sniffer - Bluetooth packet analyzer ver 5.30 device: hci0 snap_len: 1500 filter: 0xffffffffffffffff < HCI Command: Write Extended Inquiry Response (0x03|0x0052) plen 241 fec 0x00 Complete local name: 'gowtham-ab-0' TX power level: 4 Unknown type 0x10 with 8 bytes data Complete service classes: 0x1800 0x1801 > HCI Event: Command Complete (0x0e) plen 4 Write Extended Inquiry Response (0x03|0x0052) ncmd 1 status 0x00 < HCI Command: Write Extended Inquiry Response (0x03|0x0052) plen 241 fec 0x00 Complete local name: 'gowtham-ab-0' TX power level: 4 Unknown type 0x10 with 8 bytes data Complete service classes: 0x1800 0x1801 0x110e > HCI Event: Command Complete (0x0e) plen 4 Write Extended Inquiry Response (0x03|0x0052) ncmd 1 status 0x00 < HCI Command: Write Extended Inquiry Response (0x03|0x0052) plen 241 fec 0x00 Complete local name: 'gowtham-ab-0' TX power level: 4 Unknown type 0x10 with 8 bytes data Complete service classes: 0x1800 0x1801 0x110e 0x110c > HCI Event: Command Complete (0x0e) plen 4 Write Extended Inquiry Response (0x03|0x0052) ncmd 1 status 0x00 < HCI Command: Write Scan Enable (0x03|0x001a) plen 1 enable 2 > HCI Event: Command Complete (0x0e) plen 4 Write Scan Enable (0x03|0x001a) ncmd 1 status 0x00 < HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32 > HCI Event: Command Complete (0x0e) plen 4 LE Set Advertising Data (0x08|0x0008) ncmd 1 status 0x00 < HCI Command: Write Current IAC LAP (0x03|0x003a) plen 4 IAC 0x9e8b33 (General Inquiry Access Code) > HCI Event: Command Complete (0x0e) plen 4 Write Current IAC LAP (0x03|0x003a) ncmd 1 status 0x00 < HCI Command: Write Scan Enable (0x03|0x001a) plen 1 enable 3 > HCI Event: Command Complete (0x0e) plen 4 Write Scan Enable (0x03|0x001a) ncmd 1 status 0x00 < HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32 > HCI Event: Command Complete (0x0e) plen 4 LE Set Advertising Data (0x08|0x0008) ncmd 1 status 0x00 < HCI Command: Create Connection (0x01|0x0005) plen 13 bdaddr 00:1B:DC:07:33:4E ptype 0xcc18 rswitch 0x01 clkoffset 0x0000 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 > HCI Event: Command Status (0x0f) plen 4 Create Connection (0x01|0x0005) status 0x00 ncmd 1 > HCI Event: Connect Complete (0x03) plen 11 status 0x00 handle 70 bdaddr 00:1B:DC:07:33:4E type ACL encrypt 0x00 < HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2 handle 70 > HCI Event: Command Status (0x0f) plen 4 Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0 > HCI Event: Page Scan Repetition Mode Change (0x20) plen 7 bdaddr 00:1B:DC:07:33:4E mode 1 > HCI Event: Max Slots Change (0x1b) plen 3 handle 70 slots 5 > HCI Event: Command Status (0x0f) plen 4 Unknown (0x00|0x0000) status 0x00 ncmd 1 > HCI Event: Read Remote Supported Features (0x0b) plen 11 status 0x00 handle 70 Features: 0xff 0xff 0x8f 0x7e 0xd8 0x1f 0x5b 0x87 < HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3 handle 70 page 1 > HCI Event: Command Status (0x0f) plen 4 Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1 > HCI Event: Read Remote Extended Features (0x23) plen 13 status 0x00 handle 70 page 1 max 1 Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 < HCI Command: Remote Name Request (0x01|0x0019) plen 10 bdaddr 00:1B:DC:07:33:4E mode 2 clkoffset 0x0000 > HCI Event: Command Status (0x0f) plen 4 Remote Name Request (0x01|0x0019) status 0x00 ncmd 1 > HCI Event: Remote Name Req Complete (0x07) plen 255 status 0x00 bdaddr 00:1B:DC:07:33:4E name 'PTS-BNEP-GOWTHAM-AB' < HCI Command: Authentication Requested (0x01|0x0011) plen 2 handle 70 > HCI Event: Command Status (0x0f) plen 4 Authentication Requested (0x01|0x0011) status 0x00 ncmd 1 > HCI Event: Link Key Request (0x17) plen 6 bdaddr 00:1B:DC:07:33:4E < HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6 bdaddr 00:1B:DC:07:33:4E > HCI Event: Command Complete (0x0e) plen 10 Link Key Request Negative Reply (0x01|0x000c) ncmd 1 status 0x00 bdaddr 00:1B:DC:07:33:4E > HCI Event: IO Capability Request (0x31) plen 6 bdaddr 00:1B:DC:07:33:4E < HCI Command: IO Capability Request Reply (0x01|0x002b) plen 9 bdaddr 00:1B:DC:07:33:4E capability 0x01 oob 0x00 auth 0x05 Capability: DisplayYesNo (OOB data not present) Authentication: General Bonding (MITM Protection) > HCI Event: Command Complete (0x0e) plen 10 IO Capability Request Reply (0x01|0x002b) ncmd 1 status 0x00 bdaddr 00:1B:DC:07:33:4E > HCI Event: IO Capability Response (0x32) plen 9 bdaddr 00:1B:DC:07:33:4E capability 0x01 oob 0x00 auth 0x04 Capability: DisplayYesNo (OOB data not present) Authentication: General Bonding (No MITM Protection) > HCI Event: User Confirmation Request (0x33) plen 10 bdaddr 00:1B:DC:07:33:4E passkey 564246 > HCI Event: Simple Pairing Complete (0x36) plen 7 status 0x05 bdaddr 00:1B:DC:07:33:4E Error: Authentication Failure > HCI Event: Auth Complete (0x06) plen 3 status 0x05 handle 70 Error: Authentication Failure < HCI Command: Read Clock Offset (0x01|0x001f) plen 2 handle 70 > HCI Event: Command Status (0x0f) plen 4 Read Clock Offset (0x01|0x001f) status 0x00 ncmd 1 < HCI Command: Disconnect (0x01|0x0006) plen 3 handle 70 reason 0x13 Reason: Remote User Terminated Connection > HCI Event: Read Clock Offset Complete (0x1c) plen 5 status 0x00 handle 70 clkoffset 0x1f88 > HCI Event: Command Status (0x0f) plen 4 Disconnect (0x01|0x0006) status 0x00 ncmd 1 > HCI Event: Disconn Complete (0x05) plen 4 status 0x00 handle 70 reason 0x16 Reason: Connection Terminated by Local Host < HCI Command: Write Scan Enable (0x03|0x001a) plen 1 enable 0 > HCI Event: Command Complete (0x0e) plen 4 Write Scan Enable (0x03|0x001a) ncmd 1 status 0x00