How to send Data from SED to Coordinator on JN5168 Module

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to send Data from SED to Coordinator on JN5168 Module

2,699 Views
dheerajsawant
Contributor V

Hello Friends, 

i want to try to send data from Sleeping Device to Coordinator using MAC Address by below API:

ZPS_eAplAfUnicastIeeeDataReq

how do i send it?

please need your help!

Best Regards, 

Dheeraj Sawant

3 Replies

1,836 Views
jun951753jun951
Contributor III

 pastedImage_1.png

  • Can you configure it this way?

  • Or in the initialization function?

  • pastedImage_4.png
  • How do I use this function?
0 Kudos

1,836 Views
dheerajsawant
Contributor V

Hello mario_castaneda‌, 

I achieved success by sending data from Sleeping Device to Coordinator, 

but i want to send same data using MAC Address?

How it will be possible?

Best Regards, 

Dheeraj    

0 Kudos

1,836 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Dheeraj,

Please see a simple guide.

PUBLIC void vSend_Data(void)
{
    uint16 u16Offset;
    //Note Frame Control ZCL Header example
    //Frame Type: 0x01 Command is specific to a cluster             
    //Manufacture Specific                    
    //Direction: From Client to server or server to client     
    //Disable or Enable Default response               
    //Reserved                                    
    static uint32 u32Seqnum;
    uint8 *pu8TransactionSequenceNumber;
    uint16 u16Current_cluster;

    PDUM_thAPduInstance = PDUM_hAPduAllocateAPduInstance(PDUM_thAPdu hAPdu);
    
    //This function sets the size, in bytes, of the payload of the specified APDU instance
    PDUM_eAPduInstanceSetPayloadSize(PDUM_thAPduInstance hAPduInst, uint16 u16Size );
     
    u16Offset += PDUM_u16APduInstanceWriteNBO(
                             hAPduInst,
                             u16Offset,
                             "wbhb",
                             u32Seqnum,
                             *pu8TransactionSequenceNumber,
                             u16Current_cluster,
                             value);

   ZPS_teStatus ZPS_eAplAfUnicastAckDataReq(
                                        PDUM_thAPduInstance hAPduInst,
                                        uint16 u16ClusterId,
                                        uint8 u8SrcEndpoint,
                                        uint8 u8DstEndpoint,
                                        uint16 u16DestAddr,
                                        ZPS_teAplAfSecurityMode eSecurityMode,
                                        uint8 u8Radius,
                                        uint8 *pu8SeqNum);
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

For a better Reference.

ZigBee PRO Stack User Guide

JenOS User Guide

Mario