2015-11-03 07:29 AM
Hello,
I'd like to have some clarifcations regarding BLUENRG-MS capacities to handle multiple simultaneous connection as a Master and Slave device.From what I undertand, the chip have to configured with Stack Mode 4 (or Mode 3) to enable simultaneous master / slave / scan / advertize behaviour.But I can't find exactly which simultaneous connection are possible (for example: connected as a master to 2 devices, and connected as a slave to another device while scan and advertising is still active).Are the following configurations possible with BlueNRG-MS ?1) Device(BlueNRG-MS) connected to 1 master, advertising and scanning still active.2) Device(BlueNRG-MS) connected simultaneously to 2 masters, scanning still active (i.e. able to received advertising data from other devices)3) Device(BlueNRG-MS) connected simultaneously to 1 master and 1 slaveIs there any document describing the Stack Mode 4 and Mode 3 behavior ?Thank you #bluenrg2017-04-18 03:57 PM
The Programming manual BlueNRG-MS describes a little in 3.10 and all of 4:
The sample code describes a little as well:
/** * Select the BlueNRG mode configurations.\n * @li Mode 1: slave or master, 1 connection, RAM1 only (small GATT DB) * @li Mode 2: slave or master, 1 connection, RAM1 and RAM2 (large GATT DB) * @li Mode 3: master/slave, 8 connections, RAM1 and RAM2. * @li Mode 4: master/slave, 4 connections, RAM1 and RAM2 simultaneous scanning and advertising. */#define CONFIG_DATA_MODE_OFFSET (0x2D)2017-08-23 03:12 PM
I have a related question about Stack Mode 1 and 2. What is a 'small GATT DB' vs 'large GATT DB'? Can one tell when one is exceeding the capabilities of a small GATT DB easily?
2017-09-07 05:18 AM
Mode1 - number of attribute records for characteristics is 35
Mode2 - number of attribute records for characteristics is 68
In both cases 9 records are reserved for GAP and GATT services
2018-06-05 01:41 PM
Hi everybody,
I have a question about this stack mode, how can I change this stack mode?
Just with code?
uint8_t stackmode[1];
stackmode[0] = 0x03;
ret = aci_hal_write_config_data(CONFIG_DATA_MODE_OFFSET,
CONFIG_DATA_MODE_LEN,
stackmode);
or there is another step to change that?
I saw there is a file called 'bluing_IFR.c' where we can find this:
#define STACK_MODE 2
#define SLAVE_SCA_PPM 100
#define MASTER_SCA MASTER_SCA_100ppm
#define HS_STARTUP_TIME_US 800
#define DAY 13
#define MONTH 06
#define YEAR 16
Do I have to change this value to 3 to obtain the stack mode 3?
Thank you for your answers.
Regards.
2018-06-06 05:05 AM
Hi Quentin,
if you want to use stack mode 0x03, you can use the following code:
uint8_t role = 0x03;
ret = aci_hal_write_config_data(CONFIG_DATA_MODE_OFFSET, CONFIG_DATA_MODE_LEN, &role);Please note that you have to call aci_hal_write_config_data() as the first command after reset. If you send other commands before aci_hal_write_config_data(), it will fail.
As for the 'bluenrg_IFR.c' file, you don't need to change that, as it is used only when reprogramming the device flash. Unless you know what you're doing, you don't need to change the IFR configuration.
Best regards,
Antonio
2018-06-06 06:51 AM
Hi Antonio,
thank you for your reply, i will try this evening .
Best regards.
2018-06-06 11:26 PM
Hi !
Yesterday I tried to connect 2 card (peripheral) on one (central) but it seems to don't working.
I used the following code just after the reset :
uint8_t role = 0x03;
ret = aci_hal_write_config_data(CONFIG_DATA_MODE_OFFSET, CONFIG_DATA_MODE_LEN, &role);but when i wrote the command 'aci_gap_create_connection' with 2 adresses differentes, my card connect just of them.
Can you help me?
Best regards
2018-06-07 03:16 AM
Hi Quentin,
I'm not sure I fully understand your question, but maybe the following thread could be helpful:
https://community.st.com/0D70X000006SztJSAS
Best regards,
Antonio
2018-06-07 11:29 PM
Hi Antonio,
it is very helpfull, it will help me to build my code but i don't think that will resolve my problem. What I want is to connect 4 or 5 cards (with
SPBTLE-RF) to one other, the master. Today i can do only one connection.
Do i have to make a succession of '
aci_gap_create_connection'?
Best regards