(KW36) How to, if possible, request connection to multiple devices in parallel?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

(KW36) How to, if possible, request connection to multiple devices in parallel?

921 Views
nava_daniele93
Contributor II

HI,

I'm developing an application with FRDM - KW36 that must connect to multiple slaves.

Knowing the devices MAC in advance, is it possible to issue a number of connection requests and then expect the devices to initiate connection when they receive ADV?

Right now i have to Issue a connection request for a device and wait for it to connect before i'm able to send another request, i'm asking if it is possible to avoid this sequentiality and directly issue multiple requests to the Host.

Any clarification on the matter would be great!

Dan

Labels (2)
Tags (2)
0 Kudos
3 Replies

812 Views
nava_daniele93
Contributor II

Hello Sebastian, I Hope you're doing well, too,

In my case, I have to connect to multiple slaves which have a long advertising interval.

To the best of my understanding, the connection is performed as follows:

Connection request comes from user (by the pressing of a button, for example)

 - Stop Scan

 - Issue Connection Request for the designated MAC Address device

... wait that the Peripheral open the window (time to wait: 0 - Slave_Adv_Period)

 - Device sends Adv, window is open -> Master initiate the connection

 - Master can turn on the Scan and is ready to manage a new connection request, while it performs service discovery / pairing / any action needed on the connected slave.

What limits my application right now is the fact that i have to wait for the interval [0 - Slave_Adv_Period] when i issue a connection request, multiplied by the number of Devices i need to connect each time. This cause long 'ScanOff' periods.

Since I need to connect to multiple devices, I would be faster by being able to 'store' the request for all the devices and just initiate the connection with the one peripheral that sends an Advertise first. 

When you say that the connection method is designed to work sequentially, you specifically mean that I always have to define one MAC Address to which i want to connect first and then wait for the peripheral to send a connectable advertise, before being able to open the procedure for a second one, correct?

Thank you for your help, 

I really appreciate

Dan

0 Kudos

812 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Daniele,

 

Even if the Address for each of the devices is known beforehand, the devices must be scanned first, to make sure that they're present before initiating a connection. There's an example in the BLE Application Developer's Guide showing the connection process for a device with a known address in chapter 4.1.2.

 

What I mean by working sequentially is that the connection for one device has to be established before initiating connection with another present device, even if the address of all of the devices is known.

 

The BLE Application Developer's Guide can be found in the following path after extracting the SDK package:

<…\SDK_2.2.3_FRDM-KW36\docs\wireless\Bluetooth\Bluetooth Low Energy Application Developer Guide.pdf>

 

Please let me know if you need any more information.

 

Take care, best regards,

Sebastian

0 Kudos

812 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Daniele, I hope you're doing well!

 

Could you please take a look at the following documents?

 

Multiple Connections Central Device

Multiple Connections Peripheral Device

 

They show how to modify and prepare one of the available SDK examples to enable multiple connections, as either a central, or a peripheral device.

 

The connection method is designed to work sequentially, as the connection process for one device must be completed before starting connection with another one.

 

Please let me know if you need any more information.

 

Take care, best regards,

Sebastian

0 Kudos