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:
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
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
Thanks for the answer, I'll check it out.
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
I want to know that the scan request comes from my receiver(as observer), not from other devices in range (e.q smartphone nearby).
你好,
How about my question? I have to explain more?
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
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)?
So, what about my problem?
我应该描述这个问题不同吗?
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