2 posts / 0 new
Last post
roc0106
Offline
Last seen:6 months 4 weeks ago
Joined:2016-08-31 01:55
怎么添加 streamdatad 服务

我添加一个streamdatad 服务,不知道在哪些地方还要设置和修改,怎么样把它添加进去
static const struct attm_desc streamdatad_2_att_db[STREAMDATAD_IDX_NB] =
{
[STREAMDATAD_IDX_PRIM_SVC] = /* StreamData Device service */
{ATT_DECL_SECONDARY_SERVICE, PERM(RD, ENABLE),
sizeof(streamdatad_svc_2), sizeof(streamdatad_svc_2),
(uint8_t*) &streamdatad_svc_2},

[STREAMDATAD_IDX_STREAMDATAD_D0_CHAR] = {ATT_DECL_CHARACTERISTIC, PERM(RD, ENABLE), sizeof(streamdatad_d0_char), sizeof(streamdatad_d0_char), (uint8_t*) &streamdatad_d0_char},
[STREAMDATAD_IDX_STREAMDATAD_D0_VAL] ={年代TREAMDATAD_D0_UUID, PERM(RD, ENABLE) | PERM(WR, ENABLE) | PERM(NTF, ENABLE), 20, 0, (uint8_t*) NULL},
[STREAMDATAD_IDX_STREAMDATAD_D0_EN] = {ATT_DESC_CLIENT_CHAR_CFG,(PERM(RD, ENABLE) | PERM(WR, ENABLE) | PERM(NTF, ENABLE)), sizeof(uint16_t), 0, (uint8_t*) NULL},
[STREAMDATAD_IDX_STREAMDATAD_D0_DESC] = {ATT_DESC_CHAR_USER_DESCRIPTION, PERM(RD, ENABLE), STREAMDATAD_D_DESC_LEN, STREAMDATAD_D_DESC_LEN, (uint8_t*) streamdatad_d_desc},
};

Device:
Gongyu_Dialog
Offline
Last seen:1 week 1 day ago
Joined:2016-04-27 07:07
你可以参考附件里的文档AN-B-029和代码

你可以参考附件里的文档AN-B-029和代码,学习如何添加一个服务服务。

Attachment: