Questions about pairing and bonding

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

cross mob
Anonymous
Not applicable

Could you please answer some newbie questions

   

1. It is my understanding that paring is a process in which 2 devices communicate over a connection that is established after a passkey has been exchanged. Bonding is a process where the passkey is saved so next time devices connect they don't have to exchange the passkey and the connection is established quicker.

   

Here is where I have a disconnect: The GAP settings tab of the BLE component  has options  to disable pairing/bonding and yet it's possible to establish communication with various services that a device has and read and write data to/from various characteristics.

   

So am I correct in assuming that pairing and bonding are only for security purposes?

   

What about advertising (i.e beacon functionality) ?

   

How does pairing/bonding affect advertising?

   

Related questions

   

1. How many unpaired/unbonded connections can a client ( i.e iOS and Android ) can have?

   

2. How many paired and bonded connections?

   

3. Same question regarding the BLE component itself

   

Thank you

   

Andy

0 Likes
1 Solution
Anonymous
Not applicable

Pairing and bonding are used for authentication, encryption, and remembering those values from previous connections.

   

Advertising is used to allow other Bluetooth devices to see: The unit/radio, and the data in the advertisement packet. Devices can only connect to a unit that is already in advertising mode.

   

Pairing and bonding don't affect advertising, but connecting/disconnecting from the advertising unit do.

   

The PSoC BLE can only be connected to one other device at a time.

   

The PSoC BLE component is able to store bonding/pairing information for up to 4 devices (and 4 for whitelisting).

   

No idea what the radio limitations on iOS and Android are, but they most likely have similar ones.

View solution in original post

0 Likes
6 Replies
Anonymous
Not applicable

Pairing and bonding are used for authentication, encryption, and remembering those values from previous connections.

   

Advertising is used to allow other Bluetooth devices to see: The unit/radio, and the data in the advertisement packet. Devices can only connect to a unit that is already in advertising mode.

   

Pairing and bonding don't affect advertising, but connecting/disconnecting from the advertising unit do.

   

The PSoC BLE can only be connected to one other device at a time.

   

The PSoC BLE component is able to store bonding/pairing information for up to 4 devices (and 4 for whitelisting).

   

No idea what the radio limitations on iOS and Android are, but they most likely have similar ones.

0 Likes
Anonymous
Not applicable

Thank you so much for your feedback

   

Could you please clarify

   

"Advertising is used to allow other Bluetooth devices to see: The unit/radio, and the data in the advertisement packet. Devices can only connect to a unit that is already in advertising mode."

   

What about device services and characteristics? It seems that a connection is necessary to read/write them. If that's the case could you clarify this

   

statement: "The PSoC BLE can only be connected to one other device at a time." 

   

What "device" are you referring to here? Another PSoC  BLE? Or a client (i.e a mobile app or computer)

   

Thank you 

   

Andy

0 Likes
Anonymous
Not applicable

"Advertising is used to allow other Bluetooth devices to see: The unit/radio, and the data in the advertisement packet. Devices can only connect to a unit that is already in advertising mode."

   

Device services and connections can only be read/written (accessed) while connected over bluetooth. If you are planning on transmitting data using the services and characteristics, then you will need to have one device advertise, and the other scan, find the advertising device, connect to it, and then read/write the data it needs to.

   

What "device" are you referring to here? Another PSoC  BLE? Or a client (i.e a mobile app or computer)

   

"device" refers to any device containing a bluetooth radio that can initiate a connection (central-side), or receive a connection request (peripheral that is advertising)

   

Any Bluetooth client: Android phone, iOS phone, Bluetooth speaker, bluetooth radio, another PSoC BLE, etc.

0 Likes
Anonymous
Not applicable

Thank you very much for your help.

   

In my case a client  needs to monitor multiple peripheral devices whose characteristics may change rapidly.

   

It seems that the best approach to handle this is to have the peripheral broadcast a custom packet containing that data.

   

Does this sound reasonable? What are the pitfalls?  The amount of data is well within 31 bytes of  the advertising packet

   

Thanks

   

Andy

0 Likes
Anonymous
Not applicable

Multiple peripherals to one client is definitely possible for hardware capabilities;

   

Either you can have the central device time-multiplexing between the different peripherals to collect the data (latency of connect,disconnect, and number of peripherals of course)

   

or advertising the data in the advertisement packets as you suggested.

   

If setting up the peripherals to advertise, you can reduce noise/collisions by having the peripherals only advertise when they have new data, then have the client connect, read the data, and disconnect (turning off their advertising until the next data update). This of course would increase the latency of data reception.

   

It sounds reasonable depending on some factors: How fast can you process the peripheral advertisement packets? As you get more peripherals, you will have more packets that you need to process within a given amount of time.

   

Advertisement packets may be sent at the same time, and thus only one of them will get received; This can be fixed by catching the data on the next packet. It shouldn't happen too often depending on timing, emi, frequency of data, etc.

   

And finally, although advertising the data is the fastest, it does make it available to all radios in range, meaning that there is no security whatsoever on the advertised data.

0 Likes
Anonymous
Not applicable

Thank you very much  for help!

   

Andy

0 Likes