Peripheral Privacy Flag -Generic Access Service

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
dhirajp15
Offline
Last seen:2 years 1 month ago
加入:2016-06-08 15:26
Peripheral Privacy Flag -Generic Access Service

Hi Dialog,
We have developed a application on Da14583 chip using ble_app_barebone example.The Generic Access (0x1800), Generic attribute (0x 0x1801) Services seem to be mandatory hence can be discovered on connection .Generic Access Serivce has all attributes as read only except Peripheral_privacy_flag which has write enabled. If I set Peripheral_privacy_flag =0x01 , the privacy is enabled and device advertised with private resolvable bd address and cannot be scanned by peers which are not bonded. Is it possible to make this flag read_only as we dont want connected device to mess with da14583 privacy config?
谢谢,
Regards,
Dhiraj

Device:
MT_dialog
Offline
Last seen:2 months 2 weeks ago
工作人员
加入:2015-06-08 11:34
Hi dhirajp15,

Hi dhirajp15,

Do you actually see this behaviour in the device that you are using or at any fw provided from the SDK ? The peripheral privacy flag isn't ment to have this kind of functionallity and i dont think that this kind of implementation (when the privacy flag is written the sw will switch its device address) exists in the SDK.

无论如何你可以删除writing propertly from the privacy flag characteristic by invoking the commands below:

struct att_char_desc privy_flag_ch = ATT_CHAR(ATT_CHAR_PROP_RD, //set up the new value for the attribute that will prevent the attribute of being written
GAPM_GET_ATT_HANDLE(GAP_IDX_PRIVY_FLAG),
ATT_CHAR_PRIVACY_FLAG);
ATTMDB_UPDATE_ATT_PERM(GAPM_GET_ATT_HANDLE(GAP_IDX_PRIVY_FLAG), WR, DISABLE); //update the property of the attribute
attmdb_att_set_value(GAPM_GET_ATT_HANDLE(GAP_IDX_CHAR_PRIVY_FLAG), sizeof(privy_flag_ch), (uint8_t*) &privy_flag_ch); //update the value of the characteristic to an only read property.

Thanks MT_dialog