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.

SampleLight里怎么设置接收组播消息呢?

Other Parts Discussed in Thread: CC2530

大家好,我在cc2530里编译烧写了3.0.1协议栈的SampleLight的程序,单播的时候接收消息没问题。现在想让他接收组播消息,请问在源码里头该怎么设置呢?

我定义了一个组aps_Group_t SampleLight_Group; 

然后在zclSampleLight_Init()初始化函数里加上了如下的代码:

//register the group

SampleLight_Group.ID = SAMPLE_LIGHT_GROUP_ID;    //group id is defined in zcl_samplelight.h
osal_memcpy( SampleLight_Group.name, "Group 1", 7 ); 
aps_AddGroup( SAMPLELIGHT_ENDPOINT, &SampleLight_Group );

结果父设备向这个group_id发消息,他没有反应。请问该怎么设置呢?

还有个问题就是,我看SampleLight代码,发现ZCL消息进来似乎并不是在zclSampleLight_event_loop()里处理的,而是直接触发了zclSampleLight_CmdCallbacks。

那我设备处理ZCL消息的时候只能在这些callback函数里处理的吗?