I am using the WirelessUART template exported from Freescale BeeKit Codebase,and I changed uicast to broadcast.for all three device types .But my coordinator got every data twice since the router was added into the network.what shall I do to solve this problem?
Now I want to build a tree networks to transfer wireless data.Which parameter is for the networks type?
Using broadcast may imply re-transmission of the packets by router devices as described in ZigBee specification. Table 3.44 NIB attributes in such document states that default value for nwkMaxBroadcastRetries is 3. Also, if you read chapter 3.6.5, the broadcast frame shall be retransmitted such number of times because no passive ACK is used.
You can modify this setting in the BeeStackConfiguration.h file of your project by changing gNwkInfobaseMaxBroadcastRetries_c value. Try this and let me know if that worked for you.
Regarding the Topology, there is not any flag or register used to set the network’s topology. Kinetis Codebase uses ZigBee profile 0x02 (ZigBee PRO) by default, which uses mesh network. If you would like to join the devices as ZC-ZR-ZED you may change the permit join in ZC when joining the ZED to the network, so it joins the ZR instead. This could be done using TestTool command console and ZTC enabled.