Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CC2530: sending data from router to coordinator

$
0
0

Part Number:CC2530

hi

i have coordinator that it is znp

and router that it is 8051 

till now i have device indication in coordinator so router is joined with coordinator and ready to send data

im using these codes to send data to coordinator and none of them work

static endPointDesc_t DoorSensorEndPoint =
{
  1,
  1,
  &zclSampleLight_TaskID,
  (SimpleDescriptionFormat_t *)NULL,  // No Simple description for this test endpoint
  (afNetworkLatencyReq_t)0            // No Network Latency req
};

            navidm =   (afAddrMode_t)Addr16Bit ;
            navid.addr.shortAddr = 0 ;
            navid.addrMode = navidm ;
            navid.endPoint = 1 ;
            navid.panId = 0 ;
            
            stat = AF_DataRequest(&navid,&DoorSensorEndPoint,0,1,"n",0,0,7);
            
            #ifdef mDebugAfterComis
            printf("Result of AF Data req is =  %x \r\n" , stat);
            #endif
                        
            navidm =   (afAddrMode_t)Addr16Bit ;
            navid.addr.shortAddr = 0xFFFF ;
            navid.addrMode = navidm ;
            navid.endPoint = 1 ;
            navid.panId = 0 ;
            
            stat = AF_DataRequest(&navid,&DoorSensorEndPoint,0,1,"n",0,0,7);
            
            #ifdef mDebugAfterComis
            printf("Result of AF Data req is =  %x \r\n" , stat);
            #endif
                        
            navidm =   (afAddrMode_t)Addr16Bit ;
            navid.addr.shortAddr = 0 ;
            navid.addrMode = navidm ;
            navid.endPoint = 1 ;
            navid.panId = 0xFFFF ;
            
            stat = AF_DataRequest(&navid,&DoorSensorEndPoint,0,1,"n",0,0,7);
            
            #ifdef mDebugAfterComis
            printf("Result of AF Data req is =  %x \r\n" , stat);
            #endif
            
            navidm =   (afAddrMode_t)Addr16Bit ;
            navid.addr.shortAddr = 0xFFFF ;
            navid.addrMode = navidm ;
            navid.endPoint = 1 ;
            navid.panId = 0xFFFF ;
            
            stat = AF_DataRequest(&navid,&DoorSensorEndPoint,0,1,"n",0,0,7);
            
            #ifdef mDebugAfterComis
            printf("Result of AF Data req is =  %x \r\n" , stat);
            #endif

this code below is for afregister znp coordinator

0xFE,0x09,0x24,0x00,0x01,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x00

this code below is for afregister router

afRegister(&DoorSensorEndPoint);

why data is not sended?


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>