Other Parts Discussed in Thread: SYSCONFIG
Hi TI members,
We found a weird situation that the broadcasting name of our CC2340R5 and the name shown after it is paired with another device would be different.
By now, I knew scanResData1 decided the broadcasting name, and we managed to modify it in Peripheral_start() which was called in App_StackInitDoneHandler of app_main.c.
But we also found that the name after pairing would use attDeviceName instead of scanResData1.
So, we tried to modify attDeviceName as we did to scanResData1 by following codes:
uint8_t *setAdvName()
{
uint8_t *devAddr = NULL;
uint8_t systemId[DEVINFO_SYSTEM_ID_LEN] = {0};
char hex[] = "0123456789ABCDEF";
devAddr = GAP_GetDevAddress( TRUE );
memcpy( &systemId[0], &devAddr[0], 3 ); // use 6 bytes of device address for 8 bytes of system ID value
memset( &systemId[3], 0xFFFE, 2 ); // set middle bytes to 0xFFFE
memcpy( &systemId[5], &devAddr[3], 3 ); // shift three bytes up
scanResData1[6] = hex[systemId[2] >> 4];
scanResData1[7] = hex[systemId[2] & 0x0F];
scanResData1[8] = hex[systemId[1] >> 4];
scanResData1[9] = hex[systemId[1] & 0x0F];
scanResData1[10] = hex[systemId[0] >> 4];
scanResData1[11] = hex[systemId[0] & 0x0F];
return scanResData1;
}
We thought these parameters were first called in BLEAppUtil_init(&criticalErrorHandler, &App_StackInitDoneHandler,
&appMainParams, &appMainPeriCentParams);
But we found that while appMainParams was defined earlier, even if we tried to point attDeviceName to scanResData1, it still used the default name defined in syscfg.
How would TI recommend to make the broadcasting name and pairing name aligned?
Thanks.
BR,