Hi ahmad,
I suddendly know the reason of our problem when i try to check the IEEE address of each sensor node. I encountered the same problem as yours in this morning, and i was confused too. But just now i suspect that the reason may be their IEEE addresses are identical, so i use SmartRF Flash Programmer to check each node's IEEE address, and i found that i am right. Two nodes' IEEE address were both 27 26 25 24 23 22 00 00, so when they join the network they will get the same short address. And this IEEE address is assigned by function zmain_ext_addr(), which use the following sentence to get a random number and assign this random number to the lower two bytes of the IEEE address.
AtoD = HalAdcRead (HAL_ADC_CHANNEL_7, HAL_ADC_RESOLUTION_10);
Unfortunately, the randomness of upper function is limited. So sometimes two or more nodes will get the same IEEE address. if you give each node a different IEEE address by SmartRF Flash Programmer or some other tools, then the problem will not appear again.
文章评论(0条评论)
登录后参与讨论