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: how to change sample projects in zstack as I need.

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK, , Z-STACK-ARCHIVE

hello.

I am beginner in zigbee. I want to write some at-command for a zigbee module in cc2530 to communicate with it. I want to do this work by IAR for 8051 and change an sample project in z-stack. can anybody help me about it?

how can I change zigbee stack protocol for my work? for example if I want to blink a LED where should I change? I read developer guide in TI site completely but i do not understand how can I change the sample projects as I need. my zigbee stack protocol is 3.

can anybody give me a link or pdf to explain all section in sample apps and how to change them? thanks for your help.

  • 1. I don't have a develop kit and I think this is the reason my code doesn't work. for develop a zigbee program I have to have a develop kit?
    2. for this program that I say which example is better to study it?
  • 1. I don't think the code doesn't work because you don't have the same kit. If you configure everything correctly, it should work as what I see on CC2530DK. However, it's recommended to use TI develop kit so you can run the examples directly on it.
    2. I would say to study SampleLight and SampleSwtich as start point.
  • if i want to understand the code, I read the files in source folder is enough?
  • I don’t think that’s enough. The codes in source folder only contains application part.
  • hello!

    1. where can I find PANID and short address of module?

    2. for sending data to a special module how should I set the parameters of AF_DataRequest?

    3. how many events can I define in Z-stack3?

    4. for receive message with zcl_ProcessMessageMSG which parameter I should use?

    5. how can I check received message? I mean if I want check the message content, how can I do it?

    6. how can I understand which module send me a packet? which is it's address and it's PANID?

  • 1. You can find them in _NIB data structure.
    2. You have to set dstAddr and srcEP correctly. For dstAddr, if you use afAddr16Bit as addrMode, you have to fill destination short address to dstAddr.addr.shortAddr and destination endpoint fo dstAddr.endPoint. If you use Addr64Bit as addrMode, you have to fill destination IEEE address to dstAddr.addr.shortAddr and destination endpoint fo dstAddr.endPoint. If you use AddrNotPresent as addrMode, you have to do binding first and don't have to set dstAddr. Z-Stack will use destination address in binding table to send data.
    3. You can have 15 events exclude event ID 0x8000 for each taskID.
    4. You can refer to ZCL spec.
    5. You can check it inside afBuildMSGIncoming().
    6. In afBuildMSGIncoming, there is srcAddr data structure in afIncomingMSGPacket_t and you can get the address sent the packet. The PANID must be the same to receiver PANID so you will know it in _NIB.