Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK
Hello everyone.
Now I am using zstack3,0,1.
Then I have one issue.
My smart system consist of several ZC and several ZED only.
I can register a several end devic's address at the cooperator through UART.
So I want to be able to connect only the already registered end devices in the coordinator.
So I have the following code
#define NV_APP_EASEN_LOOKUP 0x0402
...
uint8 ZMacAssociateRsp( ZMacAssociateRsp_t *pData )
{
uint8 iEndDev;
uint8* passAddr;
/* TBD: set security to zero for now. Require Ztool change */
pData->Sec.SecurityLevel = false;
for(iEndDev = 0; iEndDev < MAX_END_DEV_NUM; iEndDev ++)
{
osal_nv_item_init(NV_APP_EASEN_LOOKUP + iEndDev, Z_EXTADDR_LEN, NULL);
osal_nv_read(NV_APP_EASEN_LOOKUP + iEndDev, 0, Z_EXTADDR_LEN,
passAddr);
if ( AddrMgrExtAddrEqual( passAddr, pData-> DeviceAddress) == TRUE )
{
return ( MAC_MlmeAssociateRsp( (macMlmeAssociateRsp_t *) pData ) );
}
}
return ZNwkUnknownDevice;
}
I have not registered any terminal, but I am registered at any terminal.
So I set a breakpoint on above function, but it does not come in here.
Please explain why this is the case.
Or am I wrong with the code implementation?
Please help me.
Thanks in advance.
Piao