Connection between central and peripheral only when they are very close (<20cm), is that possible?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
IoVo_297831
Level 4
Level 4
First like received

Hi all,

   

In our application, there is one central and many peripheral devices inside the BLE range.
We would like the central to send connection request to a peripheral only if the corresponded peripheral passes very close from the central.
In this situation, someone could easily connect his mobile phone (=central) to a peripheral (our BLE application) by putting the devices close each other. Once connected, the devices should be able to be moved away and maintain connection. Without this, someone would have to pick the right Bluetooth device to connect to from a list of many other similar devices in range.

   

We would like to perform connections automatically, without picking the correct device from a list.
Is that possible in PSoC4 BLE?
If it is not possible in PSoC4 BLE, then are there any other technologies to implement that?

   

Any ideas?

   

Best Regards,
Yiannis

0 Likes
1 Solution
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

Check if the attached project can serve your requirement. Here, it is the other way around; there are many centrals and one peripheral. The peripheral advertises with the lowest possible Tx power because I disabled the internal PA by writing a 0 to CyBle_SetTxPowerLevel(). This means that a central will connect to the peripheral only when it is brought very close to the peripheral.

View solution in original post

0 Likes
5 Replies
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

Check if the attached project can serve your requirement. Here, it is the other way around; there are many centrals and one peripheral. The peripheral advertises with the lowest possible Tx power because I disabled the internal PA by writing a 0 to CyBle_SetTxPowerLevel(). This means that a central will connect to the peripheral only when it is brought very close to the peripheral.

0 Likes
IoVo_297831
Level 4
Level 4
First like received

Thank you very much for your answer and for the code you shared.
It is exactly what we need but the TX power level of -18db is still quite enough so the BLE devices are in range for about 2m.

   

What is needed more is this range to be less than 2m. A range of 10cm or maximum 20cm is the desired. Can we reduce the TX power level more than -18db?

   

Thanks again,
Best Regards,
Yiannis

0 Likes
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

Even though the BLE component shows -18dBm Tx power level, it is dynamically changed in firmware. Please check the project. If you check the file BLEApplication.c, line 127, I have written the function setTxPowerLevel(0); This will disable the internal PA and the Tx power will be much less than -18dBm and the range was about 1 to 2cm when I tested this project.

IoVo_297831
Level 4
Level 4
First like received

Thank you very much grsr for your answer.
I hadn't noticed that the enumeration type CYBLE_BLESS_PWR_LVL_T starts from 0x01.
It works as you mentioned.

   

One last question.
Is there any other value we could assign to CYBLE_BLESS_PWR_LVL_T type variable which could give a TX power less than -18db but higher than the value produced by assigning the zero value?

   

Thank you very much.

   

Best Regards,
Yiannis

0 Likes
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

I'm afraid you cannot assign a value between 0x00 and 0x01 to the CYBLE_BLESS_PWR_LVL_T type variable. I think you are trying to obtain a range that is more than the 1-2 cm provided by this project but less than what is specified in your post. In that case, you can try using an extended range module such as CYBLE-224110 in the project. You will need to enable the integrated PA/LNA of the module by following the procedure given in page 103 of the application note AN96841. When I tested with the pioneer kit, I could obtain a range of about 6-7 cm because of the integrated amplifier.