adafruit / adafruit/Adafruit_nRF52_Arduino
[Feature] nRF52840 connect to more than 4 peripheral BLE devices
- Dominant language
- C
- Stars
- 699
- Forks
- 570
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I tried to connect the Feather nRF52840 Express (central) to multiple peripheral BLE devices. However, the maximum peripheral number is 4, not the "BLE_MAX_CONNECTION 20" as in the datasheet and this library "bluefruit.h"
When I use Bluefruit.begin(0, 4) or less, it works well and can connect to 4 peripheral BLEs.
When I set Bluefruit.begin(0, 5) or more, the BLE function cannot be enabled and the board works just like a common MCU without BLE function.
I tried both my own code and the example "central_bleuart_multi.ino", which are the same and the error is like the screenshot below:

**Set up**
- Feather nRF52840 Express, BSP v0.11.0
- Win 7 & 10
**To Reproduce**
Steps to reproduce the behavior:
1. Go to example 'central_bleuart_multi'
2. change 'Bluefruit.begin(0, 4)' to 5 or more
3. choose debug: "Level 2 (full debug)"
4. See error
**Expected behavior**
I want to use the central nRF52840 to connect to more peripherals (at least 5). Is there any way?
I checked the linker file (I'm not sure) "nRF52840_s140_v6.ld" but had no idea what to do. The file is below:

@hathach Could you please help? Thank you.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the central_bleuart_multi.ino example and reproduce the failure by changing Bluefruit.begin(0, 4) to 5 with full debug enabled. Then inspect bluefruit.h and nRF52840_s140_v6.ld, which the report identifies as relevant. Done means the Feather nRF52840 Express can enable BLE and connect to at least five peripherals.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100