I have both the ANCS and BLE mesh running on the same application. Both networks work fine in isolation. When I try to run both at the same time I have 2 issues that I know of.
The first issue:
I cannot find the ANCS client when I search for it on my iPhone. It almost appears the ANCS is not advertising. I can however see the BLE mesh node.
Does anyone know why I cannot see the ANCS GATT client on my iphone when the BLE mesh network is also running?
The second issue:
When I attempt to connect to the node's BLE mesh GATT server the ANCS GATTC callback also is being triggered. This causes a series of errors to be printed to the console. This also prevents the BLE mesh GATT client from connecting to the device's BLE mesh GATT server.
Any advice on how to identify connections if a connection is BLE mesh vs ANCS would be greatly appreciated.
To follow is the logs when I attempt to connect to the BLE mesh GATT server.
I (17408) BLE_ANCS: ESP_GATTC_OPEN_EVT
E (17409) BLE_ANCS: open failed, error status = 91
I (18051) BLE_ANCS: ESP_GATTC_DIS_SRVC_CMPL_EVT
I (18066) BLE_ANCS: ESP_GATTC_CFG_MTU_EVT, Status 0, MTU 69, conn_id 0
I (18067) BLE_ANCS: ESP_GATTC_SEARCH_CMPL_EVT
E (18067) BLE_ANCS: No Apple Notification Service found
I (21135) addr: 45 0f e9 ec 2d 6e
I (21135) BLE_ANCS: pair status = fail
I (21135) BLE_ANCS: fail reason = 0x56
W (24133) BT_BTM: btm_sec_clr_temp_auth_service() - no dev CB
W (24134) BT_APPL: bta_gattc_conn_cback() - cif=3 connected=0 conn_id=3 reason=0x0016
W (24137) BT_APPL: bta_gattc_conn_cback() - cif=4 connected=0 conn_id=4 reason=0x0016
W (24146) BT_APPL: bta_gattc_conn_cback() - cif=6 connected=0 conn_id=6 reason=0x0016
I (24156) BLE_ANCS: ESP_GATTC_DISCONNECT_EVT, reason = 0x16
I (24161) BLE_ANCS: ESP_GATTC_DISCONNECT_EVT, reason = 0x16
E (24171) BT_HCI: btu_hcif_hdl_command_complete opcode 0x2005 status 0xc
E (24179) BT_HCI: btu_hcif_hdl_command_complete opcode 0x2005 status 0xc
I (24182) BLE_ANCS: advertising start success
I (24187) BLE_ANCS: advertising start success
E (24191) BT_BTM: Device not found
E (24196) BT_APPL: bta_gattc_mark_bg_conn unable to find the bg connection mask for: 45:0f:e9:ec:2d:6e