ARMmbed / ARMmbed/mbed-os-example-ble

BLE_GattServer_AddService does not work on NRF52-DK

Open
#351 15 comments 0 reactions 0 assignees View on GitHub
IOTOSM-3156 Jira status: OPEN mirrored type: bug
Dominant language
C++
Stars
135
Forks
114
PR merge metrics
No merged PRs in 30d

Description

### 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.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing BLE_GattServer_AddService on the NRF52_DK with mbed-os-6.6.0, GCC_ARM, mbed-cli 1.10.4, and nRF Connect, then inspect the connection and service-discovery behavior. Done means the Heartrate device stays connected while services are discovered instead of disconnecting with timeout reason 0x08.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.