请教TI工程师,
我用的是TI提供的协议栈例程里面 –广播的工程:SimpleBLEBroadcaster-CC2541
现在我想改设备名称:对SimpleBLEBroadcaster.c文件做了如下代码的增加:
//设备新名称
static uint8 attDeviceName[GAP_DEVICE_NAME_LEN] = "HT15TTTTT";
在void SimpleBLEBroadcaster_Init( uint8 task_id )函数增加如下代码:
// 设置GAP特性 Set the GAP Characteristics 改名字
uint8 devNamePermission = GATT_PERMIT_READ | GATT_PERMIT_WRITE;
GGS_SetParameter(GGS_W_PERMIT_DEVICE_NAME_ATT, sizeof(uint8), &devNamePermission);
GGS_SetParameter( GGS_DEVICE_NAME_ATT, GAP_DEVICE_NAME_LEN+1, attDeviceName );
//上面是新增加的//////////////////////////////////////////////////////////////////////////////////
编译发现如下错误:
Error[e46]: Undefined external "gapServiceUUID" referred in gapgattserver ( E:\work\MSPBLEindependent\ble\Projects\ble\Libraries\CC2541DB\bin\CC2541_BLE_bcast.lib )Error[e46]: Undefined external "primaryServiceUUID" referred in gapgattserver ( E:\work\MSPBLEindependent\ble\Projects\ble\Libraries\CC2541DB\bin\CC2541_BLE_bcast.lib )Error[e46]: Undefined external "characterUUID" referred in gapgattserver ( E:\work\MSPBLEindependent\ble\Projects\ble\Libraries\CC2541DB\bin\CC2541_BLE_bcast.lib )Error[e46]: Undefined external "deviceNameUUID" referred in gapgattserver ( E:\work\MSPBLEindependent\ble\Projects\ble\Libraries\CC2541DB\bin\CC2541_BLE_bcast.lib )Error[e46]: Undefined external "appearanceUUID" referred in gapgattserver ( E:\work\MSPBLEindependent\ble\Projects\ble\Libraries\CC2541DB\bin\CC2541_BLE_bcast.lib )Error while running Linker
请教是什么原因导致的?
谢谢
附件是代码源文件
Yue TANG:
C语言不过关啊。增加一个gatt_uuid.c到工程里就搞定了。该文件在\Texas Instruments\BLE-CC254x-1.3.2\Components\ble\host下面。