Broadcaster/Observer role - acknowledge

Learn MoreFAQsTutorials

12 posts / 0 new
Last post
adam.stroz
Offline
Last seen:2 weeks 4 days ago
Joined:2020-05-22 07:54
Broadcaster/Observer role - acknowledge

Hello,

I have a small question about Broadcaster/Observer pair. I know that Broadcaster/Observer implement unidirectional communication.

My question is"It is possible to receiveacknowledge information from observer to broadcaster?"

My scenario:

I have two devices (sensor as broadcaster and receiver as observer), and I want to transmit some data (e.q temperature data) from sensor to receiver . And I want to know that the observer (receiver ) has received the information from the sensor (broadcaster), something like acknowledge.

Device:
PM_Dialog
Offline
Last seen:6 hours 25 min ago
Staff
Joined:2018-02-08 11:03
Hi adam.stroz,

Hi adam.stroz,

Generally, in order to be able to scan the device should be configured either as a Central or as an Observer. In order to scan all types of advertising strings you will have to set your scan mode to GAP_OBSERVER_MODE. This kind of scanning will return any kind of advertising strings of the BLE devices that are over the air, but the scanning procedure will never time out, thus you have to explicitly stop it.

When a device acts as a broadcaster, this means that is able to support only non-connectable advertising. So, could you please indicate what kind of acknowledge you are expecting?

Thanks, PM_Dialog

adam.stroz
Offline
Last seen:2 weeks 4 days ago
Joined:2020-05-22 07:54
I need confirmation for the
I need confirmation for the broadcaster (sensor) that the receiver (observer) has received the data. I don’t know if this is possible in the case of the observer/broadcaster.
PM_Dialog
Offline
Last seen:6 hours 25 min ago
Staff
Joined:2018-02-08 11:03
Hi adam.stroz,

Hi adam.stroz,

Since it is non-connectable advertising (broadcaster), a possible solution might be to set the Scan Response just only to activate the receiver. You might add a some bytes ( for instance manufacturer specific data ) into the scan respo0nse data.

In the observer side, you should configure it as an active scanner in order to send scan request. If the observer sends a scan request to the broadcaster this means that the data have been received.

I would also recommend checking theDA14585 DA14586 DA14531 Scan Request TrackSW Example.

The example demostrates how a peripheral device can track if it is scanned and which central device performs the scanning procedure. The central device needs to scan in active mode since the peripheral device will track if it is scanned via the scan request from central.

Thanks, PM_Dialog

adam.stroz
Offline
Last seen:2 weeks 4 days ago
Joined:2020-05-22 07:54

Thanks for the answer, I'll check it out.

I have additional questions:
  • whether the central(or just observer?) can receive an advertising packet from the broadcaster? And send scan request ?
  • can I include additional information in the scan request (i want to know that right device received the data from broadcaster)
PM_Dialog
Offline
Last seen:6 hours 25 min ago
Staff
Joined:2018-02-08 11:03
Hi adam.stroz,

Hi adam.stroz,

If the scan response data are set, the receive is activated to, so the Central/Observer will send a scan response. What information you would like to add? Do you mean into the scan response data?

Thanks, PM_Dialog

adam.stroz
Offline
Last seen:2 weeks 4 days ago
Joined:2020-05-22 07:54
I want to know that the scan

I want to know that the scan request comes from my receiver(as observer), not from other devices in range (e.q smartphone nearby).

adam.stroz
Offline
Last seen:2 weeks 4 days ago
Joined:2020-05-22 07:54
你好,

你好,

How about my question? I have to explain more?

PM_Dialog
Offline
Last seen:6 hours 25 min ago
Staff
Joined:2018-02-08 11:03
Hi adam.stroz,

Hi adam.stroz,

So, do you mean something like “to allow scanning only from your observer and prevent scanning from the other centrals” ?

Thanks, PM_Dialog

adam.stroz
Offline
Last seen:2 weeks 4 days ago
Joined:2020-05-22 07:54
Hello,

Hello,

I will present my problem from the beginning. I want to send some data from my sensor (working as broadcaster) to receiver (working as observer), and i want to use Broadcaster/Observer roles.

I would like to know that the data has been received by MY receiver (something like acknowledge ). I know I should use active scanning (in the observer side) to send a scan request to sensor (that means, the data has been received). And in this point is my question,

How will I know that I have received the acknowledge (scan request) from my receiver, not from another device (e.g. smartphone)?

adam.stroz
Offline
Last seen:2 weeks 4 days ago
Joined:2020-05-22 07:54
So, what about my problem?

So, what about my problem?

我应该描述这个问题不同吗?

PM_Dialog
Offline
Last seen:6 hours 25 min ago
Staff
Joined:2018-02-08 11:03
Hi adam.stroz

Hi adam.stroz

Sorry for the delay. Please check theDA14585 DA14586 DA14531 Scan Request Trackas mentioned in my previous post. This example aims to demonstrate how a peripheral device can track if it is scanned and which central device performs the scanning procedure. Probably you will know this by the peer device BD address.

Thanks, PM_Dialog