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.

BLE project with stack 2.1.0

Hi everyone !

I'm trying to install the new version of the stack, my application is able to build without errors but in real implementation it crash. I have downloaded the new version and installed it and modified my project options as :

1) STACK / APPLICATION Linked ressources options : All references to version 2.00 are modified to version 2.01

2) New SimpleBLE Peripheral stack imported

3) Complete clean of projects (clean + manual delete of debug/flashrom files)

4) Compilation and software modifications :

/*
* Application
*/
// Before
HCI_EXT_ConnEventNoticeCmd(selfEntity,PERI_CON_EVT_COMPLETE_EVT);
// After
uint16_t connHandle ;
GAPRole_GetParameter(GAPROLE_CONNHANDLE, &connHandle);
HCI_EXT_ConnEventNoticeCmd(connHandle, selfEntity,PERI_CON_EVT_COMPLETE_EVT);

/* 
* Profiles 
*/
// Before
status = GATTServApp_RegisterService( Peristaltic_pump_state_AttrTbl, 
		  GATT_NUM_ATTRS( Peristaltic_pump_state_AttrTbl ),
		  &Pump_state_CBs );
// After
status = GATTServApp_RegisterService( Peristaltic_pump_state_AttrTbl, 
		  GATT_NUM_ATTRS( Peristaltic_pump_state_AttrTbl ),
		  sizeof(uint8_t),
		  &Pump_state_CBs );

// Before
static bStatus_t simpleProfile_ReadAttrCB( uint16 connHandle, gattAttribute_t *pAttr, 
                                           uint8 *pValue, uint8 *pLen, uint16 offset,
                                           uint8 maxLen, uint8 method );
static bStatus_t simpleProfile_WriteAttrCB( uint16 connHandle, gattAttribute_t *pAttr,
                                            uint8 *pValue, uint8 len, uint16 offset,
                                            uint8 method );
// After
static bStatus_t simpleProfile_ReadAttrCB(uint16_t connHandle,
                                          gattAttribute_t *pAttr, 
                                          uint8_t *pValue, uint16_t *pLen,
                                          uint16_t offset, uint16_t maxLen,
                                          uint8_t method);
static bStatus_t simpleProfile_WriteAttrCB(uint16_t connHandle,
                                           gattAttribute_t *pAttr,
                                           uint8_t *pValue, uint16_t len,
                                           uint16_t offset, uint8_t method);

The bleUserConfig.h file has also been adapted to my board and hardware configuration (worked perfectly on version 2.00)

Now build is clean but the system does crash when launched on the board, when I started it  stopped when the LED is blinking (after initialisation)

if(PIN_open(&hStateHui, aPinListHui))
{
    PIN_setPortOutputValue(&hStateHui, (1<<LED1));
    Task_sleep(500); // Stop here
    PIN_setPortOutputEnable(&hStateHui, 0);
    PIN_close(&hStateHui);
}

Thanks in advance for your help

have a nice day

  • By removing optimizations level (from level 2 to level 0), the system is able to start and advertising. But i'm unable to write / read the profiles values

    edit : I replaced sizeof(uint8_t) in GATTServApp_RegisterService function by a value of 0x07 (minimal size of encryption key) in my profiles, it doesn't change anything

    edit2: I use CCS version 6.1, Ti-RTOS version 2.13.1.09, XdcTools 3.31.1.33, stack 2.01.00.44423

    edit3: Reading (when optimization level is off or 0) with Android application give me the error : Service not found. 

  • Hello,

    I would suggest taking a look at the Porting Guide on the TI BLE Wiki. Also, all sample projects have been ported to V2.1, so use those as a guide as well.

    For the encKeySize, use GATT_MIN_ENCRYPT_KEY_SIZE.

    Did you install a fresh V2.1 tree, then port your V2.0 modifications to the new V2.1 tree?

    Best wishes