Hi All,
I'm trying to run blecent on an nrf52dk and am running the bleprph
application on another BLE module (stm32f4discovery talking to a broadcom
BLE core). Anyways, when try to run blecent it seems like I successfully
connect to the peripheral and are able to discover it, however after that
the connection seems to be timing out and then am never able to discover
the peripheral again.

1) Connected and Discovered the bleprph:

37493:[ts=292914004ssb, mod=4 level=1] GAP procedure initiated: discovery;
own_addr_type=0 filter_policy=0 passive=1 limited=0 filter_duplicates=1
duration=forever

37503:[ts=292992124ssb, mod=4 level=1] GAP procedure initiated: connect;
peer_addr_type=0 peer_addr=aa:aa:aa:aa:aa:aa scan_itvl=16 scan_window=16
itvl_min=24 itvl_max=40 latency=0 supervision_timeout=256 min_ce_len=16
max_ce_len=768 own_addr_ty

37517:[ts=293101556ssb, mod=64 level=1] Connection established

37519:[ts=293117180ssb, mod=4 level=1] GATT procedure initiated: discover
all services

37588:[ts=293656208ssb, mod=4 level=1] GATT procedure initiated: discover
all characteristics; start_handle=1 end_handle=11

37627:[ts=293960876ssb, mod=4 level=1] GATT procedure initiated: discover
all characteristics; start_handle=12 end_handle=15

37658:[ts=294203112ssb, mod=4 level=1] GATT procedure initiated: discover
all characteristics; start_handle=16 end_handle=19

37684:[ts=294406224ssb, mod=4 level=1] GATT procedure initiated: discover
all characteristics; start_handle=20 end_handle=32

37722:[ts=294703080ssb, mod=4 level=1] GATT procedure initiated: discover
all characteristics; start_handle=33 end_handle=65535

37761:[ts=295007812ssb, mod=4 level=1] GATT procedure initiated: discover
all descriptors; chr_val_handle=14 end_handle=15

37774:[ts=295109368ssb, mod=4 level=1] GATT procedure initiated: discover
all descriptors; chr_val_handle=18 end_handle=19

37786:[ts=295203112ssb, mod=4 level=1] GATT procedure initiated: discover
all descriptors; chr_val_handle=24 end_handle=25

37799:[ts=295304668ssb, mod=4 level=1] GATT procedure initiated: discover
all descriptors; chr_val_handle=29 end_handle=30

37812:[ts=295406224ssb, mod=4 level=1] GATT procedure initiated: discover
all descriptors; chr_val_handle=37 end_handle=65535

37825:[ts=295507780ssb, mod=64 level=3] Service discovery complete;
status=0 conn_handle=1

2) Read/Write/Subscribe for notifications. Finally fails with reason=546

37827:[ts=295523404ssb, mod=4 level=1] GATT procedure initiated: read;
att_handle=22

37829:[ts=295539028ssb, mod=4 level=1] GATT procedure initiated: write;
att_handle=32 len=2

37832:[ts=295562464ssb, mod=4 level=1] GATT procedure initiated: write;
att_handle=30 len=2

37851:[ts=295710892ssb, mod=64 level=1] Read complete; status=0
conn_handle=1 attr_handle=22 value=

37857:[ts=295757764ssb, mod=64 level=1] Write complete; status=0
conn_handle=1 attr_handle=32

37863:[ts=295804636ssb, mod=64 level=1] Subscribe complete; status=0
conn_handle=1 attr_handle=30

42637:[ts=333101556ssb, mod=64 level=1] disconnect; reason=546


3) Once it disconnects, blecent gets stuck in this loop of trying to
discover, but the discovery always fails:

42638:[ts=333109368ssb, mod=4 level=1] GAP procedure initiated: discovery;
own_addr_type=0 filter_policy=0 passive=1 limited=0 filter_duplicates=1
duration=forever

42973:[ts=335726516ssb, mod=4 level=1] GAP procedure initiated: connect;
peer_addr_type=0 peer_addr=aa:aa:aa:aa:aa:aa scan_itvl=16 scan_window=16
itvl_min=24 itvl_max=40 latency=0 supervision_timeout=256 min_ce_len=16
max_ce_len=768 own_addr_ty

42982:[ts=335796824ssb, mod=64 level=1] Connection established

42983:[ts=335804636ssb, mod=4 level=1] GATT procedure initiated: discover
all services

43020:[ts=336093744ssb, mod=64 level=3] Error: Service discovery failed;
status=7 conn_handle=1

43022:[ts=336109368ssb, mod=4 level=1] GAP procedure initiated: terminate
connection; conn_handle=1 hci_reason=19

43025:[ts=336132804ssb, mod=64 level=1] disconnect; reason=520

43027:[ts=336148428ssb, mod=4 level=1] GAP procedure initiated: discovery;
own_addr_type=0 filter_policy=0 passive=1 limited=0 filter_duplicates=1
duration=forever

43038:[ts=336234360ssb, mod=4 level=1] GAP procedure initiated: connect;
peer_addr_type=0 peer_addr=aa:aa:aa:aa:aa:aa scan_itvl=16 scan_window=16
itvl_min=24 itvl_max=40 latency=0 supervision_timeout=256 min_ce_len=16
max_ce_len=768 own_addr_ty

43046:[ts=336296856ssb, mod=64 level=1] Connection established

43047:[ts=336304668ssb, mod=4 level=1] GATT procedure initiated: discover
all services

43084:[ts=336593712ssb, mod=64 level=3] Error: Service discovery failed;
status=7 conn_handle=1

43086:[ts=336609336ssb, mod=4 level=1] GAP procedure initiated: terminate
connection; conn_handle=1 hci_reason=19

43089:[ts=336632772ssb, mod=64 level=1] disconnect; reason=520

43091:[ts=336648396ssb, mod=4 level=1] GAP procedure initiated: discovery;
own_addr_type=0 filter_policy=0 passive=1 limited=0 filter_duplicates=1
duration=forever

43101:[ts=336726516ssb, mod=4 level=1] GAP procedure initiated: connect;
peer_addr_type=0 peer_addr=aa:aa:aa:aa:aa:aa scan_itvl=16 scan_window=16
itvl_min=24 itvl_max=40 latency=0 supervision_timeout=256 min_ce_len=16
max_ce_len=768 own_addr_ty

Any ideas whats going on and how to debug this further?
The only way to recover seems to be to reset my bleprph device.
Appreciate the help,
Pritish

Reply via email to