mbed-os-example-ble: BLE_GattServer_AddService does not work on NRF52-DK

Description of defect

This looks a lot like issue #339, which I’m not sure was resolved. I’ve updated here with any new details:

The BLE_GattServer_AddService example compiles ok. However when using a BLE scanner and then connecting to the “Heartrate” device it disconnects unexpectedly, immediately after establishing a connection.

I added a disconnect reason printout to the disconnect callback and the error is as was reported in the initial bug report (0x08, timeout).

The nrf connect log says:

Connected.
Discovering Services...
peripheral.discoverServices(nil)
[Callback] centralManager(central, didDisconnectPeripheral: peripheral, error: The connection has timed out unexpectedly.)

Target(s) affected by this defect ?

NRF52_DK

Toolchain(s) (name and version) displaying this defect ?

GCC_ARM

What version of Mbed-os are you using (tag or sha) ?

mbed-os-6.6.0

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

mbed-cli 1.10.4 (macintosh) nrf connect 2.4.6 (iOS) iPhone 11 (iOS 14.3)

How is this defect reproduced ?

compile BLE_GattServer_AddService with mbed-cli and drag resulting .hex file to the NRF52_DK Jlink connection. Use NRF Connect to connect with Heartrate device. Will disconnect immediately.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

It works fine on iPhone 8 😭 and Mac. Would it be possible for you to put traces in attsProcMtuReq and tell us if the server is trying to send an error, What is the size of the local MTU computed and if the allocation of the response fail or not. Then post the result in this thread.