I added this case in the zigbeeRes code... im using icd2 to debug when the condition: in (zAPS.c)
if( APSFromLongToShort( ¶ms.APSME_BIND_request.DstAddr.LongAddr ) == FALSE ) //<- true
{
params.APSME_BIND_confirm.Status = BIND_ILLEGAL_DEVICE;
return APSME_BIND_confirm;
}
I real dont know whats wrong, the function "APSFromLongToShort" should put the short address in currentAPSAddress.shortAddr and im sure the that the entry of the device (router) is in the neighboring table (i can see it when i dump the neighborTable)
If anyone have an idea plz tell me..
MY CODE: case '9':
GetMACAddress(¶ms.APSME_BIND_request.SrcAddr);
params.APSME_BIND_request.DstAddrMode = APS_ADDRESS_64_BIT;
params.APSME_BIND_request.DstAddr.LongAddr.v[7] = 0x00;
params.APSME_BIND_request.DstAddr.LongAddr.v[6] = 0x00;
params.APSME_BIND_request.DstAddr.LongAddr.v[5] = 0x00;
params.APSME_BIND_request.DstAddr.LongAddr.v[4] = 0x01;
params.APSME_BIND_request.DstAddr.LongAddr.v[3] = 0x00;
params.APSME_BIND_request.DstAddr.LongAddr.v[2] = 0x00;
params.APSME_BIND_request.DstAddr.LongAddr.v[1] = 0x00;
params.APSME_BIND_request.DstAddr.LongAddr.v[0] = 0x00;
params.APSME_BIND_request.ClusterId.Val = TRANSMIT_COUNTED_PACKETS_CLUSTER;
params.APSME_BIND_request.SrcEndpoint = 1;
params.APSME_BIND_request.DstEndpoint = 240;
currentPrimitive = APSME_BIND_request;
break;
Thank you regards.