My CC2642R-Q1 is configured as a peripheral device.
How to modify my CC2642 code to let Master not issue "LL_LENGTH_REQ" to my CC2642 ?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
My CC2642R-Q1 is configured as a peripheral device.
How to modify my CC2642 code to let Master not issue "LL_LENGTH_REQ" to my CC2642 ?
Hi Karen,
You can follow the instructions in the Stack Users Guide: dev.ti.com/.../link-layer-cc13xx_cc26xx.html
Is it suitable for calling "HCI_EXT_SetMaxDataLenCmd() and HCI_EXT_SetLocalSupportedFeaturesCmd()" in
SimplePeripheral_init() ?
If yes, how do I get the features after HCI_LE_ReadLocalSupportedFeaturesCmd() is called in SimplePeripheral_init() ?
Hi Karen,
This post should cover all your questions, but instead of disabling CSA#2, clear the feature bit for DLE per the instructions in the guide.
Hello Evan,
In my first test, "HCI_EXT_SetMaxDataLenCmd() and HCI_EXT_SetLocalSupportedFeaturesCmd()" were put in SimplePeripheral_processCmdCompleteEvt() with HCI_LE_READ_LOCAL_SUPPORTED_FEATURES.
But, my CC2642 still issues "LL_LENGTH_REQ".
The log is shown (Time is not my settings) :
Bluetooth Low Energy Link Layer
Access Address: 0x5b7234a2
[Master Address: 71:21:bb:77:d0:0b (71:21:bb:77:d0:0b)]
[Slave Address: TexasIns_56:44:91 (d8:b6:73:56:44:91)]
Data Header
Control Opcode: LL_LENGTH_REQ (0x14)
Max RX octets: 27
Max RX time: 2120 microseconds
Max TX octets: 27
Max TX time: 2120 microseconds
[Response in Frame: 1446]
[Connection Parameters in: 1425]
CRC: 0xd80012
Bluetooth Low Energy Link Layer
Access Address: 0x5b7234a2
[Master Address: 71:21:bb:77:d0:0b (71:21:bb:77:d0:0b)]
[Slave Address: TexasIns_56:44:91 (d8:b6:73:56:44:91)]
Data Header
Control Opcode: LL_LENGTH_RSP (0x15)
Max RX octets: 251
Max RX time: 17040 microseconds
Max TX octets: 251
Max TX time: 2120 microseconds
[Request in Frame: 1445]
[Connection Parameters in: 1425]
CRC: 0xdf0009
Hello Evan,
Please forget the previous descriptions and refer to the followings :
Does CC2642 work with the following features and No "LL_LEGNTH_REQ" is issued when new connection occurs :
Feature Set: 0x00000000000000b9
.... ...1 = LE Encryption: True
.... ..0. = Connection Parameters Request Procedure: False
.... .0.. = Extended Reject Indication: False
.... 1... = Slave Initiated Features Exchange: True
...1 .... = LE Ping: True
..1. .... = LE Data Packet Length Extension: True
.0.. .... = LL Privacy: False
1... .... = Extended Scanner Filter Policies: True
.... ...0 = LE 2M PHY: False
.... ..0. = Stable Modulation Index - Transmitter: False
.... .0.. = Stable Modulation Index - Receiver: False
.... 0... = LE Coded PHY: False
...0 .... = LE Extended Advertising: False
..0. .... = LE Periodic Advertising: False
.0.. .... = Channel Selection Algorithm #2: False
0... .... = LE Power Class 1: False
.... ...0 = Minimum Number of Used Channels Procedure: False
0000 000. = Reserved: 0
Reserved: 0000000000
Yes, the CC2642 will still work with no DLE enabled. Can you please show me the code you used to disable / clear the featSet bit that was for DLE?
Hello Evan,
Please check the following code :
static void SimplePeripheral_processCmdCompleteEvt(hciEvt_CmdComplete_t *pMsg)
{
uint8_t status = pMsg->pReturnParam[0];
switch (pMsg->cmdOpcode)
{
case HCI_READ_RSSI:
{
..........................................
break;
}
case HCI_LE_READ_PHY:
.............................
break;
case HCI_LE_READ_LOCAL_SUPPORTED_FEATURES:
{
uint8_t featSet[8];
#define APP_TX_PDU_SIZE 27
#define APP_RX_PDU_SIZE 27
#define APP_TX_TIME 328
#define APP_RX_TIME 328
HCI_EXT_SetMaxDataLenCmd( APP_TX_PDU_SIZE, APP_TX_TIME,APP_RX_PDU_SIZE, APP_RX_TIME);
memcpy( featSet, &pMsg->pReturnParam[1], 8 );
CLR_FEATURE_FLAG (featSet[0],LL_FEATURE_DATA_PACKET_LENGTH_EXTENSION); /* test */
// Update controller with modified features
HCI_EXT_SetLocalSupportedFeaturesCmd( featSet );
}
default:
break;
}
}
Hello Karen,
your provided code looks good, you could move HCI_EXT_SetMaxDataLenCmd to the same location as where you are calling HCI_LE_ReadLocalSupportedFeaturesCmd(); if you see any issues there.
Is the resulting BLE connection matching your expectations?
Regards, Werner
About "HCI_EXT_SetMaxDataLenCmd is moved to the same location as where you are calling HCI_LE_ReadLocalSupportedFeaturesCmd()", I tried it last Friday and the "LL_LEGNTH_REQ" still be issued.
Hello Werner, Could you provide an example project for HCI_EXT_SetMaxDataLenCmd with TX_PDU_size = 0x27, RX_PDU_size = 0x27, TX_TIME = 328ms and RX_TIME = 328ms ?
Hello Karen,
I will perform further tests on my side and come back to you soon.
Hello Karen,
I reproduced your behavior on my side and it seems that there is an issue that disabling the packet length extension on the peripheral is ignored in this case.
We will execute further investigation into that and patch this issue in the future. Unfortunately I cannot provide you an immediate solution to the problem.
Regards, Werner