| Author |
Message |
|
|
Posted: Apr 21, 2011 - 04:00 PM |
|

Joined: Apr 19, 2011
Posts: 111
|
|
Are there any guidelines or rules of thumb that people use when setting the sizes of the various stack parameters based on # of ZR/ZED expected in network?
e.g Neighbor Table, Route Table, Route Discovery, BTT |
|
|
| |
|
|
|
|
|
Posted: Apr 24, 2011 - 04:03 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
|
cplecas wrote:
Are there any guidelines or rules of thumb that people use when setting the sizes of the various stack parameters based on # of ZR/ZED expected in network?
There are no written rules. Usually you start with settings from the most suitable sample application and see where they fail in your application and correct them.
Or you may describe your scenario and I'll suggest at least some of them. |
|
|
| |
|
|
|
|
|
Posted: Apr 25, 2011 - 03:04 PM |
|

Joined: Apr 19, 2011
Posts: 111
|
|
I think I remember something in the forum here that stated CS_NEIB_TABLE_SIZE > CS_MAX_CHILDREN_AMOUNT. Am I remembering that one correctly?
If a device can hear more units than it has slots available in its Neighbor Table is it first-come first-serve or does BitCloud use some sort of priority based on link quality to determine if a device should overwrite an existing neighbor? |
|
|
| |
|
|
|
|
|
Posted: Apr 25, 2011 - 03:18 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
|
cplecas wrote:
I think I remember something in the forum here that stated CS_NEIB_SIZE > CS_MAX_CHILDREN. Am I remembering that one correctly?
It is better to have CS_NEIB_TABLE_SIZE > CS_MAX_CHILDREN_AMOUNT, but acceptable to have CS_NEIB_TABLE_SIZE > (CS_MAX_CHILDREN_AMOUNT - CS_MAX_CHILDREN_ROUTER_AMOUNT), to have a space for all EDs and for few routers.
cplecas wrote:
If a device can hear more units than it has slots available in its Neighbor Table is it first-come first-serve or does BitCloud use some sort of priority based on link quality to determine if a device should overwrite an existing neighbor?
All EDs will be there and only strongest router will replace existing record. |
|
|
| |
|
|
|
|
|
Posted: Apr 28, 2011 - 03:29 PM |
|

Joined: Apr 19, 2011
Posts: 111
|
|
|
alexru wrote:
cplecas wrote:
If a device can hear more units than it has slots available in its Neighbor Table is it first-come first-serve or does BitCloud use some sort of priority based on link quality to determine if a device should overwrite an existing neighbor?
All EDs will be there and only strongest router will replace existing record.
So if we have all routers will it be the n loudest routers in the table and if any other stronger router comes along it will replace the quietest one in the table? Or will only the single strongest router be in the table? |
|
|
| |
|
|
|
|
|
Posted: Apr 28, 2011 - 04:31 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
|
cplecas wrote:
So if we have all routers will it be the n loudest routers in the table and if any other stronger router comes along it will replace the quietest one in the table? Or will only the single strongest router be in the table?
Why have a table if only one device will be there? Table will contain top strongest routers. |
|
|
| |
|
|
|
|
|
Posted: May 06, 2011 - 03:04 PM |
|

Joined: Apr 19, 2011
Posts: 111
|
|
|
alexru wrote:
Why have a table if only one device will be there? Table will contain top strongest routers.
The table could contain one router only and multiple ZEDs.
If we have plenty of RAM are there any reasons to not set the Route and Neighbor table sizes to the max number of units expected? |
|
|
| |
|
|
|
|
|
Posted: May 06, 2011 - 03:09 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
|
cplecas wrote:
If we have plenty of RAM are there any reasons to not set the Route and Neighbor table sizes to the max number of units expected?
No, no reasons not to make life easier for the stack. |
|
|
| |
|
|
|
|
|
Posted: May 06, 2011 - 04:54 PM |
|

Joined: Apr 19, 2011
Posts: 111
|
|
|
alexru wrote:
No, no reasons not to make life easier for the stack.
What about the other tables, like Route Discovery, Duplicate Rejection, BTT, or Address Map? Should I make them equal to max # of devices also?
alexru wrote:
Usually you start with settings from the most suitable sample application and see where they fail in your application and correct them.
How would I know that the size of the tables listed above are sub-optimal? |
|
|
| |
|
|
|
|
|
Posted: May 06, 2011 - 05:03 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
|
cplecas wrote:
Route Discovery
If you'll have enough space to fit full Routing Table then this table may be 2-3 records, no need for more.
cplecas wrote:
Duplicate Rejection
Mostly depends on the traffic towards the node, but I see no reason to make it larger than 5-7 records.
cplecas wrote:
BTT
Again, 5-7 records will be more than enough.
cplecas wrote:
Address Map
Makes sense to set it to maximum amount of nodes in the network.
cplecas wrote:
How would I know that the size of the tables listed above are sub-optimal?
You'll notice performance degradation: data takes too long to deliver, data does not get delivered, etc. If you have sniffer then it is even easier, you are expected to see mostly data frames after initial network assembly. If you see route discovery requests and ZDP requests then something is wrong. |
|
|
| |
|
|
|
|
|
Posted: May 09, 2011 - 04:12 PM |
|

Joined: Apr 19, 2011
Posts: 111
|
|
|
alexru wrote:
cplecas wrote:
If we have plenty of RAM are there any reasons to not set the Route and Neighbor table sizes to the max number of units expected?
No, no reasons not to make life easier for the stack.
Does this sound right? A possible down side to making the neighbor table as large as the # of devices is that the LinkStatus cmd now gets quite large and uses up a larger percentage of the OTA bandwidth. If the # of links (neighbor table entries)becomes larger than what would fit in a single packet, multiple packets are sent. I'm not sure exactly how many links will fit in a single packet, but it is probably around 30. |
|
|
| |
|
|
|
|
|
Posted: May 09, 2011 - 04:21 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
|
cplecas wrote:
If the # of links (neighbor table entries)becomes larger than what would fit in a single packet, multiple packets are sent.
Since you are talking about setting sizes of all the tables to the number of devices, I suspect you'll have no more than 30 devices anyway. So do you really need to worry about Link Status traffic in this case?
LE: Plus BitCloud sends only one Link Status anyway. |
|
|
| |
|
|
|
|
|
Posted: May 09, 2011 - 04:39 PM |
|

Joined: Apr 19, 2011
Posts: 111
|
|
|
alexru wrote:
cplecas wrote:
If the # of links (neighbor table entries)becomes larger than what would fit in a single packet, multiple packets are sent.
Since you are talking about setting sizes of all the tables to the number of devices, I suspect you'll have no more than 30 devices anyway. So do you really need to worry about Link Status traffic in this case?
Actually, I think we are planning on 50-100 devices.
alexru wrote:
LE: Plus BitCloud sends only one Link Status anyway.
So BitCloud only sends the 1st n devices in the neighbor table. I assume those are not necessarily the n loudest, just the 1st n to be heard. |
|
|
| |
|
|
|
|
|
Posted: May 09, 2011 - 04:46 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
|
cplecas wrote:
Actually, I think we are planning on 50-100 devices.
Then there is no way you'll have enough memory to fit all those tables. What is the planned application scenario?
cplecas wrote:
I assume those are not necessarily the n loudest, just the 1st n to be heard.
They are sorted in ascending order by the short address. |
|
|
| |
|
|
|
|
|
Posted: May 09, 2011 - 05:07 PM |
|

Joined: Apr 19, 2011
Posts: 111
|
|
|
alexru wrote:
Then there is no way you'll have enough memory to fit all those tables.
I set route,neighbor, and address table size to 100 and it doesn't use up all the RAM (the processor has 16k) but I believe there is less than 1K left and that doesn't have our app code in there yet, so you are correct that we will not be able to max out all the tables. We probably could try maxing the address and route tables and having the neighbor tables be a couple more than MAX_CHILDREN which I currently have set to 6. Sound reasonable? |
|
|
| |
|
|
|
|
|
Posted: May 09, 2011 - 05:25 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
|
cplecas wrote:
(the processor has 16k)
Ok, I assumed you are working with the ZigBit module.
cplecas wrote:
We probably could try maxing the address and route tables and having the neighbor tables be a couple more than MAX_CHILDREN which I currently have set to 6. Sound reasonable?
That mostly depends on the communication scenario. But any setup will work as long as you have enough memory. |
|
|
| |
|
|
|
|
|
Posted: May 09, 2011 - 05:43 PM |
|

Joined: Apr 19, 2011
Posts: 111
|
|
|
alexru wrote:
cplecas wrote:
We probably could try maxing the address and route tables and having the neighbor tables be a couple more than MAX_CHILDREN which I currently have set to 6. Sound reasonable?
That mostly depends on the communication scenario.
We plan on having a network of ZRs storing sensor data locally. Occasionally a ZED will enter the area to collect the data from each device. An alternate use case is the ZED having a block of configuration data to send to each device. |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 02:01 PM |
|

Joined: May 25, 2011
Posts: 95
|
|
Hi!
I've established network: 1C and 2EDs. I use BitCloud ZigBit v12.
Now I'm looking at Coordinators neighbor table and I see both of EDs.
Now I turn OFF one ED, wait for a while, receive on COORD ZDO_CHILD_REMOVED_STATUS, and look again in neighbor table and removed ED is still there but it shouldn't be.
Do to solve this problem?
Thank you! |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 02:08 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
| How exactly do you look at this table? |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 02:12 PM |
|

Joined: May 25, 2011
Posts: 95
|
|
Alexru,
sorry I forgot to mention, I use
Code:
ZDO_Neib_t table[CS_NEIB_TABLE_SIZE];
ZDO_GetNeibTable(table);
|
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 02:14 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
| Use ZDO_GetNeibAmount() to determine how many records in this table are valid. You are providing the same memory for the table, so you just see the old values. |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 03:05 PM |
|

Joined: May 25, 2011
Posts: 95
|
|
I use ZDO_GetNeibAmount() and I get correct values.
Before I turn one ED OFF I get 2 EDs after turning one ED OFF I get 1 ED.
So everything works fine.
But I would like to determine which node(R or ED) has left the network.
Maybe this is not right way to do it(with ZDO_GetNeibTable(table)) ?
So, Alexru, how to determine which node(R or ED) has left the network ? |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 03:14 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
1. Extended address is returned along with ZDO_CHILD_REMOVED_STATUS, short address is invalid at this point, so it is not showed.
2. Router is a child only for the first 15 seconds, then it is just a neighbor and ZDO_CHILD_REMOVED_STATUS is not raised.
3. ZDO_GetNeibTable() returns table of all known neighbors, "relationship" field of the table shows if it is a child or just a router nearby. |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
|
| |
|
|
|
|
|
Posted: Sep 26, 2011 - 10:10 AM |
|

Joined: May 25, 2011
Posts: 95
|
|
Hi again Alexru !
Thnx for tips!
Now I determine address of a ED that is gone out of network with:
alexru wrote:
1. Extended address is returned along with ZDO_CHILD_REMOVED_STATUS, short address is invalid at this point, so it is not showed.
Is extended address actually CS_UID?
It goes like this(I receive ZDO_CHILD_REMOVED_STATUS, ):
Code:
void ZDO_MgmtNwkUpdateNotf(ZDO_MgmtNwkUpdateNotf_t *nwkParams)
{
ExtAddr_t address ;
address = nwkParams->deviceExtAddr;
...
But now I have problem when I want to print out this address on COORDs USART:
1.I set CD_UID on ED node with CS_writeParameter
address is 0xAABBCCDDEEFF0001
everything is OK, I print out this address on EDs USART it is correct.
2. problem is on COORD side:
AA BB CC DD EE FF 00 01 -> ext addr of ED
FE FF 01 00 FF EE DD CC -> ext addr of removed ED on COORDs USART
OK, it is reverced, but theese first 2 bytes FE EE are problem.
I don't know where thay came form?
I cleared TX buffer before printing out on USART (HAL_WriteUsart(..)) |
|
|
| |
|
|
|
|
|
Posted: Sep 26, 2011 - 10:40 AM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
| You need to look at nwkParams->childInfo.extAddr. |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
|
| |
|
|
|
|
|
Posted: Sep 26, 2011 - 11:19 AM |
|

Joined: May 25, 2011
Posts: 95
|
|
|
alexru wrote:
You need to look at nwkParams->childInfo.extAddr.
Of course everything works fine now!
Thnx Alexru !
But what are other parameters then in ZDO_MgmtNwkUpdateNotf_t like:
NodeAddr_t childAddr Addresses of removed device.
ExtAddr_t deviceExtAddr Extended address of updated device
which I was looking at?
ExtAddr_t is uint64_t type?
Thnx once again! |
|
|
| |
|
|
|
|
|
Posted: Sep 26, 2011 - 11:24 AM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
Other parameters are applicable for different notifications, they all are in the union, so traces of information from one may be seen in others.
Yes, ExtAddr_t is uint64_t. |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
|
| |
|
|
|
|
|
Posted: Sep 28, 2011 - 08:29 AM |
|

Joined: May 25, 2011
Posts: 95
|
|
Hi, Alexru!
In ZDO_Neib_t structure of COORD/ROUTER, LQI and RSSI parameters tell me how good and strong COORD/ROUTER hear their children(other ROUTERs/ENDDEVICEs) and vice versa.
These parameters are automatically updated form time-to-time, so there is no need for using ZDO_GetLqiRssi(), right?
Results form ZDO_Neib_t structure(LQI and RSSI) and ZDO_GetLqiRssi() should be the same, but with this time-to-time shift?
How long is this time-to-time approximately?
Thnx, Alex! |
|
|
| |
|
|
|
|
|
Posted: Sep 28, 2011 - 08:36 AM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
| ZDO_GetLqiRssi() returns values from that table. |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
|
| |
|
|
|
|
|
Posted: Oct 19, 2011 - 01:35 PM |
|

Joined: May 25, 2011
Posts: 95
|
|
Hi Alexru!
alexru wrote:
Use ZDO_GetNeibAmount() to determine how many records in this table are valid. You are providing the same memory for the table, so you just see the old values.
But how to know which records are valid and which are not?
alexru wrote:
2. Router is a child only for the first 15 seconds, then it is just a neighbor and ZDO_CHILD_REMOVED_STATUS is not raised.
How to determine that one ROUTER is out of network (R didn't leave network, but, I don't know some problem occurred on it)?
Maybe I should send some message to every node in network and see which node doesn't respond(I don't receive acknowledge) then I know that this node is out.
Isn't this stack responsibility to update neighbour tables from time to time?
Cheers, Alexru! |
|
|
| |
|
|
|
|
|
Posted: Jun 13, 2012 - 02:16 PM |
|

Joined: Aug 23, 2010
Posts: 31
|
|
Hello everybody,
does anybody know if it is possible to disable the link status frames a router sends periodically??
Best regards |
|
|
| |
|
|
|
|
|
Posted: Jun 13, 2012 - 04:39 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
| No, it is impossible. |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
|
| |
|
|
|
|
|
Posted: Jun 14, 2012 - 02:01 PM |
|

Joined: Aug 23, 2010
Posts: 31
|
|
Is there any way to force a router to remove another router from its neighbor table and its route table?
And is it possible to force a router not to store a router with a particular address in its neighbor table?
Thanks! |
|
|
| |
|
|
|
|
|
Posted: Jun 14, 2012 - 04:26 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
| No, it is impossible. Why do you want to break the standard? |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
|
| |
|
|
|
|
|
Posted: Jun 21, 2012 - 01:27 PM |
|

Joined: Aug 23, 2010
Posts: 31
|
|
Thanks Alexru
I thought doing that kind of things because in my system I am using several routers that sleeps during a period of time and I don“t want the other routers to send data over the air through them.
Do you know if there is anyway of getting this behavior? |
|
|
| |
|
|
|
|
|
Posted: Jun 21, 2012 - 04:34 PM |
|


Joined: Apr 15, 2009
Posts: 4981
Location: San Jose, CA
|
|
| No, it is impossible with ZigBee. |
_________________ The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
|
| |
|
|
|
|
|