- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I am working on an application where the peripheral device sends various notifications to the central device with attribute sizes ranging from 10 bytes to 240 bytes. I want to set large MTU and max payload sizes such that large notifications (240 bytes) can be sent in one TX event. I understand that a notification with higher attribute size will lead to higher power consumption. Does the power consumption depend on the specific attribute size of the notification, or the negotiated MTU size? For example, what would happen if I transmit a small 10 byte notification while the attribute MTU size is set to 244 bytes, and DLE is used to set the max payload size to 251 bytes?
Also, are there any examples using DLE in PSOC 4 BLE 4.2?
Thanks!
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>"Assuming the above parameters and a single notification transmission, will the power consumption depend on the transmitted attribute size (variable payload size), rather than MTU size or or Max payload size?"
--> Yes. The power consumption depends on the attribute size that you are foing to pack but not the MTU size. Please set the 'actualLen' parameter equal to the 'len' parameter. Because the 'actualLen' is the actual length of the parameter that is transfered through air.
actualLen: Out Parameter Indicating Actual Length Packed and sent over the air. Actual length can be less than or equal to the 'len' parameter value. This provides information to application that what is the actual length of data that is transmitted over the air. Each GATT procedures defines different length of data that can be transmitted over the air. If application sends more than that, all data may not transmitted over air.
>>"So can I just use 'notificationPacket.value.len' to set the attribute length/payload length to minimize power consumption?"
--> Yes. Along with that please set 'notificationPacket.value.actualLen = 'notificationPacket.value.len' also.
Thanks
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The power consumption doesn't depend on the MTU size setting. It depends on the payload size. Since you are transmitting variable length data everytime ranging from 10 bytes to 240 bytes, you can set the payload size based on how large packets you are transmitting too often. You can see this information in the following application note.
If the MTU size is larger than payload, the controller has to transmit multiple packets of data.
https://www.cypress.com/file/224826/download
When you set the payload size to 251 bytes you are actually setting the maximum length of data length. So when you are transfering smaller length (MTU) characteristics the payload will be less compared to the larger length (MTU) characteristics. So the power consumption will be less for smaller attributes.
You can set the Max and min payloads using the APIs CyBle_GapSetDataLength() and CyBle_GapSetRxDataLength() in case you want to change the data lengths in run time. Actual data length used by controller will be informed through 'CYBLE_EVT_GAP_DATA_LENGTH_CHANGE' event.
Thanks
Ganesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ganesh,
Thanks for the response!
Peripheral
Variable payload size - 10 ~240 bytes
MTU size - 244 bytes
Max Tx payload size - 251 bytes
Max Rx payload size -27 bytes
Central
MTU size - 244
Max Tx payload size - 27
Max Rx payload size - 251
During a single connection, I will only make 1 or 2 notifications max.
Assuming the above parameters and a single notification transmission, will the power consumption depend on the transmitted attribute size (variable payload size), rather than MTU size or or Max payload size?
So can I just use 'notificationPacket.value.len' to set the attribute length/payload length to minimize power consumption?
** In addition, are ble functions such as send notification blocking? If I call CyBle_GattsNotification() while BLESS is in deep sleep, will the processor wait until BLESS wakes up to complete the sending of the notification, or will the processor continue to do other things?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>"Assuming the above parameters and a single notification transmission, will the power consumption depend on the transmitted attribute size (variable payload size), rather than MTU size or or Max payload size?"
--> Yes. The power consumption depends on the attribute size that you are foing to pack but not the MTU size. Please set the 'actualLen' parameter equal to the 'len' parameter. Because the 'actualLen' is the actual length of the parameter that is transfered through air.
actualLen: Out Parameter Indicating Actual Length Packed and sent over the air. Actual length can be less than or equal to the 'len' parameter value. This provides information to application that what is the actual length of data that is transmitted over the air. Each GATT procedures defines different length of data that can be transmitted over the air. If application sends more than that, all data may not transmitted over air.
>>"So can I just use 'notificationPacket.value.len' to set the attribute length/payload length to minimize power consumption?"
--> Yes. Along with that please set 'notificationPacket.value.actualLen = 'notificationPacket.value.len' also.
Thanks
Ganesh