Write with out response and notification operation at same time and in same characteristics.
11/334/2020 | 06:25 AM
Hi
I have created one characteristics with write without response and notify properties. I want to know what will happen and what is sequence of flow of data if write operation and notification happen in same time.
Thanks
Sreez
Bluetooth Low Energy
Discussion Forums
Unanswered
They can't happen at the same time, you can only perform one ATT operation at a time.
0
Hi,
Thanks for your replay.
Consider I am trying to send 25 packet of data from peripheral to central device by notification, same time central device sending 25 packet of data to peripheral by write without operation.
What will be the sequence of data transfer and which operation will happen first, write without response or notification?
Thanks
Sreez
0
It depends on how your application is handling that, there is no specific sequence. Each over the air packet will only have one ATT operation, but you can have multiple ATT operations in the same connection interval.
Can you explain why this is important for your application? The best way to know for sure is to use PTI and network analyzer to look at the data and see how the operations are being interleaved.
0
HI,
Is it possible to perform write without response and notify operation at a same time in different characteristic?
Thanks
Sreez
0
Is it possible to perform write without response and notify operation at a same time in different characteristic?
Yes it's possible. Strictly speaking, the two operations would not be happening simultaneously but from the application perspective you should not see any difference. I don't think there will be any problems even if you use the same characteristic for input/output data.
I want to know what will happen and what is sequence of flow of data if write operation and notification happen in same time.
Are you interested in what are all the details at radio packet level? If you just want to have reliable data flow in both directions then you probably don't need to worry at all about the low level details. There should not be any conflicts (resulting in lost packets or dropped connections) if you are sending data both ways at the same time. The stack can take care of that.
If you need to control precisely at packet level what is the order of packets being sent in each direction, the you probably should not be using notify and write-without-response in the first place. But I guess you are just concerned about what happens if the incoming and outgoing data streams "collide", am I right?
0
Hi
Thanks Tyler for your replay.
Yes , I just concerned about what happens if sending data both ways at the same time in same characteristic.
You said, should not be any conflicts if you are sending data both ways at the same time. Then there have possibilities to conflicts and resulting in lost packets or dropped connections if I am sending data both ways at the same time?
The SPP example uses same characteristic (spp_data) for both incoming and outgoing data using write-without-response and notifications. The data streams are not coordinated in any way but still the example works just fine. I have personally tested it so that high amount of data is streamed both in and out at the same time and it works just fine.
You don't need to worry about the collision, the stack will take care of that for you and it makes sure no data is lost.
0
Hi
If central device is mobile app, is there any possibilities of collision and loss of packet if sending data both ways at the same time?
In IOS mobile app, is there any possibility of loss of data or anything else negative cases in same situation ?
Sreez
0
It does not really matter if the central device is a mobile app or not. The data transfer over BLE connection works so that user application does not need to worry about conflicts.
Write with out response and notification operation at same time and in same characteristics.
Hi
I have created one characteristics with write without response and notify properties. I want to know what will happen and what is sequence of flow of data if write operation and notification happen in same time.
Thanks
Sreez
Hi,
Thanks for your replay.
Consider I am trying to send 25 packet of data from peripheral to central device by notification, same time central device sending 25 packet of data to peripheral by write without operation.
What will be the sequence of data transfer and which operation will happen first, write without response or notification?
Thanks
Sreez
It depends on how your application is handling that, there is no specific sequence. Each over the air packet will only have one ATT operation, but you can have multiple ATT operations in the same connection interval.
Can you explain why this is important for your application? The best way to know for sure is to use PTI and network analyzer to look at the data and see how the operations are being interleaved.
HI,
Is it possible to perform write without response and notify operation at a same time in different characteristic?
Thanks
Sreez
Yes it's possible. Strictly speaking, the two operations would not be happening simultaneously but from the application perspective you should not see any difference. I don't think there will be any problems even if you use the same characteristic for input/output data.
Are you interested in what are all the details at radio packet level? If you just want to have reliable data flow in both directions then you probably don't need to worry at all about the low level details. There should not be any conflicts (resulting in lost packets or dropped connections) if you are sending data both ways at the same time. The stack can take care of that.
If you need to control precisely at packet level what is the order of packets being sent in each direction, the you probably should not be using notify and write-without-response in the first place. But I guess you are just concerned about what happens if the incoming and outgoing data streams "collide", am I right?
Hi
Thanks Tyler for your replay.
Yes , I just concerned about what happens if sending data both ways at the same time in same characteristic.
You said, should not be any conflicts if you are sending data both ways at the same time. Then there have possibilities to conflicts and resulting in lost packets or dropped connections if I am sending data both ways at the same time?
For reference, You can have a look at the SPP example:
https://www.silabs.com/community/wireless/bluetooth/knowledge-base.entry.html/2017/04/13/spp-over-ble_c_examp-mnoe
The SPP example uses same characteristic (spp_data) for both incoming and outgoing data using write-without-response and notifications. The data streams are not coordinated in any way but still the example works just fine. I have personally tested it so that high amount of data is streamed both in and out at the same time and it works just fine.
You don't need to worry about the collision, the stack will take care of that for you and it makes sure no data is lost.
Hi
If central device is mobile app, is there any possibilities of collision and loss of packet if sending data both ways at the same time?
In IOS mobile app, is there any possibility of loss of data or anything else negative cases in same situation ?
Sreez