cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG-1 simultaneous master/slave mode support

Evgeny Boltunov
Associate II

Good day, Support Team,

I have a question regarding BlueNRG-1 simultaneous master/slave mode support.

As I see from documentation "BlueNRG-1, BlueNRG-2 BLE stack programming guidelines.pdf" - BlueNRG-1 can support master/slave mode to be connected to the phone as peripheral device and at the same time can scan and connect as master to another BLE peripherals.

In my case I need to develop BLE device, which will communicate as BLE slave peripheral with mobile phone and at the same time will interact as BLE master with BLE peripheral with temperature/humidity sensor.

Main BLE device should periodically connect to BLE peripheral to read temperature/humidity values, and use them in it's program and also send temperature/humidity values to mobile phone.

I have tried to enable simultaneous master/slave mode, but can only scan or connect to BLE peripheral (as master) or connect to phone (as slave) at a time.

I used this code to configure GAP:

/* GAP Init */

aci_gap_init(GAP_PERIPHERAL_ROLE | GAP_CENTRAL_ROLE, ...);

I am using aci_gap_start_general_discovery_proc() to scan for BLE devices, aci_gap_proc_complete_event() to check for the end of BLE scanning process and hci_le_advertising_report_event() for getting the results of scanning.

I use aci_gap_create_connection() to connect from main BLE master device to BLE peripheral.

I also found one setting for BLE stack mode (in "bluenrg1_hal.h"):

/**

 * Select the BlueNRG roles and 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 only, 8 connections, RAM1 and RAM2.

 */

#define CONFIG_DATA_ROLE   (0x2D)

And I don't see the master/slave simultaneous mode here...

I also checked that in my project:

#define MIN_NUM_LINK is set to 2

But I can't simultaneously connect to master/slave device from phone and scan by master/slave device for another slave devices or to connect to another slaves from master/slave device.

Can you please clarify, does BlueNRG-1 really support master/slave mode and what settings I have to make to enable it?

What functionality should I get in simultaniously master/slave mode?

- Advertising and scan can be both available at the same time?

- Connection to slave from master/slave device, and connection to phone from master/slave device can be both available at the same time?

In advance thanks,

Evgeny Boltunov

1 REPLY 1

@ST Community​ who covers BlueNRG?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..