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

BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND

central 52832dk  peripheal 52832dk    14.2sdk   ,  My custom service has 5 features. When discovering, sometimes the service discovery is complete, sometimes the service is not found., BLE_GATT_DB_MAX_CHARS 12

# SEGGER J-Link RTT Viewer V6.20i Terminal Log File
# Compiled: 17:47:47 on Nov 17 2017
# Logging started @ 25 Aug 2018 11:26:05
 0> <debug> app: [0013] App_timer start.
 0> 
 0> <debug> app: [0000] Present app_timer counter: 0.
 0> 
 0> <debug> app: [BTN ][0126] Button push event occur, pin_no is: 16.
 0> 
 0> <info> main:  KEY 4
 0> <debug> peer: whitlist disable
 0> <debug> scan: name match
 0> 
 0> <info> scan: prepare connning mac [39:EC:BC:C3:A5:64]
 0> Connection 0x0 established. mac [39:EC:BC:C3:A5:64]
 0> <info> main: connect_pairing and not scan
 0> <debug> app: [0013] App_timer stop.
 0> 
 0> <debug> ble_db_disc: Starting discovery of service with UUID 0x0 on connection handle 0x0.
 0> <info> ble_db_disc:  service found count is 1
 0> <info> ble_db_disc:  service found uuid    1 type 0
 0> <debug> ble_db_disc: Found service UUID 0x0.
 0> <info> ble_db_disc: sd_ble_gattc_characteristics_discover 445
 0> <debug> ble_db_disc: is_char_discovery_reqd328
 0> <info> ble_db_disc: sd_ble_gattc_characteristics_discover 445
 0> <debug> ble_db_disc: on_characteristic_discovery_rsp
 0> <debug> ble_db_disc: is_char_discovery_reqd328
 0> <info> ble_db_disc: sd_ble_gattc_characteristics_discover 445
 0> <debug> ble_db_disc: on_characteristic_discovery_rsp
 0> <debug> ble_db_disc: is_char_discovery_reqd328
 0> <info> ble_db_disc: sd_ble_gattc_characteristics_discover 445
 0> <debug> ble_db_disc: on_characteristic_discovery_rsp
 0> <debug> ble_db_disc: is_char_discovery_reqd328
 0> <debug> ble_db_disc: on_characteristic_discovery_rsp
 0> <debug> ble_db_disc: Discovery of service with UUID 0x0 completed with success on connection handle 0x0.
 0> <info> ble_db_disc: pending_user_evts_send
 0> <info> ble_nus: discovery char num is [9]
 0> <info> main: [1498] nus discovery complete.
 0> <info> main: notify end
 0> <info> ble_db_disc: discovery_complete_evt_trigger  240
 0> <debug> ble_db_disc: on_srv_disc_completion
 0> <info> main: pm_conn_secure
 0> <info> main: BOND STARTXXXXXXXXXXXXXXXXX, procedure: 0.
 0> <info> main: Connection secured234234234: role: 2, conn_handle: 0x0, procedure: 0.
 0> <debug> main:  FF FF FF FF FF FF      |......  
 0> <debug> main:  56 65 72 2E 30 30 31   |Ver.001 
 0> <info> main: !!!!!!!!!!!!!!!!!!!!!!!Disconnect, handle is 0x0 (reason: 0x16)
 0> <debug> main: __disconnect_scan
 0> <debug> app: [0013] App_timer start.
 0> 
 0> <debug> app: [0000] Present app_timer counter: 0.
 0> 
 0> <debug> app: [BTN ][0126] Button push event occur, pin_no is: 16.
 0> 
 0> <info> main:  KEY 4
 0> <debug> peer: whitlist disable
 0> <info> scan: prepare connning mac [4A:2A:93:B7:67:E3]
 0> <debug> app: [0013] App_timer stop.
 0> 
 0> Connection 0x0 established. mac [4A:2A:93:B7:67:E3]
 0> <info> main: connect_pairing and not scan
 0> <debug> ble_db_disc: Starting discovery of service with UUID 0x0 on connection handle 0x0.
 0> <info> main: !!!!!!!!!!!!!!!!!!!!!!!Disconnect, handle is 0x0 (reason: 0x3E)
 0> <debug> main: __disconnect_scan
 0> <debug> app: [0013] App_timer start.
 0> 
 0> <debug> app: [0001] Present app_timer counter: 0.
 0> 
 0> <debug> app: [BTN ][0126] Button push event occur, pin_no is: 16.
 0> 
 0> <info> main:  KEY 4
 0> <debug> peer: whitlist disable
 0> <info> scan: prepare connning mac [3E:13:00:02:22:D4]
 0> <debug> app: [0013] App_timer stop.
 0> 
 0> Connection 0x0 established. mac [3E:13: 0: 2:22:D4]
 0> <info> main: connect_pairing and not scan
 0> <debug> ble_db_disc: Starting discovery of service with UUID 0x0 on connection handle 0x0.
 0> <info> ble_db_disc:  service found count is 0
 0> <info> ble_db_disc:  service found uuid    0 type 0
 0> <debug> ble_db_disc: Service UUID 0x0 not found. gatt status is 266
 0> <info> ble_db_disc: pending_user_evts_send
 0> <info> ble_db_disc: discovery_complete_evt_trigger  240
 0> <debug> ble_db_disc: on_srv_disc_completion
 0> <info> main: !!!!!!!!!!!!!!!!!!!!!!!Disconnect, handle is 0x0 (reason: 0x13)
 0> <debug> main: __disconnect_scan
 0> <debug> app: [0013] App_timer start.
 0> 
 0> <debug> app: [0001] Present app_timer counter: 0.
 0> 
 0> <debug> app: [BTN ][0126] Button push event occur, pin_no is: 16.
 0> 
 0> <info> main:  KEY 4
 0> <debug> peer: whitlist disable
 0> <info> scan: prepare connning mac [32:23:11:32:A5:FD]
 0> <debug> app: [0013] App_timer stop.
 0> 
 0> Connection 0x0 established. mac [32:23:11:32:A5:FD]
 0> <info> main: connect_pairing and not scan
 0> <debug> ble_db_disc: Starting discovery of service with UUID 0x0 on connection handle 0x0.
 0> <info> main: !!!!!!!!!!!!!!!!!!!!!!!Disconnect, handle is 0x0 (reason: 0x3E)
 0> <debug> main: __disconnect_scan
 0> <debug> app: [0013] App_timer start.
 0> 
 0> <debug> app: [0001] Present app_timer counter: 0.
 0> 
 0> <debug> app: [BTN ][0126] Button push event occur, pin_no is: 16.
 0> 
 0> <info> main:  KEY 4
 0> <debug> peer: whitlist disable
 0> <info> scan: prepare connning mac [CF:01:C8:46:2C:D9]
 0> <debug> app: [0013] App_timer stop.
 0> 
 0> Connection 0x0 established. mac [CF: 1:C8:46:2C:D9]
 0> <info> main: connect_pairing and not scan
 0> <debug> ble_db_disc: Starting discovery of service with UUID 0x0 on connection handle 0x0.
 0> <info> main: !!!!!!!!!!!!!!!!!!!!!!!Disconnect, handle is 0x0 (reason: 0x3E)
 0> <debug> main: __disconnect_scan
 0> <debug> app: [0013] App_timer start.
 0> 
 0> <debug> app: [0001] Present app_timer counter: 0.
 0> 
 0> <debug> app: [BTN ][0126] Button push event occur, pin_no is: 16.
 0> 
 0> <info> main:  KEY 4
 0> <debug> peer: whitlist disable
 0> <debug> scan: name match
 0> 
 0> <info> scan: prepare connning mac [39:EC:BC:C3:A5:64]
 0> Connection 0x0 established. mac [39:EC:BC:C3:A5:64]
 0> <info> main: connect_pairing and not scan
 0> <debug> app: [0013] App_timer stop.
 0> 
 0> <debug> ble_db_disc: Starting discovery of service with UUID 0x0 on connection handle 0x0.
 0> <info> ble_db_disc:  service found count is 1
 0> <info> ble_db_disc:  service found uuid    1 type 0
 0> <debug> ble_db_disc: Found service UUID 0x0.
 0> <info> ble_db_disc: sd_ble_gattc_characteristics_discover 445
 0> <debug> ble_db_disc: is_char_discovery_reqd328
 0> <info> ble_db_disc: sd_ble_gattc_characteristics_discover 445
 0> <debug> ble_db_disc: on_characteristic_discovery_rsp
 0> <debug> ble_db_disc: is_char_discovery_reqd328
 0> <info> ble_db_disc: sd_ble_gattc_characteristics_discover 445
 0> <debug> ble_db_disc: on_characteristic_discovery_rsp
 0> <debug> ble_db_disc: is_char_discovery_reqd328
 0> <info> ble_db_disc: sd_ble_gattc_characteristics_discover 445
 0> <debug> ble_db_disc: on_characteristic_discovery_rsp
 0> <debug> ble_db_disc: is_char_discovery_reqd328
 0> <debug> ble_db_disc: on_characteristic_discovery_rsp
 0> <debug> ble_db_disc: Discovery of service with UUID 0x0 completed with success on connection handle 0x0.
 0> <info> ble_db_disc: pending_user_evts_send
 0> <info> ble_nus: discovery char num is [9]
 0> <info> main: [1498] nus discovery complete.
 0> <info> main: notify end
 0> <info> ble_db_disc: discovery_complete_evt_trigger  240
 0> <debug> ble_db_disc: on_srv_disc_completion
 0> <info> main: pm_conn_secure
 0> <info> main: BOND STARTXXXXXXXXXXXXXXXXX, procedure: 0.
 0> <info> main: Connection secured234234234: role: 2, conn_handle: 0x0, procedure: 0.
 0> <debug> main:  FF FF FF FF FF FF      |......  
 0> <debug> main:  56 65 72 2E 30 30 31   |Ver.001 
 0> <info> main: !!!!!!!!!!!!!!!!!!!!!!!Disconnect, handle is 0x0 (reason: 0x16)
 0> <debug> main: __disconnect_scan
 0> <debug> app: [0013] App_timer start.
 0> 
 0> <debug> app: [0001] Present app_timer counter: 0.
 0> 
 0> <debug> app: [BTN ][0126] Button push event occur, pin_no is: 16.
 0> 
 0> <info> main:  KEY 4
 0> <debug> peer: whitlist disable
 0> <info> scan: prepare connning mac [00:01:00:00:18:20]
 0> <debug> app: [0013] App_timer stop.
 0> 
 0> Connection 0x0 established. mac [ 0: 1: 0: 0:18:20]
 0> <info> main: connect_pairing and not scan
 0> <debug> ble_db_disc: Starting discovery of service with UUID 0x0 on connection handle 0x0.
 0> <info> ble_db_disc:  service found count is 0
 0> <info> ble_db_disc:  service found uuid    0 type 0
 0> <debug> ble_db_disc: Service UUID 0x0 not found. gatt status is 266
 0> <info> ble_db_disc: pending_user_evts_send
 0> <info> ble_db_disc: discovery_complete_evt_trigger  240
 0> <debug> ble_db_disc: on_srv_disc_completion
 0> <info> main: !!!!!!!!!!!!!!!!!!!!!!!Disconnect, handle is 0x0 (reason: 0x13)
 0> <debug> main: __disconnect_scan

# Logging stopped @ 25 Aug 2018 11:27:04

Related