Dear Sirs,
I have tried to set the max PDU size (max packet size of Link Layer) as 251 Bytes (the default 27 Bytes provided at the SDK) but it is failed to change. The max PDU size seems to be limited to 81 bytes by BLE firmwre as the setting for the value above this bound would get the failure message. I have checked the DLE (Data Length Extension) has been enabled at the HCI supported features when link is connected. So is there any way to change the max PDU size as 251 bytes ? Thanks.
Best Regards,
Bolo
HI bolo.tsai,
Could you let me know which API are you using for 251 bytes?
Thanks
BR,
Jayden
Hi Jayden,
I use qapi_BLE_HCI_Host_Buffer_Size to set the max PDU size but it would get 16 returned at StatusResult. Is there other way to change the max PDU size as 251-bytes ? Thanks.
Regards,
Bolo
Hi Bolo,
For BLE Data Length Extension, can you try to use qapi_BLE_GAP_LE_Set_Data_Length()?
QCLI Demo also exposes a command "SetDataLength" corresponding the QAPI.
Thanks
BR,
Jayden
Hi Jayden,
I have tried to use SetDataLength command to set 251 (i.e. max TX PDU 251 bytes) but no messages shown at QAPI_BLE_ET_LE_DATA_LENGTH_CHANGE_E of GAP_LE_Event_Callback. When I set 81 by using SetDataLength, the data length exchange messages can be seen at the console (the messages listed at QAPI_BLE_ET_LE_DATA_LENGTH_CHANGE_E of GAP_LE_Event_Callback). Below is the execution logs captured from the console and FYI. Can you tell me how to successfully set 251B tx pdu size ? Thanks
BLE: SetDataLength: Suggest Tx Packet Time (us): 2120.
BLE: SetDataLength: Suggest Tx Packet Time (us): 664.
BLE: etLE_Data_Length_Change with size 14.
BLE: Connection Address: 0x516C0E9B5766.
BLE: Max Tx Octets: 69.
BLE: Max Tx Time: 664.
BLE: Max Rx Octets: 81.
BLE: Max Rx Time: 760.
BLE: etHCI_Connection_Complete with size 20.
BLE: Status: 0.
BLE: Connection Handle: 69.
BLE: Role: Slave.
BLE: Peer Address Type: QAPI_BLE_LAT_PUBLIC_IDENTITY_E.
BLE: Peer Address: 0x000002F80051.
BLE: Connection Interval: 8.
BLE: Connection Latency: 0.
BLE: Supervision Timeout: 1550.
BLE: Master Clock Accuracy: 1.
Best Regards,
Bolo
Hi Bolo,
Thanks for your trial.
Maximum BLE Data Payload is configured via NVM.
If we increase the size, we need to increase the value to 255 (0xFF) in NVM.
Default value was 81 (0x51).
With following change in NVM, you can increase BLE Data Size up to 251 by qapi_BLE_GAP_LE_Set_Data_Length().
@QCA4020_2p0.nvm
[Tag0]
TagNum = 1
TagLength = 13
- TagValue = 51 00 72 06 04 10 10 14 14 10 04 FB 00
+ TagValue = FF 00 72 06 04 10 10 14 14 10 04 FB 00
Please refer section 3.6.1.1 BLE size parameters in 80-YA121-142 QCA402x (CDB2x) Programmers Guide.
Thanks
BR,
Jayden
Hi Jayden,
I would try it and thanks for your so helpful information.
BR,
Bolo
Hi Jayden,
I can successfully change the BLE Data Size to max 251B according to your suggestion at the last reply. I am very appreciated your help.
BR,
Bolo