Mbed-os: nRF52 BLE Connection Timeout

Created on 7 Jul 2018  路  7Comments  路  Source: ARMmbed/mbed-os

I recently synced my mbed-os fork with master (as of now) and I can no longer connect to my application using either nRF Connect (Desktop, with nRF51 dongle as the BLE interface), or the Punch Through Bluetooth app on my iPhone. The connection just times out and the device stops broadcasting until it is reset. There are no error messages or crashes (even BLE initialization returns no errors).

Assuming my app had a bug, I went to this repo and compiled several of the examples after running "mbed update" (which presumably pulled to mbed-os-5.9.2). I am running on an NRF52_DK using the GCC_ARM toolchain (building with mbed-cli).

I am experiencing the same issue with the examples I tried (specifically, the BLE_BatteryLevel example).

Can anyone else confirm that they can't connect to the BatteryLevel example on the NRF52_DK with mbed-os-5.9.2? I'm trying to get up to date so I can start developing with the new SecurityManager API.

[ ] Question
[ ] Enhancement
[ X ] Bug

closed_in_jira nordic mirrored bug

Most helpful comment

I see the problem. We've been mislabeling the reserved SWI. It is not just SWI1 that's been reserved for the SoftDevice but SWI1, SWI2, SWI4, and SWI5.

All 7 comments

ARM Internal Ref: MBOTRIAGE-1110

I have built the BLE_BatteryLevel demo by checking out the mbed-os.5.9.1 release and it worked as expected.

Something must have changed between 5.9.1 and 5.9.2 that is breaking connection establishment.

EDIT: Issue appears to lie somewhere in the targets/TARGET_NORDIC/TARGET_NRF5x directory. I checked out the mbed-os-5.9.1 release of this directory and the issue disappeared. There appear to have been some changes to low-level drivers.

EDIT EDIT: Related to #7415 and PR #7323

I think I found the issue. Something in serial_api.c is causing the BLE stack to become unresponsive it seems.

I reverted serial_api.c to the mbed-os-5.9.1 release version and the example works as expected.

Any thoughts @marcuschangarm?

I see the problem. We've been mislabeling the reserved SWI. It is not just SWI1 that's been reserved for the SoftDevice but SWI1, SWI2, SWI4, and SWI5.

@AGlass0fMilk

Can you give this PR a go and see if it solves the problem, please?

https://github.com/ARMmbed/mbed-os/pull/7453

I synced my fork (previously at 5.9.0) to master (5.9.2+) and applied this PR - so far it appears to be working as expected. BLE is able to connect/pair and the UART works as well 馃憤

Awesome! Thank you for trying it out!

Was this page helpful?
0 / 5 - 0 ratings