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.

CC2530 ZNP AF_REGISTER & ZB_APP_REGISTER_REQUEST

Other Parts Discussed in Thread: CC2530, Z-STACK

Hi,

I am trying to write a hybrid code for ZNP where it can be used with ZAP as well as standalone it can send/recieve few data without any ZAP for basic applications.

The problem I am facing is that if I use "AF_REGISTER" default in the ZNP code then I can use AF_DATA_REQUEST without any problem but ZB_SEND_DATA_REQUEST command is not working. If I use ZB_APP_REGISTER_REQUEST and then call ZB_SEND_DATA_REQUEST it works fine. 

The reason I am using ZB_SEND_DATA_REQUEST is that I am able to use binding by specifying DestAddr : 0xFFFE which is not possible in AF_DATA_REQUEST.

I looked at Zstack SIMPLE API document it has zb_SendDataRequest but nothing as zb_RegisterRequest or something similar which I can call ?

Please let me know how to solve this issue ?

Regards

Bishan Preet Singh                                               

  • 0xFFFE in ZB_SEND_DATA_REQUEST means using binding address. You can use AddrNotPresent in AF_DATA_REQUEST.

  • Hi,

    Thanks for your answer, but I can use AddrNotPresent use only in ZNP code.

    But If I use ZAP processor and send command AF_DATA_REQUEST how can I use binding ?

    Please check the image attached below for AF_DATA_REQUEST in CC2530 ZNP interface Pg49. The DstAddr is 2 bytes. how can I insert value "AddrNotPresent" here.

    The similar question was asked in other post and you answered but I am not satisfied by the answer
    http://e2e.ti.com/support/wireless_connectivity/f/158/t/288104.aspx

    The reason there is only 1 field : DstAddr (2 bytes) where I can specify the short address. If I write 0x00 then the data is transfered back to the coordinator. There is no other way to specify in the command "address mode should be ADDRESS_16_BIT". Please check the CC2530 ZNP interface and then let me know.

    Regards

    Bishan Preet Singh

  • You can refer to discussion at http://e2e.ti.com/support/wireless_connectivity/f/158/t/87986.aspx

  • Yes I have already refer to the conversation earlier. Below is the message of the community member.

    So I am again stuck there. I have thoroughly searched the forum but can't find the answer. Can you please read my first question again and answer it ?

    -----------------------------------------------------------------------------------------------------------------

    Hello Orjan, Tuong Ngoc

    Thanks for pointing this out, you are correct using AF_DATA_REQUEST for ZNP we can only use the short address of the destination device, (see the ZNP Interface Specfication document for understanding the byte sequence of the AF_DATA_REQUEST. )

    Tuong Ngoc,

    If you are using binding, you need to use ZB_SEND_DATA_REQUEST command for ZNP, see ZNP Interface Specification document for understanding the byte sequence of this command. You can find this document in your Z-Stack Install at C:\Texas Instruments\ZStack-CC2530-2.5.0\Documents\CC2530

    Regards,

    Suyash Jain

  • Hi Suyash,

    You can refer to Z-Stack Monitor and Test API.pdf for ZNP command format.

    1. For ZB_SEND_DATA_REQUEST, you can check 3.7.1.6  ZB_SEND_DATA_REQUEST and it says ZB_BINDING_ADDR(0xFFFE) sends the data to a previously bound device.

    2. You can refer to 3.2.1.3  AF_DATA_REQUEST_EXT and use it to send message to a binding destination.