TI中文支持网
TI专业的中文技术问题搜集分享网站

获取CC2540/CC2541自身的设备地址/串号

请问下,如何获取CC2540/CC2541自身的设备地址/串号呢,即图中的0xD03972A5F5B9 和 0xD03972A5F39C

Chunsheng Wang:

回复 Susan Yang:

嗯,我用你的方法试过了,确实可以,那么请问我怎样把蓝牙设备的名称改成设备的MAC地址呢。我看每次初始化的时候就用GGS_SetParameter来设置蓝牙名称了,我在peripheralStateNotificationCB  中增加  GAPRole_GetParameter(GAPROLE_BD_ADDR, systemId);然后再用GGS_SetParameter来设置蓝牙名称,可是改不过来

Viki Shi:

回复 Chunsheng Wang:

The device name is a characteristic which resides in the GGS (GapGattServer) profile, and source for this profile is not public. In order to change the device name OTA with standard GATT write commands, it is necessary to first change the permission to writable with GGS_SetParameter( GGS_W_PERMIT_DEVICE_NAME_ATT, sizeof ( uint8 ), &devNamePermission ); 

Additionally, you can register a callback function with GGS to notify the application when the device name has been changed.

Viki Shi:

回复 Chunsheng Wang:

参考代码
 // Set the GAP Characteristicsuint8 devNamePermission = GATT_PERMIT_READ|GATT_PERMIT_WRITE;GGS_SetParameter( GGS_W_PERMIT_DEVICE_NAME_ATT, sizeof ( uint8 ), &devNamePermission );

赞(0)
未经允许不得转载:TI中文支持网 » 获取CC2540/CC2541自身的设备地址/串号
分享到: 更多 (0)