This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Multi peripheral and central

Hi,

I developed some multi peripheral units. and also i developed some central units which are  allowed to connect to the multi peripheral devices.

F.E: i got 2 multi peripheral units (marked as MP1 & MP2)  and 2 central units (marked as C1 & C2)

I wanted the MP1 to connect to C1 & C2 and also MP2 to connect to C1 & C2.

However, when i start all units i see that P1 made 2 even 3 connections simultaneously with C1 (instead of 1 connection only) !!!

How can a prevent this ?! 

Where should i stop the 2nd and 3rd connections? should i stop it on the peripheral side or at the central side and how ?!

B.R

Yuval.

Parents
  • Hi Yuval, 

    Could you describe how you configure the MP1 and MP2 to establish a new connection ? Are you filtering by just the device name or UUID in the advertising packet and connect automatically if match ? (connect_if_match=true)

    If it's the case, it explains why the connection is established again with C1/C2. The central doesn't know if it's already connected to a device. You may need to some connection manually (connect_if_match = false) and do the filtering on your own. The filtering can be either by address (if the C devices doesn't change address dynamically) or by using some kind of serial number in the advertising packet. 

Reply
  • Hi Yuval, 

    Could you describe how you configure the MP1 and MP2 to establish a new connection ? Are you filtering by just the device name or UUID in the advertising packet and connect automatically if match ? (connect_if_match=true)

    If it's the case, it explains why the connection is established again with C1/C2. The central doesn't know if it's already connected to a device. You may need to some connection manually (connect_if_match = false) and do the filtering on your own. The filtering can be either by address (if the C devices doesn't change address dynamically) or by using some kind of serial number in the advertising packet. 

Children
No Data
Related