PSoC 4 BLE advertisement filtering

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

cross mob
PrHa_1943761
Level 1
Level 1
Welcome!

Hi All,

   

I need to develop an application where I need to receive the advertisement data only from my peripheral devices and not other BLE devices that are present near by. We can add some control bytes in advertisement data and differentiate it from the rest of the BLE device or may be add a string to differentiate. But is there a better way to do this kind of filtering?

   

Thanks

0 Likes
1 Solution
Anonymous
Not applicable

When you advertise, you can do directed advertisement (it attaches the bdaddr of the device it is trying to reach iirc).

   

Otherwise, you can filter on the BDaddress itself to only accept data from addresses that match the addresses you are looking for.

View solution in original post

0 Likes
8 Replies
Anonymous
Not applicable

When you advertise, you can do directed advertisement (it attaches the bdaddr of the device it is trying to reach iirc).

   

Otherwise, you can filter on the BDaddress itself to only accept data from addresses that match the addresses you are looking for.

0 Likes

Thanks for your reply.

   

I guess I can just hard code my central device address and turn on the directed advertisement. This approach is convenient compared to other methods. 

0 Likes
Anonymous
Not applicable

Or if you really want it to be dynamic, provide hooks in your software to modify/add/delete device addresses to the filter list you are implementing on the central device. There are tradeoffs anyway you do it really though 😕

0 Likes

Yup. Thats one more way to go about it. Any way I will give earlier method a try. If required to be dynamic in future, then I have to go with this approach.

   

Thanks

0 Likes
Anonymous
Not applicable

You're welcome, and good luck 😉

0 Likes
Anonymous
Not applicable

Hi e.pratt_1639216​, how do I do direct advertisement for Central devices that broadcasts "random" public address every time Bluetooth is turned on? Can I simply assign the "identity" address of such devices in cyBle_discoveryModeInfo.advParam->directAddr? Example of such devices are Android and iOS phones these days.

0 Likes
Anonymous
Not applicable

You need to have a resolvable address in order to determine if the device is the one you want. This article talks about it a little bit: http://origin-www.cypress.com/forum/psoc-4-ble/resolving-random-storing-public

Here is a walkthrough by Cypress on the matter: How to get the public/static random address when a device uses a resolvable private address - KBA203...

0 Likes
Anonymous
Not applicable

Thanks for the references, e.pratt_1639216​.

0 Likes