ESP32 BLE mesh + Apple ANCS

cowens
Posts: 6
Joined: Sat May 23, 2020 8:36 pm

ESP32 BLE mesh + Apple ANCS

Postby cowens » Mon Jul 13, 2020 9:56 pm

Is it possible to run the BLE mesh stack along side Apple ANCS on the ESP32-WROOM-32E without rewriting extensive parts of the IDF?

If so, is it as simple as adding the ANCS demo code to my BLE mesh project? I suspect not.

Any advice or tips on using BLE mesh and Apple ANCS at the same time would be greatly appreciated.

cowens
Posts: 6
Joined: Sat May 23, 2020 8:36 pm

Re: ESP32 BLE mesh + Apple ANCS

Postby cowens » Tue Jul 21, 2020 9:40 pm

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.
  1. I (17408) BLE_ANCS: ESP_GATTC_OPEN_EVT
  2. E (17409) BLE_ANCS: open failed, error status = 91
  3. I (18051) BLE_ANCS: ESP_GATTC_DIS_SRVC_CMPL_EVT
  4. I (18066) BLE_ANCS: ESP_GATTC_CFG_MTU_EVT, Status 0, MTU 69, conn_id 0
  5. I (18067) BLE_ANCS: ESP_GATTC_SEARCH_CMPL_EVT
  6. E (18067) BLE_ANCS: No Apple Notification Service found
  7. I (21135) addr: 45 0f e9 ec 2d 6e
  8. I (21135) BLE_ANCS: pair status = fail
  9. I (21135) BLE_ANCS: fail reason = 0x56
  10. W (24133) BT_BTM: btm_sec_clr_temp_auth_service() - no dev CB
  11.  
  12. W (24134) BT_APPL: bta_gattc_conn_cback() - cif=3 connected=0 conn_id=3 reason=0x0016
  13. W (24137) BT_APPL: bta_gattc_conn_cback() - cif=4 connected=0 conn_id=4 reason=0x0016
  14. W (24146) BT_APPL: bta_gattc_conn_cback() - cif=6 connected=0 conn_id=6 reason=0x0016
  15. I (24156) BLE_ANCS: ESP_GATTC_DISCONNECT_EVT, reason = 0x16
  16. I (24161) BLE_ANCS: ESP_GATTC_DISCONNECT_EVT, reason = 0x16
  17. E (24171) BT_HCI: btu_hcif_hdl_command_complete opcode 0x2005 status 0xc
  18. E (24179) BT_HCI: btu_hcif_hdl_command_complete opcode 0x2005 status 0xc
  19. I (24182) BLE_ANCS: advertising start success
  20. I (24187) BLE_ANCS: advertising start success
  21. E (24191) BT_BTM: Device not found
  22.  
  23. E (24196) BT_APPL: bta_gattc_mark_bg_conn unable to find the bg connection mask for: 45:0f:e9:ec:2d:6e

Who is online

Users browsing this forum: Gaston1980 and 125 guests