cancel
Showing results for 
Search instead for 
Did you mean: 

sample project for BlueNRG-MS in central role connected to multiple peripherals

egoltzman
Senior
Posted on May 23, 2016 at 15:49

In the BlueNRG-MS datasheet it is stated that it can act as a central and being connected to up to 8 devices in paralell.

I'm looking for a project that can demonstrate something close to that.

I have the ''Profiles_Central'' project from 

file:///C:/Program%20Files%20(x86)/STMicroelectronics/STM32CubeExpansion_BLE1_V2.6.0/Documentation/OSXSmartConnPS.chm

 but this is a single peripheral example.

#bluenrg-ms
2 REPLIES 2
cocoasuny
Associate
Posted on August 16, 2016 at 09:17

Hi EGol,

  Do you find the way to connecte to multiple peripherals?

jyri
Associate
Posted on August 25, 2016 at 10:41

This programming manual has a guide on how to create simultaneous BLE connections. I have used this with a central unit with two slave and two master connections simultaneously.

http://www.st.com/content/ccc/resource/technical/document/programming_manual/1c/7e/d3/a6/d0/52/4a/35/DM00141pdf/files/DM00141pdf/jcr:content/translations/en.DM00141pdf

One thing that was missing from the guide is the command to set the mode. The function has to be called before aci_gap_init_IDB05A1. Here's a snip from my code, otherwise, follow the manual I linked.

uint
8
_t stackmode[
1
];
stackmode[
0
] = 
0
x
04
;
ret = aci_hal_write_config_data(CONFIG_DATA_ROLE, CONFIG_DATA_ROLE_LEN, stackmode);
if(ret)
{
printf(
''

Setting mode 4 failed!

''
);
goto fail;
}