functions to get NWK and MAC address in BeeStack

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

functions to get NWK and MAC address in BeeStack

Jump to solution
1,546 Views
zhaotian
Contributor I

Hi,

  I leared that the BeeStack is based on the profile 0x02,so that it is random addressing replacing tree addressing.I want to build a tree or mesh networks to extend the communication distance.But the routers did not work in multiple hop transmission.

so I want to know the functions to get the node's NWK and MAC address and the parent node's address,so that I can know the topology of the networks.

Thanks,

0 Kudos
1 Solution
1,213 Views
AngelC
Senior Contributor I

Hello Zhao,

Are you referring to stack-level commands or ZTC/Blackbox commands?

To get the NWK and MAC addresses you could check chapters 5.2.6 Get NWK Address from IEEE Address and 5.2.7 Get IEEE Address from NWK Address of Freescale BeeStack Software Reference Manual for ZigBee 2012 and 2007 included in Beekit’s documentation folder.

To read the local information in the device, you may always use the NlmeGetRequest() to get an attribute form the network information Base (NIB) such as nwkShortAddress, nwkIeeeAddress,  nwkParentShortAddress, nwkParentLongAddress.

Now, if you would like to find out the list of children for every parent node in the network you could use the Management LQI Request. The Mgmt_Lqi_req is generated from a Local Device wishing to obtain a neighbor list for the Remote Device along with associated LQI values to each neighbor. The destination addressing on this command shall be unicast only and the destination address must be that of a ZigBee Coordinator (always 0x0000) or ZigBee Router.

For further details about this request and the associated response please refer to the BeeStack software reference manual – chapter 7.8.2 Management LQI Request or the ZigBee specification document – chapter 2.4.4.3.2 Mgmt_Lqi_rsp.

Regards,

AngelC

View solution in original post

0 Kudos
3 Replies
1,214 Views
AngelC
Senior Contributor I

Hello Zhao,

Are you referring to stack-level commands or ZTC/Blackbox commands?

To get the NWK and MAC addresses you could check chapters 5.2.6 Get NWK Address from IEEE Address and 5.2.7 Get IEEE Address from NWK Address of Freescale BeeStack Software Reference Manual for ZigBee 2012 and 2007 included in Beekit’s documentation folder.

To read the local information in the device, you may always use the NlmeGetRequest() to get an attribute form the network information Base (NIB) such as nwkShortAddress, nwkIeeeAddress,  nwkParentShortAddress, nwkParentLongAddress.

Now, if you would like to find out the list of children for every parent node in the network you could use the Management LQI Request. The Mgmt_Lqi_req is generated from a Local Device wishing to obtain a neighbor list for the Remote Device along with associated LQI values to each neighbor. The destination addressing on this command shall be unicast only and the destination address must be that of a ZigBee Coordinator (always 0x0000) or ZigBee Router.

For further details about this request and the associated response please refer to the BeeStack software reference manual – chapter 7.8.2 Management LQI Request or the ZigBee specification document – chapter 2.4.4.3.2 Mgmt_Lqi_rsp.

Regards,

AngelC

0 Kudos
1,213 Views
zhaotian
Contributor I

AngelC,

Thanks for your help,and I get the address of the nodes successfully.My solution is based on the WirelessUART template exported from Freescale BeeKit  Codebase,and I changed uicast to broadcast.This applay works as temperature measurement.

It can work well in the star networks.But once I made two nodes routers and one node coordinator in the network to expand the distance.Data from the coordinator go normally,the data from routers is sometimes unreadable code .what is more, it is like that there is something wrong with the router programe,it did not communication well.It Look like

344.png

Untitled.png

I want to build a tree or mesh networks to expand the communication distance,but I can not find out the mistakes.I used to realise this function based on cc2430 and cc2530,and I did not have problems in networking.

Thanks,

Shelley

0 Kudos
1,213 Views
AngelC
Senior Contributor I

Hello Zhao,

I do not think this is an issue with the over-the-air package. I would rather check the settings in serial terminal are correct. The default baudrate is 38400. Please try with another console such as Hyperterminal, Putty or TeraTerm and check if it happens there too.

You may also try unplugging and plugging the board to the PC and restart the terminal. I just tested a couple of WirelessUART projects (ZC and ZR) and it worked without problems.

Regards,

AngelC

0 Kudos