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.

CC2640R2F: 128bit service uuid

Part Number: CC2640R2F


Hi:

我想请问下设置service uuid。

我发现较早的sdk如1.40 上可以配置128bit的service uuid。

我使用sdk4.30,例程是blestack\multi_role,请问如何在simple_gatt_profile中配置自定义的128bit的service uuid?

code:

#define TI_BASE_UUID_128( uuid ) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, \
0x00, 0x40, 0x51, 0x04, LO_UINT16( uuid ), HI_UINT16( uuid ), 0x00, 0xF0

CONST uint8 SerialPortServUUID[ATT_UUID_SIZE] =
{
TI_BASE_UUID_128(SERIALPORTSERVICE_SERV_UUID)
};

static CONST gattAttrType_t simpleProfileService = { ATT_UUID_SIZE, SerialPortServUUID };

static gattAttribute_t simpleProfileAttrTbl[SERVAPP_NUM_ATTR_SUPPORTED] =
{
// Simple Profile Service
{
{ ATT_BT_UUID_SIZE, primaryServiceUUID }, /* type */
GATT_PERMIT_READ, /* permissions */
0, /* handle */
(uint8 *)&simpleProfileService /* pValue */
},..

...

}

生成hex后,用手机去连接该从设备,一旦连接后,看不到uuid的任何信息。

请问下,sdk 4.30 主从一体机,如何设置自定义的128bit service uuid?

谢谢!!