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.

报告一个 z-stack的一个bug



在zcl_ss.c 中

static uint8 zclSS_GetNextFreeZoneID( void )

这个函数存在bug。

// Look for next available zone ID
do
{
if ( ++zoneID == ZCL_SS_MAX_ZONE_ID )
zoneID = 0; // roll over

} while ( (zoneID != nextAvailZoneID) && (zclSS_ZoneIDAvailable( nextAvailZoneID) == FALSE) );

应该修改成:

// Look for next available zone ID
do
{
if ( ++zoneID == ZCL_SS_MAX_ZONE_ID )
zoneID = 0; // roll over

} while ( (zoneID != nextAvailZoneID) && (zclSS_ZoneIDAvailable( zoneID) == FALSE) );

否则获取可用防区ID的时候得到的一直是0.