This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Unable to mantain connection using gatttool

Hi, i am trying to connect via bluetooth using the gatttool on a Raspberry Pi. On the Nordic device I am using the BLE Proximity Demo. Everythings work fine, but after 30 seconds the connection is always terminated by the S110 bluetooth stack(BLE_GATTS_EVT_TIMEOUT).

Here is what I am doing:

$ gatttool -b EB:B4:5E:8F:1C:C3 -t random -I --sec-level=high
[EB:B4:5E:8F:1C:C3][LE]> connect
Attempting to connect to EB:B4:5E:8F:1C:C3
Connection successful

Here is the output of the hcidump:

 $ sudo hcidump
HCI sniffer - Bluetooth packet analyzer ver 5.29
device: hci0 snap_len: 1500 filter: 0xffffffff
< HCI Command: LE Create Connection (0x08|0x000d) plen 25
    bdaddr EB:B4:5E:8F:1C:C3 type 1
    interval 96 window 48 initiator_filter 0
    own_bdaddr_type 0 min_interval 40 max_interval 56
    latency 0 supervision_to 42 min_ce 0 max_ce 0
> HCI Event: Command Status (0x0f) plen 4
    LE Create Connection (0x08|0x000d) status 0x00 ncmd 1
> HCI Event: LE Meta Event (0x3e) plen 19
    LE Connection Complete
      status 0x00 handle 70, role master
      bdaddr EB:B4:5E:8F:1C:C3 (Random)
> ACL data: handle 70 flags 0x02 dlen 13
    ATT: Find By Type req (0x06)
      start 0x0001, end 0xffff, uuid 0x2800
      value 0x02 0x18
> ACL data: handle 70 flags 0x02 dlen 16
    L2CAP(d): cid 0x0005 len 12 [psm 0]
< ACL data: handle 70 flags 0x00 dlen 10
    L2CAP(d): cid 0x0005 len 6 [psm 0]
< HCI Command: LE Connection Update (0x08|0x0013) plen 14
> HCI Event: Command Status (0x0f) plen 4
    LE Connection Update (0x08|0x0013) status 0x00 ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
    handle 70 packets 1
> HCI Event: LE Meta Event (0x3e) plen 10
    LE Connection Update Complete
      status 0x00 handle 70
      interval 1000.00ms, latency 0.00ms, superv. timeout 4000.00ms
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 70 reason 0x13
    Reason: Remote User Terminated Connection

Can not understand where this is coming from. If I connect with the Master Control Panel it stays connected. Please help! Nice Greets

Parents
  • Is the HCI log always the same? Do you always get the disconnect after 30 seconds and always right after the connection parameters has been updated? Do you have a Bluetooth Low Energy sniffer or for example a nRF51-dongle of some kind? You can use the nRFSniffer to have a look at the packages going back and forth in the link as well. That could give you a better view of where it's failing. It looks to me from the HCI log above that after the connection parameters are updated, the central and peripheral no longer exchange packages.

    nRFSniffer: www.nordicsemi.com/.../22575263

Reply
  • Is the HCI log always the same? Do you always get the disconnect after 30 seconds and always right after the connection parameters has been updated? Do you have a Bluetooth Low Energy sniffer or for example a nRF51-dongle of some kind? You can use the nRFSniffer to have a look at the packages going back and forth in the link as well. That could give you a better view of where it's failing. It looks to me from the HCI log above that after the connection parameters are updated, the central and peripheral no longer exchange packages.

    nRFSniffer: www.nordicsemi.com/.../22575263

Children
No Data
Related