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.

Unicast communication of GenericApp?

Other Parts Discussed in Thread: CC2530, Z-STACK

Hi,

I want to send data from an ED to a Coord using GenericApp sample code (z-stack) on cc2530 with out binding two devices by unicasting from ED to coord. Does any one know what major modifications are required?

any help appreciated.

Leila

  • Leila,

    If you want to send data to the coordinator with its short address without binding, just set the destination shortAddr to 0x0000 and the addrMode to Addr16Bit in dstAddr paremeter when you call AF_DataRequest().

    - Cetri

  • Hi Cetri,

    I already did, however for some reason coordinator does not receive the packets or at least does not print received "Hello world" on LCD. I think I need to define two different projects for Coord and ED to avoid same project running for both of them. Btw, as I got answer for my previous post, I think starting with sensor network demo and making changes to that would be easier than modifying General App, if my goal is to run a sensor network. what do you think?

    Thanks,

    Leila

  • Hi Leila,

     

    Concerning your first issue (coordinator does not receives the packets),

    here are some thoughts:

    1. In case you have a packet sniffer, you can look if the packets are sent
      from the End Device to the air.
    2. You can put a break point in the coordinator receive message function
      to see if the coordinator receives the message and something goes
      wrong in the receive function (like wrong clusterID, or you get a wrong string?).
    3. What about the clusterID and Applicatation End point numbers?
      the clusterID and End point filled in AF_dataRequest() on the ZED side
      are the same as in coordinator's side?

    Br,

    Igor

  • Hi Igor,

    Answers to your comments:

    1. I did check packets with packet sniffer. ED does send packets to the correct destination address (0x0000). I see coordinator is sending some packets as well(source address:0x0000  and destination: 0xFFFF -because for now I am using the same project file for both of them). 

    2. I will check the break point solution and will let you know.

    3. Yes. I am using the same clusterID and EP for both.

     

    Thanks,

    Leila

  • Hi Leila,

     

    Leila Keyvani said:
    1. I did check packets with packet sniffer. ED does send packets to the correct destination address (0x0000). I see coordinator is sending some packets as well(source address:0x0000  and destination: 0xFFFF

    I'm assuming that you are using ZigBee Pro protocol (which is the default

    configuration for Z-Stack version 2.4.0 and 2.5.0 ). From time to time all

    the routers (including coordinator) in ZigBee-PRO sending packets denoted

    as "link status". These packets are sent as broadcast messages (destination

    address of 0xFFFF indicates that) and this is desired behavior.

     

    Br,

    Igor