noble / bleno

A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals
MIT License
2.12k stars 447 forks source link

crash during the bonding #217

Open leducb opened 7 years ago

leducb commented 7 years ago

Hi sandeepmistry , first of all thank for your work !

I am here because I am facing an unexpected problem when i'm trying to bonding my phone (android 6.0.1/ OP3) to my rasp on ubutu mate (LTS) with the included bluetooth adapter or with an external adapter.

this is the crash log :

`/home/****/node_modules/bleno/lib/hci-socket/crypto.js:60 var output = new Buffer(input.length); ^

TypeError: Cannot read property 'length' of undefined at swap (/home/*_u/node_modules/bleno/lib/hci-socket/crypto.js:60:32) at e (/home/__/nodemodules/bleno/lib/hci-socket/crypto.js:37:9) at Object.c1 (/home/_/node_modules/bleno/lib/hci-socket/crypto.js:22:9) at Smp.handlePairingRandom (/home/__/nodemodules/bleno/lib/hci-socket/smp.js:130:12) at Smp.onAclStreamData (/home/_/node_modules/bleno/lib/hci-socket/smp.js:58:10) at emitTwo (events.js:92:20) at emit (events.js:172:7) at AclStream.push (/home/*__/nodemodules/bleno/lib/hci-socket/acl-stream.js:26:10) at BlenoBindings.onAclDataPkt (/home//node_modules/bleno/lib/hci-socket/bindings.js:198:21) at emitThree (events.js:97:13)`

leducb commented 7 years ago

the hcidump output :

bleno servicesSet +3ms hci onSocketData: 040e0401092000 +2ms hci event type = 4 +0ms hci sub event type = 14 +1ms hci cmd = 8201 +1ms hci status = 0 +0ms hci result = +0ms hci onSocketData: 040e0401082000 +1ms hci event type = 4 +1ms hci sub event type = 14 +0ms hci cmd = 8200 +0ms hci status = 0 +0ms hci result = +1ms hci onSocketData: 043e13010044000101a5e4e96f514f24000000d00700 +8s hci event type = 4 +1ms hci sub event type = 62 +0ms hci LE meta event type = 1 +1ms hci LE meta event status = 0 +0ms hci LE meta event data = 44000101a5e4e96f514f24000000d00700 +0ms hci handle = 68 +2ms hci role = 1 +1ms hci address type = random +0ms hci address = 4f:51:6f:e9:e4:a5 +0ms hci interval = 45 +0ms hci latency = 0 +0ms hci supervision timeout = 20000 +1ms hci master clock accuracy = 0 +0ms bleno accept 4f:51:6f:e9:e4:a5 +13ms mgmt on data ->0b0001000d00a5e4e96f514f02000000000000 +1ms hci onSocketData: 02440010000c00050012010800280038000000d007 +4ms hci event type = 2 +1ms hci onSocketData: 0244200a0006000500130102000000 +44ms hci event type = 2 +1ms hci cid = 5 +1ms hci handle = 68 +0ms hci data = 130102000000 +0ms hci onSocketData: 0244200b0007000400100100ffff0028 +2ms hci event type = 2 +1ms hci cid = 4 +0ms hci handle = 68 +0ms hci data = 100100ffff0028 +0ms gatt handing request: 100100ffff0028 +30ms gatt read by group: startHandle = 0x1, endHandle = 0xffff, uuid = 0x2800 +8ms gatt response: 1106010005000018060009000118 +8ms gatt send: 1106010005000018060009000118 +2ms hci write acl data pkt - writing: 02440012000e0004001106010005000018060009000118 +3ms hci onSocketData: 0244200b0007000400100a00ffff0028 +82ms hci event type = 2 +1ms hci cid = 4 +0ms hci handle = 68 +1ms hci data = 100a00ffff0028 +0ms gatt handing request: 100a00ffff0028 +0ms gatt read by group: startHandle = 0xa, endHandle = 0xffff, uuid = 0x2800 +1ms gatt response: 11140a000f001bc5d5a50200c2a1e4111809c0d6daae +1ms gatt send: 11140a000f001bc5d5a50200c2a1e4111809c0d6daae +0ms hci write acl data pkt - writing: 0244001a001600040011140a000f001bc5d5a50200c2a1e4111809c0d6daae +1ms hci onSocketData: 0244200b0007000400101000ffff0028 +83ms hci event type = 2 +1ms hci cid = 4 +1ms hci handle = 68 +0ms hci data = 101000ffff0028 +1ms gatt handing request: 101000ffff0028 +0ms gatt read by group: startHandle = 0x10, endHandle = 0xffff, uuid = 0x2800 +1ms gatt response: 011010000a +1ms gatt send: 011010000a +1ms hci write acl data pkt - writing: 024400090005000400011010000a +0ms hci onSocketData: 0244200b000700040008010005000228 +84ms hci event type = 2 +0ms hci cid = 4 +0ms hci handle = 68 +1ms hci data = 08010005000228 +0ms gatt handing request: 08010005000228 +0ms gatt read by type: startHandle = 0x1, endHandle = 0x5, uuid = 0x2802 +2ms gatt response: 010801000a +1ms gatt send: 010801000a +0ms hci write acl data pkt - writing: 024400090005000400010801000a +0ms hci onSocketData: 0244200b000700040008010005000328 +86ms hci event type = 2 +0ms hci cid = 4 +1ms hci handle = 68 +0ms hci data = 08010005000328 +0ms gatt handing request: 08010005000328 +0ms gatt read by type: startHandle = 0x1, endHandle = 0x5, uuid = 0x2803 +0ms gatt response: 09070200020300002a0400020500012a +1ms gatt send: 09070200020300002a0400020500012a +0ms hci write acl data pkt - writing: 02440014001000040009070200020300002a0400020500012a +1ms hci onSocketData: 043e0a0300440036000000d007 +41ms hci event type = 4 +1ms hci sub event type = 62 +0ms hci LE meta event type = 3 +0ms hci LE meta event status = 0 +0ms hci LE meta event data = 440036000000d007 +0ms hci handle = 68 +1ms hci interval = 67.5 +3ms hci latency = 0 +0ms hci supervision timeout = 20000 +1ms hci onSocketData: 0244200b000700040008050005000328 +174ms hci event type = 2 +0ms hci cid = 4 +0ms hci handle = 68 +1ms hci data = 08050005000328 +0ms gatt handing request: 08050005000328 +0ms gatt read by type: startHandle = 0x5, endHandle = 0x5, uuid = 0x2803 +0ms gatt response: 010805000a +0ms gatt send: 010805000a +0ms hci write acl data pkt - writing: 024400090005000400010805000a +0ms hci onSocketData: 0244200b000700040008060009000228 +134ms hci event type = 2 +1ms hci cid = 4 +0ms hci handle = 68 +0ms hci data = 08060009000228 +1ms gatt handing request: 08060009000228 +0ms gatt read by type: startHandle = 0x6, endHandle = 0x9, uuid = 0x2802 +0ms gatt response: 010806000a +1ms gatt send: 010806000a +0ms hci write acl data pkt - writing: 024400090005000400010806000a +0ms hci onSocketData: 0244200b000700040008060009000328 +132ms hci event type = 2 +1ms hci cid = 4 +0ms hci handle = 68 +0ms hci data = 08060009000328 +1ms gatt handing request: 08060009000328 +0ms gatt read by type: startHandle = 0x6, endHandle = 0x9, uuid = 0x2803 +0ms gatt response: 09070700200800052a +1ms gatt send: 09070700200800052a +0ms hci write acl data pkt - writing: 0244000d000900040009070700200800052a +0ms hci onSocketData: 0244200b000700040008080009000328 +133ms hci event type = 2 +0ms hci cid = 4 +0ms hci handle = 68 +1ms hci data = 08080009000328 +0ms gatt handing request: 08080009000328 +0ms gatt read by type: startHandle = 0x8, endHandle = 0x9, uuid = 0x2803 +1ms gatt response: 010808000a +0ms gatt send: 010808000a +0ms hci write acl data pkt - writing: 024400090005000400010808000a +0ms hci onSocketData: 0244200900050004000409000900 +133ms hci event type = 2 +0ms hci cid = 4 +0ms hci handle = 68 +1ms hci data = 0409000900 +0ms gatt handing request: 0409000900 +0ms gatt response: 050109000229 +4ms gatt send: 050109000229 +1ms hci write acl data pkt - writing: 0244000a0006000400050109000229 +0ms hci onSocketData: 043e0a0300440006000000d007 +127ms hci event type = 4 +1ms hci sub event type = 62 +0ms hci LE meta event type = 3 +0ms hci LE meta event status = 0 +0ms hci LE meta event data = 440006000000d007 +1ms hci handle = 68 +0ms hci interval = 7.5 +0ms hci latency = 0 +1ms hci supervision timeout = 20000 +0ms hci onSocketData: 0244200b0007000400080a000f000228 +6ms hci event type = 2 +0ms hci cid = 4 +1ms hci handle = 68 +0ms hci data = 080a000f000228 +0ms gatt handing request: 080a000f000228 +1ms gatt read by type: startHandle = 0xa, endHandle = 0xf, uuid = 0x2802 +0ms gatt response: 01080a000a +0ms gatt send: 01080a000a +0ms hci write acl data pkt - writing: 02440009000500040001080a000a +1ms hci onSocketData: 0244200b0007000400080a000f000328 +12ms hci event type = 2 +2ms hci cid = 4 +0ms hci handle = 68 +0ms hci data = 080a000f000328 +1ms gatt handing request: 080a000f000328 +1ms gatt read by type: startHandle = 0xa, endHandle = 0xf, uuid = 0x2803 +0ms gatt response: 09150b00080c001bc5d5a502006eade31153d0c0492b67 +2ms gatt send: 09150b00080c001bc5d5a502006eade31153d0c0492b67 +0ms hci write acl data pkt - writing: 0244001b001700040009150b00080c001bc5d5a502006eade31153d0c0492b67 +0ms hci onSocketData: 0244200b0007000400080c000f000328 +17ms hci event type = 2 +1ms hci cid = 4 +1ms hci handle = 68 +0ms hci data = 080c000f000328 +0ms gatt handing request: 080c000f000328 +1ms gatt read by type: startHandle = 0xc, endHandle = 0xf, uuid = 0x2803 +1ms gatt response: 09150d00120e001bc5d5a50200c2b0e411180960c729bb +1ms gatt send: 09150d00120e001bc5d5a50200c2b0e411180960c729bb +0ms hci write acl data pkt - writing: 0244001b001700040009150d00120e001bc5d5a50200c2b0e411180960c729bb +1ms hci onSocketData: 0244200b0007000400080e000f000328 +17ms hci event type = 2 +0ms hci cid = 4 +1ms hci handle = 68 +0ms hci data = 080e000f000328 +0ms gatt handing request: 080e000f000328 +0ms gatt read by type: startHandle = 0xe, endHandle = 0xf, uuid = 0x2803 +1ms gatt response: 01080e000a +0ms gatt send: 01080e000a +0ms hci write acl data pkt - writing: 02440009000500040001080e000a +1ms hci onSocketData: 024420090005000400040f000f00 +11ms hci event type = 2 +0ms hci cid = 4 +1ms hci handle = 68 +1ms hci data = 040f000f00 +1ms gatt handing request: 040f000f00 +0ms gatt response: 05010f000229 +2ms gatt send: 05010f000229 +1ms hci write acl data pkt - writing: 0244000a000600040005010f000229 +1ms hci onSocketData: 043e0a0300440036000000d007 +83ms hci event type = 4 +0ms hci sub event type = 62 +1ms hci LE meta event type = 3 +1ms hci LE meta event status = 0 +1ms hci LE meta event data = 440036000000d007 +2ms hci handle = 68 +0ms hci interval = 67.5 +1ms hci latency = 0 +1ms hci supervision timeout = 20000 +1ms hci onSocketData: 024420170013000400120c005345424163747269667279536d617274 +2s hci event type = 2 +0ms hci cid = 4 +1ms hci handle = 68 +0ms hci data = 120c005345424163747269667279536d617274 +0ms gatt handing request: 120c005345424163747269667279536d617274 +0ms gatt response: 01120c0005 +4ms gatt send: 01120c0005 +1ms hci write acl data pkt - writing: 02440009000500040001120c0005 +0ms hci onSocketData: 0244200b00070006000104000d100707 +197ms hci event type = 2 +0ms hci cid = 6 +0ms hci handle = 68 +1ms hci data = 0104000d100707 +0ms hci write acl data pkt - writing: 0244000b000700060002030001100001 +1ms hci onSocketData: 0244000b00070006000204000d100705 +1ms hci event type = 2 +0ms hci onSocketData: 0244201b00410006000cd7169839d1cfbd25e0e6b687c957121298ed2d2db646 +267ms hci event type = 2 +0ms hci cid = 6 +0ms hci onSocketData: 0244101b00c92f47994458dd93a76e47d16c6c21e2125538bc560eb65c47543a +1ms hci event type = 2 +0ms hci onSocketData: 0244100f00a100ff9e80978d8b4d164900aab82d +3ms hci event type = 2 +0ms hci onSocketData: 0244004500410006000c2a067c0919e4486ddfa38394731afbe4b59cd310892ac868d9b664ba3104e7eb66923c24e2eacbaf6f455aa12208a33fe0aa27678eea7c6959fd90b41e5539c7 +26ms hci event type = 2 +0ms hci onSocketData: 02440015001100060003b343b335f3ca1b28835f110179a1b665 +0ms hci event type = 2 +1ms hci onSocketData: 02442015001100060004b888c57b899b65d322682433df34bbed +172ms hci event type = 2 +0ms hci cid = 6 +1ms hci handle = 68 +0ms hci data = 04b888c57b899b65d322682433df34bbed +0ms hci set advertise enable - writing: 010a200100 +13ms bindings disconnect by server +1ms hci disconnect - writing: 01060403440013 +2ms

sandeepmistry commented 7 years ago

@leducb could you dive into lib/hci-socket/smp.js and add some console.log statements to determine which of the function arguments is null?

leducb commented 7 years ago

@sandeepmistry this is the output for handlePairingConfirm : bleno - echo on -> stateChange: poweredOn on -> advertisingStart: success on -> accpet: 58:1f:bb:94:33:78 handlePairingrandom data = 1�V���,�h�_�O buffer creation this._tk = undefined r = V���  this._iat =  this._ia = x3��X this._rat = this._ra = q�}

so i think this_tk is null, i think it's because _tk is never assigned except in "handlePairingConfirm" but i put some console.log on it but "handlePairingConfirm" is call after "handlePairingRandom" so my console.log never shown;

If you have other question i'm very reactive.

thanks again

sandeepmistry commented 7 years ago

@leducb one more request, can you also provide and HCI dump capture sudo hcidump -t -x.

WIStudent commented 7 years ago

I am getting the exact same error message. Here is my HCI dump: EDIT: Better dump, the first one contained multiple pairing requests for some reason.

HCI sniffer - Bluetooth packet analyzer ver 5.42
device: hci0 snap_len: 1500 filter: 0xffffffff
2016-10-30 04:08:21.267131 > HCI Event: LE Meta Event (0x3e) plen 19
    LE Connection Complete
      status 0x00 handle 64, role slave
      bdaddr 6B:8C:C8:62:CD:3C (Random)
2016-10-30 04:08:21.267458 < HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2
  40 00 
2016-10-30 04:08:21.269485 > HCI Event: Command Status (0x0f) plen 4
    LE Read Remote Used Features (0x08|0x0016) status 0x00 ncmd 1
2016-10-30 04:08:21.503966 > ACL data: handle 64 flags 0x02 dlen 13
    ATT: Find By Type req (0x06)
      start 0x0001, end 0xffff, uuid 0x2800
      value 0x01 0x18
2016-10-30 04:08:21.504549 > ACL data: handle 64 flags 0x02 dlen 11
    SMP: Pairing Request (0x01)
      capability 0x04 oob 0x00 auth req 0x0d
      max key size 0x10 init key dist 0x07 resp key dist 0x07
      Capability: KeyboardDisplay (OOB data not present)
      Authentication: Bonding (MITM Protection)
      Initiator Key Distribution:  LTK IRK CSRK
      Responder Key Distribution:  LTK IRK CSRK
2016-10-30 04:08:21.548998 > HCI Event: LE Meta Event (0x3e) plen 12
    LE Read Remote Used Features Complete
      status 0x00 handle 64
      Features: 0x1f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
2016-10-30 04:08:21.549081 < ACL data: handle 64 flags 0x00 dlen 16
    L2CAP(d): cid 0x0005 len 12 [psm 0]
      12 01 08 00 28 00 38 00 00 00 D0 07 
2016-10-30 04:08:21.549186 < ACL data: handle 64 flags 0x00 dlen 11
    SMP: Pairing Response (0x02)
      capability 0x03 oob 0x00 auth req 0x0d
      max key size 0x10 init key dist 0x07 resp key dist 0x05
      Capability: NoInputNoOutput (OOB data not present)
      Authentication: Bonding (MITM Protection)
      Initiator Key Distribution:  LTK IRK CSRK
      Responder Key Distribution:  LTK  CSRK
2016-10-30 04:08:21.567126 < ACL data: handle 64 flags 0x00 dlen 9
    ATT: Find By Type resp (0x07)
      Found attr 0x0006, group end handle 0x0009
2016-10-30 04:08:21.569491 < ACL data: handle 64 flags 0x00 dlen 11
    SMP: Pairing Response (0x02)
      capability 0x03 oob 0x00 auth req 0x01
      max key size 0x10 init key dist 0x00 resp key dist 0x01
      Capability: NoInputNoOutput (OOB data not present)
      Authentication: Bonding (No MITM Protection)
      Initiator Key Distribution:    
      Responder Key Distribution:  LTK  
2016-10-30 04:08:21.685019 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 64 packets 2
2016-10-30 04:08:21.728983 > ACL data: handle 64 flags 0x02 dlen 10
    L2CAP(d): cid 0x0005 len 6 [psm 0]
      13 01 02 00 00 00 
2016-10-30 04:08:21.729247 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 64 packets 2
2016-10-30 04:08:21.729499 > ACL data: handle 64 flags 0x02 dlen 13
    ATT: Find By Type req (0x06)
      start 0x000a, end 0xffff, uuid 0x2800
      value 0x01 0x18
2016-10-30 04:08:21.731889 < ACL data: handle 64 flags 0x00 dlen 9
    ATT: Error (0x01)
      Error: Attribute not found (10)
      Find By Type req (0x06) on handle 0x000a
2016-10-30 04:08:21.774234 > ACL data: handle 64 flags 0x02 dlen 27
2016-10-30 04:08:21.775101 > ACL data: handle 64 flags 0x01 dlen 27
2016-10-30 04:08:21.818991 > ACL data: handle 64 flags 0x01 dlen 15
    SMP: Unknown (0x0c)
    5A 0C 3C F4 C8 FD 9F 82 20 B2 37 3A D5 E0 B5 4B 7E 32 2F 51 
    F2 02 24 3C BC 70 50 CD 67 88 A1 67 10 90 C5 35 D7 8C 18 34 
    C4 31 23 86 CA EB 92 D1 72 06 CD 7D A6 74 47 60 AD A3 3D 5A 
    24 72 A9 B5 
2016-10-30 04:08:21.845550 < ACL data: handle 64 flags 0x00 dlen 69
    SMP: Unknown (0x0c)
    8A F2 41 D4 4E F6 8D 60 6C 4A 55 7A AE 7F 70 95 65 9A CD 8D 
    55 14 56 68 D9 A1 7C D4 0F 02 B9 F5 EB 13 F7 90 B7 7F CF EA 
    CD 38 E4 9F AE 92 72 18 31 43 97 B6 70 47 B7 E6 74 71 E8 A6 
    97 13 45 95 
2016-10-30 04:08:21.845580 < ACL data: handle 64 flags 0x00 dlen 21
    SMP: Pairing Confirm (0x03)
      key 7e858066be8079d3f67e35d57033c2d2
2016-10-30 04:08:21.908911 > ACL data: handle 64 flags 0x02 dlen 11
    ATT: Read By Type req (0x08)
      start 0x0001, end 0x0009
      type-uuid 0x2803
2016-10-30 04:08:21.912583 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 64 packets 2
2016-10-30 04:08:21.915937 < ACL data: handle 64 flags 0x00 dlen 27
    ATT: Read By Type resp (0x09)
      length: 7
        handle 0x0002, value 0x02 0x03 0x00 0x00 0x2a 
        handle 0x0004, value 0x02 0x05 0x00 0x01 0x2a 
        handle 0x0007, value 0x20 0x08 0x00 0x05 0x2a 
2016-10-30 04:08:21.998970 > ACL data: handle 64 flags 0x02 dlen 11
    ATT: Read By Type req (0x08)
      start 0x0008, end 0x0009
      type-uuid 0x2803
2016-10-30 04:08:21.999202 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 64 packets 2
2016-10-30 04:08:21.999656 > ACL data: handle 64 flags 0x02 dlen 21
    SMP: Pairing Random (0x04)
      random b31c7052bc880db54ec82b343e4f297c
2016-10-30 04:08:21.999772 < ACL data: handle 64 flags 0x00 dlen 21
    SMP: Pairing Random (0x04)
      random 96370ac5d6cefe47c58b6dc826467b39
2016-10-30 04:08:22.000793 < ACL data: handle 64 flags 0x00 dlen 9
    ATT: Error (0x01)
      Error: Attribute not found (10)
      Read By Type req (0x08) on handle 0x0008
2016-10-30 04:08:22.017369 < HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1
  00 
2016-10-30 04:08:22.017813 > HCI Event: Command Complete (0x0e) plen 4
    LE Set Advertise Enable (0x08|0x000a) ncmd 1
    status 0x0c
    Error: Command Disallowed
2016-10-30 04:08:22.019320 < HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 64 reason 0x13
    Reason: Remote User Terminated Connection
2016-10-30 04:08:22.019801 > HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
2016-10-30 04:08:22.089982 > HCI Event: Number of Completed Packets (0x13) plen 5
    handle 64 packets 2
2016-10-30 04:08:22.090256 > HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 64 reason 0x16
    Reason: Connection Terminated by Local Host
WIStudent commented 7 years ago

Seeing that there are two Pairing Responses made me suspect that something else besides bleno is trying to answer to the Pairing Request. As in issue #225 suggested I tried using sudo hciconfig hci0 down and sudo HCI_CHANNEL_USER=1 node <file>.js to prevent the kernel from handling SMP messages. That fixed the initial problem but revealed a new one. Now it fails to respond to the LE Long Term Key Request, as you can see in the following HCI dump. Issue #187 seems to deal with this problem already.

> HCI Event: LE Meta Event (0x3e) plen 19                                                                                                                                                   [hci0] 5.098756
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 64
        Role: Slave (0x01)
        Peer address type: Random (0x01)
        Peer address: 7C:B4:FA:30:DA:AE (Resolvable)
        Connection interval: 45.00 msec (0x0024)
        Connection latency: 0.00 msec (0x0000)
        Supervision timeout: 20000 msec (0x07d0)
        Master clock accuracy: 0x00
> ACL Data RX: Handle 64 flags 0x02 dlen 13                                                                                                                                                 [hci0] 5.346323
      ATT: Find By Type Value Request (0x06) len 8
        Handle range: 0x0001-0xffff
        Attribute type: Primary Service (0x2800)
          UUID: Generic Attribute Profile (0x1801)
> ACL Data RX: Handle 64 flags 0x02 dlen 11                                                                                                                                                 [hci0] 5.346879
      SMP: Pairing Request (0x01) len 6
        IO capability: KeyboardDisplay (0x04)
        OOB data: Authentication data not present (0x00)
        Authentication requirement: Bonding, MITM, SC, No Keypresses (0x0d)
        Max encryption key size: 16
        Initiator key distribution: EncKey IdKey Sign (0x07)
        Responder key distribution: EncKey IdKey Sign (0x07)
< ACL Data TX: Handle 64 flags 0x00 dlen 9                                                                                                                                                  [hci0] 5.355627
      ATT: Find By Type Value Response (0x07) len 4
        Handle range: 0x0006-0x0009
< ACL Data TX: Handle 64 flags 0x00 dlen 11                                                                                                                                                 [hci0] 5.359591
      SMP: Pairing Response (0x02) len 6
        IO capability: NoInputNoOutput (0x03)
        OOB data: Authentication data not present (0x00)
        Authentication requirement: Bonding, No MITM, Legacy, No Keypresses (0x01)
        Max encryption key size: 16
        Initiator key distribution: <none> (0x00)
        Responder key distribution: EncKey (0x01)
> ACL Data RX: Handle 64 flags 0x02 dlen 13                                                                                                                                                 [hci0] 5.436381
      ATT: Find By Type Value Request (0x06) len 8
        Handle range: 0x000a-0xffff
        Attribute type: Primary Service (0x2800)
          UUID: Generic Attribute Profile (0x1801)
> HCI Event: Number of Completed Packets (0x13) plen 5                                                                                                                                      [hci0] 5.436613
        Num handles: 1
        Handle: 64
        Count: 2
< ACL Data TX: Handle 64 flags 0x00 dlen 9                                                                                                                                                  [hci0] 5.438303
      ATT: Error Response (0x01) len 4
        Find By Type Value Request (0x06)
        Handle: 0x000a
        Error: Attribute Not Found (0x0a)
> ACL Data RX: Handle 64 flags 0x02 dlen 21                                                                                                                                                 [hci0] 5.481459
      SMP: Pairing Confirm (0x03) len 16
        Confim value: 528b0718d4e83c2ea79fa9e881484ce7
< ACL Data TX: Handle 64 flags 0x00 dlen 21                                                                                                                                                 [hci0] 5.492555
      SMP: Pairing Confirm (0x03) len 16
        Confim value: 06a9aa90088b51b87b493be404b6c5bc
> ACL Data RX: Handle 64 flags 0x02 dlen 11                                                                                                                                                 [hci0] 5.526272
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0001-0x0009
        Attribute type: Characteristic (0x2803)
< ACL Data TX: Handle 64 flags 0x00 dlen 27                                                                                                                                                 [hci0] 5.532378
      ATT: Read By Type Response (0x09) len 22
        Attribute data length: 7
        Attribute data list: 3 entries
        Handle: 0x0002
        Value: 020300002a
        Handle: 0x0004
        Value: 020500012a
        Handle: 0x0007
        Value: 200800052a
> ACL Data RX: Handle 64 flags 0x02 dlen 21                                                                                                                                                 [hci0] 5.571566
      SMP: Pairing Random (0x04) len 16
        Random value: 68221612b10334a4e40d3042696b58ed
> HCI Event: Number of Completed Packets (0x13) plen 5                                                                                                                                      [hci0] 5.571619
        Num handles: 1
        Handle: 64
        Count: 2
< ACL Data TX: Handle 64 flags 0x00 dlen 21                                                                                                                                                 [hci0] 5.580731
      SMP: Pairing Random (0x04) len 16
        Random value: 6b5bb5b073b5083b6ccbc4c87461bf0d
> ACL Data RX: Handle 64 flags 0x02 dlen 11                                                                                                                                                 [hci0] 5.623775
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0008-0x0009
        Attribute type: Characteristic (0x2803)
> HCI Event: LE Meta Event (0x3e) plen 10                                                                                                                                                   [hci0] 5.624864
      LE Connection Update Complete (0x03)
        Status: Success (0x00)
        Handle: 64
        Connection interval: 7.50 msec (0x0006)
        Connection latency: 0.00 msec (0x0000)
        Supervision timeout: 20000 msec (0x07d0)
< ACL Data TX: Handle 64 flags 0x00 dlen 9                                                                                                                                                  [hci0] 5.624916
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0008
        Error: Attribute Not Found (0x0a)
> HCI Event: Number of Completed Packets (0x13) plen 5                                                                                                                                      [hci0] 5.631242
        Num handles: 1
        Handle: 64
        Count: 2
> HCI Event: LE Meta Event (0x3e) plen 13                                                                                                                                                   [hci0] 5.646870
      LE Long Term Key Request (0x05)
        Handle: 64
        Random number: 0x0000000000000000
        Encrypted diversifier: 0x0000
> HCI Event: Number of Completed Packets (0x13) plen 5                                                                                                                                      [hci0] 5.845967
        Num handles: 1
        Handle: 64
        Count: 1
> HCI Event: Encryption Change (0x08) plen 4                                                                                                                                               [hci0] 35.676589
        Status: Remote User Terminated Connection (0x13)
        Handle: 64
        Encryption: Disabled (0x00)
> HCI Event: Disconnect Complete (0x05) plen 4                                                                                                                                             [hci0] 35.677555
        Status: Success (0x00)
        Handle: 64
        Reason: Remote User Terminated Connection (0x13)
< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1                                                                                                                                [hci0] 35.681711
        Advertising: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                [hci0] 35.682255
      LE Set Advertise Enable (0x08|0x000a) ncmd 1
        Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19                                                                                                                                                  [hci0] 35.685810
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 64
        Role: Slave (0x01)
        Peer address type: Random (0x01)
        Peer address: 7C:B4:FA:30:DA:AE (Resolvable)
        Connection interval: 45.00 msec (0x0024)
        Connection latency: 0.00 msec (0x0000)
        Supervision timeout: 20000 msec (0x07d0)
        Master clock accuracy: 0x00
> ACL Data RX: Handle 64 flags 0x02 dlen 13                                                                                                                                                [hci0] 35.901677
      ATT: Find By Type Value Request (0x06) len 8
        Handle range: 0x0001-0xffff
        Attribute type: Primary Service (0x2800)
          UUID: Generic Attribute Profile (0x1801)
> ACL Data RX: Handle 64 flags 0x02 dlen 11                                                                                                                                                [hci0] 35.902256
      SMP: Pairing Request (0x01) len 6
        IO capability: KeyboardDisplay (0x04)
        OOB data: Authentication data not present (0x00)
        Authentication requirement: Bonding, MITM, SC, No Keypresses (0x0d)
        Max encryption key size: 16
        Initiator key distribution: EncKey IdKey Sign (0x07)
        Responder key distribution: EncKey IdKey Sign (0x07)
< ACL Data TX: Handle 64 flags 0x00 dlen 9                                                                                                                                                 [hci0] 35.902731
      ATT: Find By Type Value Response (0x07) len 4
        Handle range: 0x0006-0x0009
< ACL Data TX: Handle 64 flags 0x00 dlen 11                                                                                                                                                [hci0] 35.903973
      SMP: Pairing Response (0x02) len 6
        IO capability: NoInputNoOutput (0x03)
        OOB data: Authentication data not present (0x00)
        Authentication requirement: Bonding, No MITM, Legacy, No Keypresses (0x01)
        Max encryption key size: 16
        Initiator key distribution: <none> (0x00)
        Responder key distribution: EncKey (0x01)
> ACL Data RX: Handle 64 flags 0x02 dlen 13                                                                                                                                                [hci0] 35.991749
      ATT: Find By Type Value Request (0x06) len 8
        Handle range: 0x000a-0xffff
        Attribute type: Primary Service (0x2800)
          UUID: Generic Attribute Profile (0x1801)
> HCI Event: Number of Completed Packets (0x13) plen 5                                                                                                                                     [hci0] 35.991909
        Num handles: 1
        Handle: 64
        Count: 2
> ACL Data RX: Handle 64 flags 0x02 dlen 21                                                                                                                                                [hci0] 35.992374
      SMP: Pairing Confirm (0x03) len 16
        Confim value: 64513d1dc9fb2065f1f2e8cf24aa02da
< ACL Data TX: Handle 64 flags 0x00 dlen 9                                                                                                                                                 [hci0] 35.993536
      ATT: Error Response (0x01) len 4
        Find By Type Value Request (0x06)
        Handle: 0x000a
        Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 64 flags 0x00 dlen 21                                                                                                                                                [hci0] 35.996670
      SMP: Pairing Confirm (0x03) len 16
        Confim value: 6f031dca63afea75c1650532cf51ac29
> ACL Data RX: Handle 64 flags 0x02 dlen 11                                                                                                                                                [hci0] 36.081680
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0001-0x0009
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5                                                                                                                                     [hci0] 36.081891
        Num handles: 1
        Handle: 64
        Count: 2
> ACL Data RX: Handle 64 flags 0x02 dlen 21                                                                                                                                                [hci0] 36.082371
      SMP: Pairing Random (0x04) len 16
        Random value: 62f85f05003297af94ffed059e3025ee
< ACL Data TX: Handle 64 flags 0x00 dlen 27                                                                                                                                                [hci0] 36.083144
      ATT: Read By Type Response (0x09) len 22
        Attribute data length: 7
        Attribute data list: 3 entries
        Handle: 0x0002
        Value: 020300002a
        Handle: 0x0004
        Value: 020500012a
        Handle: 0x0007
        Value: 200800052a
< ACL Data TX: Handle 64 flags 0x00 dlen 21                                                                                                                                                [hci0] 36.087930
      SMP: Pairing Random (0x04) len 16
        Random value: 40d402d5b7038c4ee9685037f761e2ae
> HCI Event: LE Meta Event (0x3e) plen 10                                                                                                                                                  [hci0] 36.180787
      LE Connection Update Complete (0x03)
        Status: Success (0x00)
        Handle: 64
        Connection interval: 7.50 msec (0x0006)
        Connection latency: 0.00 msec (0x0000)
        Supervision timeout: 20000 msec (0x07d0)
> ACL Data RX: Handle 64 flags 0x02 dlen 11                                                                                                                                                [hci0] 36.194171
      ATT: Read By Type Request (0x08) len 6
        Handle range: 0x0008-0x0009
        Attribute type: Characteristic (0x2803)
> HCI Event: Number of Completed Packets (0x13) plen 5                                                                                                                                     [hci0] 36.194406
        Num handles: 1
        Handle: 64
        Count: 2
< ACL Data TX: Handle 64 flags 0x00 dlen 9                                                                                                                                                 [hci0] 36.195134
      ATT: Error Response (0x01) len 4
        Read By Type Request (0x08)
        Handle: 0x0008
        Error: Attribute Not Found (0x0a)
> HCI Event: LE Meta Event (0x3e) plen 13                                                                                                                                                  [hci0] 36.195293
      LE Long Term Key Request (0x05)
        Handle: 64
        Random number: 0x0000000000000000
        Encrypted diversifier: 0x0000
> HCI Event: Encryption Change (0x08) plen 4                                                                                                                                               [hci0] 69.164507
        Status: Remote User Terminated Connection (0x13)
        Handle: 64
        Encryption: Disabled (0x00)
> HCI Event: Number of Completed Packets (0x13) plen 5                                                                                                                                     [hci0] 69.165476
        Num handles: 1
        Handle: 64
        Count: 1
> HCI Event: Disconnect Complete (0x05) plen 4                                                                                                                                             [hci0] 69.165675
        Status: Success (0x00)
        Handle: 64
        Reason: Remote User Terminated Connection (0x13)
< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1                                                                                                                                [hci0] 69.169707
        Advertising: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4                                                                                                                                                [hci0] 69.170253
      LE Set Advertise Enable (0x08|0x000a) ncmd 1
        Status: Success (0x00)

In the end I managed to establish a pairing by preventing bleno from handling the SMP messages and letting the kernel handle the whole pairing procedure. In order to do that I commented out the following code in the smp.js starting at line 53:

  if (SMP_PAIRING_REQUEST === code) {
    this.handlePairingRequest(data);
  } else if (SMP_PAIRING_CONFIRM === code) {
    this.handlePairingConfirm(data);
  } else if (SMP_PAIRING_RANDOM === code) {
    this.handlePairingRandom(data);
  } else if (SMP_PAIRING_FAILED === code) {
    this.handlePairingFailed(data);
}

By the way I am using a Raspberry Pi 3 with kernel 4.7.6.

jollobajano commented 6 years ago

Doing nothing but commenting out that if-statement worked for me :/ RPi3, kernel version: 4.14.30

ghost commented 6 years ago

@jollobajano @WIStudent Hi sir, excuse me, comment out if statement, will make all characteristics cannot work, if enable bluetoothd, Service cannot work. And I also found Just Work cannot activate the characteristic where I makred Secure.
For example, this one cannot be read after 'pair' window var StaticReadOnlyCharacteristic = function() { StaticReadOnlyCharacteristic.super_.call(this, { uuid: 'fffffffffffffffffffffffffffffff1', properties: ['read'], value: new Buffer('value'), secure: ['read'],

How did you do it? I have different pairing mode on request and response too,and get error: 2018-06-26 09:39:25.352693 < ACL data: handle 64 flags 0x00 dlen 9 ATT: Error (0x01) Error: Insufficient authentication (5) Read req (0x0a) on handle 0x000e

2018-06-26 09:39:24.963364 < ACL data: handle 64 flags 0x00 dlen 9 ATT: Error (0x01) Error: Attribute not found (10) Read By Group req (0x10) on handle 0x0019

hcidump output: HCI sniffer - Bluetooth packet analyzer ver 5.43 device: hci0 snap_len: 1500 filter: 0xffffffff 2018-06-26 09:39:12.167746 < ACL data: handle 64 flags 0x00 dlen 11 ATT: Handle notify (0x1b) handle 0x0014 value 0x05 0x00 0x00 0x00 2018-06-26 09:39:12.346661 < HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1 00 2018-06-26 09:39:12.347086 > HCI Event: Command Complete (0x0e) plen 4 LE Set Advertise Enable (0x08|0x000a) ncmd 1 status 0x0c Error: Command Disallowed 2018-06-26 09:39:12.348534 < HCI Command: Disconnect (0x01|0x0006) plen 3 handle 64 reason 0x13 Reason: Remote User Terminated Connection 2018-06-26 09:39:12.348959 > HCI Event: Command Status (0x0f) plen 4 Disconnect (0x01|0x0006) status 0x00 ncmd 1 2018-06-26 09:39:12.359393 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 64 packets 1 2018-06-26 09:39:12.394218 > HCI Event: Disconn Complete (0x05) plen 4 status 0x00 handle 64 reason 0x16 Reason: Connection Terminated by Local Host 2018-06-26 09:39:13.555983 < HCI Command: Set Event Mask (0x03|0x0001) plen 8 Mask: 0xfffffbff07f8bf3d 2018-06-26 09:39:13.556470 > HCI Event: Command Complete (0x0e) plen 4 Set Event Mask (0x03|0x0001) ncmd 1 status 0x00 2018-06-26 09:39:13.556505 < HCI Command: LE Set Event Mask (0x08|0x0001) plen 8 mask 0x1f00000000000000 (Reserved) 2018-06-26 09:39:13.556963 > HCI Event: Command Complete (0x0e) plen 4 LE Set Event Mask (0x08|0x0001) ncmd 1 status 0x00 2018-06-26 09:39:13.556994 < HCI Command: Read Local Version Information (0x04|0x0001) plen 0 2018-06-26 09:39:13.557471 > HCI Event: Command Complete (0x0e) plen 12 Read Local Version Information (0x04|0x0001) ncmd 1 status 0x00 HCI Version: 4.1 (0x7) HCI Revision: 0x168 LMP Version: 4.1 (0x7) LMP Subversion: 0x2209 Manufacturer: Broadcom Corporation (15) 2018-06-26 09:39:13.557497 < HCI Command: Write LE Host Supported (0x03|0x006d) plen 2 01 00 2018-06-26 09:39:13.557876 > HCI Event: Command Complete (0x0e) plen 4 Write LE Host Supported (0x03|0x006d) ncmd 1 00 2018-06-26 09:39:13.557905 < HCI Command: Read LE Host Supported (0x03|0x006c) plen 0 2018-06-26 09:39:13.558286 > HCI Event: Command Complete (0x0e) plen 6 Read LE Host Supported (0x03|0x006c) ncmd 1 00 01 00 2018-06-26 09:39:13.558309 < HCI Command: Read BD ADDR (0x04|0x0009) plen 0 2018-06-26 09:39:13.558755 > HCI Event: Command Complete (0x0e) plen 10 Read BD ADDR (0x04|0x0009) ncmd 1 status 0x00 bdaddr B8:27:EB:29:7F:37 2018-06-26 09:39:13.558778 < HCI Command: LE Read Buffer Size (0x08|0x0002) plen 0 2018-06-26 09:39:13.559165 > HCI Event: Command Complete (0x0e) plen 7 LE Read Buffer Size (0x08|0x0002) ncmd 1 status 0x00 pktlen 0x00fb maxpkt 0x08 2018-06-26 09:39:13.567084 < HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1 00 2018-06-26 09:39:13.567498 > HCI Event: Command Complete (0x0e) plen 4 LE Set Advertise Enable (0x08|0x000a) ncmd 1 status 0x0c Error: Command Disallowed 2018-06-26 09:39:13.567699 < HCI Command: LE Set Advertising Parameters (0x08|0x0006) plen 15 min 100.000ms, max 100.000ms type 0x00 (ADV_IND - Connectable undirected advertising) ownbdaddr 0x00 (Public) directbdaddr 0x00 (Public) 00:00:00:00:00:00 channelmap 0x07 filterpolicy 0x00 (Allow scan from any, connection from any) 2018-06-26 09:39:13.568239 > HCI Event: Command Complete (0x0e) plen 4 LE Set Advertising Parameters (0x08|0x0006) ncmd 1 status 0x00 2018-06-26 09:39:13.575835 < HCI Command: LE Set Scan Response Data (0x08|0x0009) plen 32 06 05 08 74 65 73 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2018-06-26 09:39:13.576581 > HCI Event: Command Complete (0x0e) plen 4 LE Set Scan Response Data (0x08|0x0009) ncmd 1 status 0x00 2018-06-26 09:39:13.576612 < HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32 15 02 01 06 11 06 F0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 2018-06-26 09:39:13.577367 > HCI Event: Command Complete (0x0e) plen 4 LE Set Advertising Data (0x08|0x0008) ncmd 1 status 0x00 2018-06-26 09:39:13.577401 < HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1 01 2018-06-26 09:39:13.577822 > HCI Event: Command Complete (0x0e) plen 4 LE Set Advertise Enable (0x08|0x000a) ncmd 1 status 0x00 2018-06-26 09:39:13.577855 < HCI Command: LE Set Scan Response Data (0x08|0x0009) plen 32 06 05 08 74 65 73 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2018-06-26 09:39:13.578722 > HCI Event: Command Complete (0x0e) plen 4 LE Set Scan Response Data (0x08|0x0009) ncmd 1 status 0x00 2018-06-26 09:39:13.578765 < HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32 15 02 01 06 11 06 F0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 2018-06-26 09:39:13.579499 > HCI Event: Command Complete (0x0e) plen 4 LE Set Advertising Data (0x08|0x0008) ncmd 1 status 0x00 2018-06-26 09:39:24.475523 > HCI Event: LE Meta Event (0x3e) plen 19 LE Connection Complete status 0x00 handle 64, role slave bdaddr 71:21:0C:23:4E:B8 (Random) 2018-06-26 09:39:24.475812 < HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2 40 00 2018-06-26 09:39:24.477352 > HCI Event: Command Status (0x0f) plen 4 LE Read Remote Used Features (0x08|0x0016) status 0x00 ncmd 1 2018-06-26 09:39:24.631785 > HCI Event: LE Meta Event (0x3e) plen 12 LE Read Remote Used Features Complete status 0x00 handle 64 Features: 0x1d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 2018-06-26 09:39:24.639581 < HCI Command: Read RSSI (0x05|0x0005) plen 2 handle 64 2018-06-26 09:39:24.640092 > HCI Event: Command Complete (0x0e) plen 7 Read RSSI (0x05|0x0005) ncmd 1 status 0x00 handle 64 rssi -53 2018-06-26 09:39:24.661618 > ACL data: handle 64 flags 0x02 dlen 11 L2CAP(d): cid 0x003a len 7 [psm 0] 09 05 05 03 00 00 00 2018-06-26 09:39:24.781605 > ACL data: handle 64 flags 0x02 dlen 7 ATT: MTU req (0x02) client rx mtu 185 2018-06-26 09:39:24.787988 < ACL data: handle 64 flags 0x00 dlen 7 ATT: MTU resp (0x03) server rx mtu 185 2018-06-26 09:39:24.841659 > ACL data: handle 64 flags 0x02 dlen 11 ATT: Read By Group req (0x10) start 0x0001, end 0xffff type-uuid 0x2800 2018-06-26 09:39:24.845852 < ACL data: handle 64 flags 0x00 dlen 18 ATT: Read By Group resp (0x11) attr handle 0x0001, end group handle 0x0005 value 0x00 0x18 attr handle 0x0006, end group handle 0x0009 value 0x01 0x18 2018-06-26 09:39:24.901703 > ACL data: handle 64 flags 0x02 dlen 11 ATT: Read By Group req (0x10) start 0x000a, end 0xffff type-uuid 0x2800 2018-06-26 09:39:24.901983 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 64 packets 2 2018-06-26 09:39:24.903208 < ACL data: handle 64 flags 0x00 dlen 26 ATT: Read By Group resp (0x11) attr handle 0x000a, end group handle 0x0018 value 0xf0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 2018-06-26 09:39:24.961671 > ACL data: handle 64 flags 0x02 dlen 11 ATT: Read By Group req (0x10) start 0x0019, end 0xffff type-uuid 0x2800 2018-06-26 09:39:24.963364 < ACL data: handle 64 flags 0x00 dlen 9 ATT: Error (0x01) Error: Attribute not found (10) Read By Group req (0x10) on handle 0x0019 2018-06-26 09:39:25.021744 > ACL data: handle 64 flags 0x02 dlen 11 ATT: Read By Type req (0x08) start 0x0006, end 0x0009 type-uuid 0x2803 2018-06-26 09:39:25.022079 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 64 packets 2 2018-06-26 09:39:25.026367 < ACL data: handle 64 flags 0x00 dlen 13 ATT: Read By Type resp (0x09) length: 7 handle 0x0007, value 0x20 0x08 0x00 0x05 0x2a 2018-06-26 09:39:25.081675 > ACL data: handle 64 flags 0x02 dlen 9 ATT: Find Information req (0x04) start 0x0009, end 0x0009 2018-06-26 09:39:25.084931 < ACL data: handle 64 flags 0x00 dlen 10 ATT: Find Information resp (0x05) format: uuid-16 handle 0x0009, uuid 0x2902 (GATT(desc) Client Characteristic Configuration) 2018-06-26 09:39:25.141717 > ACL data: handle 64 flags 0x02 dlen 9 ATT: Write req (0x12) handle 0x0009 value 0x02 0x00 2018-06-26 09:39:25.141946 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 64 packets 2 2018-06-26 09:39:25.146080 < ACL data: handle 64 flags 0x00 dlen 5 ATT: Write resp (0x13) 2018-06-26 09:39:25.201683 > ACL data: handle 64 flags 0x02 dlen 11 ATT: Read By Type req (0x08) start 0x000a, end 0x0018 type-uuid 0x2803 2018-06-26 09:39:25.204364 < ACL data: handle 64 flags 0x00 dlen 132 ATT: Read By Type resp (0x09) length: 21 handle 0x000b, value 0x02 0x0c 0x00 0xf1 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff handle 0x000d, value 0x02 0x0e 0x00 0xf2 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff handle 0x000f, value 0x02 0x10 0x00 0xf3 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff handle 0x0011, value 0x0c 0x12 0x00 0xf4 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff handle 0x0013, value 0x10 0x14 0x00 0xf5 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff handle 0x0016, value 0x20 0x17 0x00 0xf6 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 2018-06-26 09:39:25.291687 > ACL data: handle 64 flags 0x02 dlen 7 ATT: Read req (0x0a) handle 0x000c 2018-06-26 09:39:25.291949 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 64 packets 2 2018-06-26 09:39:25.296054 < ACL data: handle 64 flags 0x00 dlen 10 ATT: Read resp (0x0b) 76 61 6C 75 65 2018-06-26 09:39:25.351652 > ACL data: handle 64 flags 0x02 dlen 7 ATT: Read req (0x0a) handle 0x000e 2018-06-26 09:39:25.352693 < ACL data: handle 64 flags 0x00 dlen 9 ATT: Error (0x01) Error: Insufficient authentication (5) Read req (0x0a) on handle 0x000e 2018-06-26 09:39:25.411733 > ACL data: handle 64 flags 0x02 dlen 11 SMP: Pairing Request (0x01) capability 0x04 oob 0x00 auth req 0x2d max key size 0x10 init key dist 0x03 resp key dist 0x03 Capability: KeyboardDisplay (OOB data not present) Authentication: Bonding (MITM Protection) Initiator Key Distribution: LTK IRK Responder Key Distribution: LTK IRK 2018-06-26 09:39:25.411982 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 64 packets 2 2018-06-26 09:39:25.414061 < ACL data: handle 64 flags 0x00 dlen 11 SMP: Pairing Response (0x02) capability 0x03 oob 0x00 auth req 0x01 max key size 0x10 init key dist 0x00 resp key dist 0x01 Capability: NoInputNoOutput (OOB data not present) Authentication: Bonding (No MITM Protection) Initiator Key Distribution: Responder Key Distribution: LTK 2018-06-26 09:39:25.609846 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 64 packets 1 2018-06-26 09:39:55.413186 > ACL data: handle 64 flags 0x02 dlen 7 ATT: Read req (0x0a) handle 0x0010 2018-06-26 09:39:55.416152 < ACL data: handle 64 flags 0x00 dlen 189 ATT: Read resp (0x0b) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 2018-06-26 09:39:55.473260 > ACL data: handle 64 flags 0x02 dlen 9 ATT: Read Blob req (0x0c) handle 0x0010 offset 0x00b8 2018-06-26 09:39:55.475327 < ACL data: handle 64 flags 0x00 dlen 189 ATT: Read Blob resp (0x0d) value 0xb8 0xb9 0xba 0xbb 0xbc 0xbd 0xbe 0xbf 0xc0 0xc1 0xc2 0xc3 0xc4 0xc5 0xc6 0xc7 0xc8 0xc9 0xca 0xcb 0xcc 0xcd 0xce 0xcf 0xd0 0xd1 0xd2 0xd3 0xd4 0xd5 0xd6 0xd7 0xd8 0xd9 0xda 0xdb 0xdc 0xdd 0xde 0xdf 0xe0 0xe1 0xe2 0xe3 0xe4 0xe5 0xe6 0xe7 0xe8 0xe9 0xea 0xeb 0xec 0xed 0xee 0xef 0xf0 0xf1 0xf2 0xf3 0xf4 0xf5 0xf6 0xf7 0xf8 0xf9 0xfa 0xfb 0xfc 0xfd 0xfe 0xff 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d 0x5e 0x5f 0x60 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x6a 0x6b 0x6c 0x6d 0x6e 0x6f 2018-06-26 09:39:55.611137 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 64 packets 1 2018-06-26 09:39:55.623266 > ACL data: handle 64 flags 0x02 dlen 9 ATT: Read Blob req (0x0c) handle 0x0010 offset 0x0170 2018-06-26 09:39:55.625059 < ACL data: handle 64 flags 0x00 dlen 149 ATT: Read Blob resp (0x0d) value 0x70 0x71 0x72 0x73 0x74 0x75 0x76 0x77 0x78 0x79 0x7a 0x7b 0x7c 0x7d 0x7e 0x7f 0x80 0x81 0x82 0x83 0x84 0x85 0x86 0x87 0x88 0x89 0x8a 0x8b 0x8c 0x8d 0x8e 0x8f 0x90 0x91 0x92 0x93 0x94 0x95 0x96 0x97 0x98 0x99 0x9a 0x9b 0x9c 0x9d 0x9e 0x9f 0xa0 0xa1 0xa2 0xa3 0xa4 0xa5 0xa6 0xa7 0xa8 0xa9 0xaa 0xab 0xac 0xad 0xae 0xaf 0xb0 0xb1 0xb2 0xb3 0xb4 0xb5 0xb6 0xb7 0xb8 0xb9 0xba 0xbb 0xbc 0xbd 0xbe 0xbf 0xc0 0xc1 0xc2 0xc3 0xc4 0xc5 0xc6 0xc7 0xc8 0xc9 0xca 0xcb 0xcc 0xcd 0xce 0xcf 0xd0 0xd1 0xd2 0xd3 0xd4 0xd5 0xd6 0xd7 0xd8 0xd9 0xda 0xdb 0xdc 0xdd 0xde 0xdf 0xe0 0xe1 0xe2 0xe3 0xe4 0xe5 0xe6 0xe7 0xe8 0xe9 0xea 0xeb 0xec 0xed 0xee 0xef 0xf0 0xf1 0xf2 0xf3 0xf4 0xf5 0xf6 0xf7 0xf8 0xf9 0xfa 0xfb 0xfc 0xfd 0xfe 0xff 2018-06-26 09:39:55.683309 > ACL data: handle 64 flags 0x02 dlen 9 ATT: Find Information req (0x04) start 0x0015, end 0x0015 2018-06-26 09:39:55.683557 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 64 packets 2 2018-06-26 09:39:55.684718 < ACL data: handle 64 flags 0x00 dlen 10 ATT: Find Information resp (0x05) format: uuid-16 handle 0x0015, uuid 0x2902 (GATT(desc) Client Characteristic Configuration) 2018-06-26 09:39:55.743277 > ACL data: handle 64 flags 0x02 dlen 9 ATT: Write req (0x12) handle 0x0015 value 0x01 0x00 2018-06-26 09:39:55.750566 < ACL data: handle 64 flags 0x00 dlen 5 ATT: Write resp (0x13) 2018-06-26 09:39:55.803319 > ACL data: handle 64 flags 0x02 dlen 9 ATT: Find Information req (0x04) start 0x0018, end 0x0018 2018-06-26 09:39:55.803617 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 64 packets 2 2018-06-26 09:39:55.804380 < ACL data: handle 64 flags 0x00 dlen 10 ATT: Find Information resp (0x05) format: uuid-16 handle 0x0018, uuid 0x2902 (GATT(desc) Client Characteristic Configuration) 2018-06-26 09:39:55.863285 > ACL data: handle 64 flags 0x02 dlen 11 ATT: Read By Type req (0x08) start 0x0001, end 0x0005 type-uuid 0x2a00 2018-06-26 09:39:55.865396 < ACL data: handle 64 flags 0x00 dlen 19 ATT: Read By Type resp (0x09) length: 13 handle 0x0003, value 0x72 0x61 0x73 0x70 0x62 0x65 0x72 0x72 0x79 0x70 0x69 2018-06-26 09:39:55.923285 > ACL data: handle 64 flags 0x02 dlen 7 ATT: Read req (0x0a) handle 0x0015 2018-06-26 09:39:55.923576 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 64 packets 2 2018-06-26 09:39:55.924255 < ACL data: handle 64 flags 0x00 dlen 7 ATT: Read resp (0x0b) 01 00 2018-06-26 09:39:55.983250 > ACL data: handle 64 flags 0x02 dlen 7 ATT: Read req (0x0a) handle 0x0018 2018-06-26 09:39:55.984047 < ACL data: handle 64 flags 0x00 dlen 7 ATT: Read resp (0x0b) 00 00 2018-06-26 09:39:56.043191 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 64 packets 2 2018-06-26 09:39:57.573374 > ACL data: handle 64 flags 0x02 dlen 11 ATT: Read By Type req (0x08) start 0x0001, end 0x0005 type-uuid 0x2a00 2018-06-26 09:39:57.574580 < ACL data: handle 64 flags 0x00 dlen 19 ATT: Read By Type resp (0x09) length: 13 handle 0x0003, value 0x72 0x61 0x73 0x70 0x62 0x65 0x72 0x72 0x79 0x70 0x69 2018-06-26 09:39:57.861364 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 64 packets 1

jollobajano commented 6 years ago

Cheers @AndyChoon. I don't have access to that machine anymore. I'm sorry I can't help, I just didn't want leave you hanging. I hope WIStudent can help you.

Cheers