SWRU271I October 2010 – January 2020 CC2540 , CC2540T , CC2541 , CC2541-Q1 , CC2640R2F
It is strongly advised to make a backup of your existing project before porting your project.
The instructions below are provided for updating an existing, functional 1.5.0 based application with updates from 1.5.1.
If your project is based off a BLE-Stack version prior to 1.5.0, follow the instructions in Section 9.3 to port your project to 1.5.0.
The SimpleBLEPeripheral application, BEM and EBL utils were updated.
See lines 696 – 707 in \Projects\ble\SimpleBLEPeripheral\Source\simpleBLEPeripheral.c of 1.5.1 code:
case GAPROLE_WAITING:
{
#if (defined HAL_LCD) && (HAL_LCD == TRUE)
HalLcdWriteString( "Advertising", HAL_LCD_LINE_3 );
#endif // (defined HAL_LCD) && (HAL_LCD == TRUE)
uint8 advertEnabled = TRUE;
// Enabled connectable advertising.
GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8),
&advertEnabled);
}
In \Projects\ble\util\BEM\app\bem_main.c of 1.5.1 code:
#include "bem_util.h"
See lines 261 – 264:
// The IV CTR should be loaded only for the first block
if (skipCnt == 1)
{
ENCCS = CTR | AES_LOAD_IV | 0x01;
}
See line 389:
return ((constTimeMemcmp(sigBuf, aesHdr->signature, KEY_BLENGTH) == 0) ? TRUE : FALSE);
In addition, a file containing the constant time memcmp function was added (\Projects\ble\util\BIM\app\bem_util.c).
Please add the file to your BEM.ewp file.
See lines 1126 – 1128 in \Projects\ble\util\BEM\cc254x\BEM.ewp of 1.5.1 code:
<file>
<name>$PROJ_DIR$\..\app\bem_util.c</name>
</file>
In \Projects\ble\util\EBL\app\sbl_exec.c. See lines 565 – 569:
// The IV CTR should be loaded only for the first block
if (skipCnt == 1)
{
ENCCS = CTR | AES_LOAD_IV | 0x01;
}