Simon Ratner created MYNEWT-326:
-----------------------------------

             Summary: ble_gattc_disc_svc_by_uuid callback called twice (with 
bogus data)
                 Key: MYNEWT-326
                 URL: https://issues.apache.org/jira/browse/MYNEWT-326
             Project: Mynewt
          Issue Type: Bug
          Components: ble
    Affects Versions: v0_9_0
            Reporter: Simon Ratner


Here's a log extract (mod=64 lines are mine, printed from relevant callbacks):
{noformat}
1060:[ts=1035136ssb, mod=4 level=1] GAP procedure initiated: connect; 
addr_type=1 addr=47:b3:03:b7:5f:c6 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 
our_addr_ty
2351:[ts=2295728ssb, mod=64 level=1] connection established; status=0 handle=1 
peer_id_addr=47:b3:03:b7:5f:c6 peer_ota_addr=47:b3:03:b7:5f:c6 conn_itvl=40 
conn_latency=0 supervision_timeout=256
2372:[ts=2316224ssb, mod=4 level=1] GATT procedure initiated: discover service 
by uuid; uuid=03040000-2aae-4d26-ad6203e9a8637ebd
2460:[ts=2402112ssb, mod=64 level=2] found svc; 
uuid=03040000-2aae-4d26-ad6203e9a8637ebd start_handle=40 end_handle=65535
2491:[ts=2432368ssb, mod=64 level=2] found svc; 
uuid=00000000-0000-3065-0000306500003015 start_handle=32768 end_handle=8192
{noformat}

Steps:
1. Connect
2. Call ble_gattc_disc_svc_by_uuid with a specific uuid
3. Observe callback invoked twice, the second time with {{end_handle < 
start_handle}} which is obviously invalid and subsequently fails with 
BLE_HS_EINVAL when passed to other gatt functions. 

The {{error}} param is null in both invocations. Skimming the code, perhaps 
this has something to do with 
https://github.com/apache/incubator-mynewt-core/blob/develop/net/nimble/host/src/ble_gattc.c#L1346?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to