Hi,
I'd like to have working system (AP and many EDs) that would also be resistant to "power reset" or "out of range and come back" events either on AP or on EDs.
Therefore I need some kind or reconnection procedure if connection fails for any reason... So EDs must do Join&Link cycle when they determine that connection is lost....
Since that procedure is done in two steps, I'm wondering if I could just do Link phase.
What exactly is different in this case (particularly if I use WSM demo or AP as data hub examples) ?
Currently I setup Join Token on AP and EDs and then use it in working system. But since Joining is just a way to get "static" Link Token from AP, I guess I could skip that step.
I could set Link Token on each ED instead of Join Token and EDs will be able to Link. They will broadcast "I want to LINK" message and AP will enter LinkListen procedure.
Is there any meaningful difference if I do this way ? I know that ED gets entry in connection table when joined and then its status changes to "linked" on successfull link.
Is it in any way different if ED just Links with AP? I guess that it gets same entry after sucessful link phase or am I mistaken ?
Thanks in advance,
regards,
Bulek.
You cannot replace the Join Process by Link. You need both calls.
The join function gets as you said a link token by the AP. The link call does something else. It establishes a symbolic connection with a device that must have the same link token. Therefore the ED basically joins the network of an AP by smpl_join and establishes a connection with another device by smpl_link/smpl_linklisten.
mark sonn You cannot replace the Join Process by Link. You need both calls. The join function gets as you said a link token by the AP. The link call does something else. It establishes a symbolic connection with a device that must have the same link token. Therefore the ED basically joins the network of an AP by smpl_join and establishes a connection with another device by smpl_link/smpl_linklisten.
thanks for response. I'm trying to replace Join, I'm thinking what happens if I leave it out. If Join process is only for getting Link Token and nothing more, then it's quite similar if I restrict access to network by Join Token and then transmit certain Link token that is usually always the same for all devices or do just Link phase with proper LINK Token that is predetermined in my case....
Now the real question is : if I connect with Link procedure and Link Token only (leave out Join phase) - will I be able to connect to AP? And if yes, is this connection in any detail different (connection info, pollution with nodes that joined, but didn't link) than the one created with proper "Join/Link" procedure ?
Are you modifying the SimpliciTI stack and therefore protocol? The reason I ask is that the Join procedure is performed inside of the SMPL_Init() function, which is called by your application to set things up, initialize the stack, etc. How are you skipping this step?
In your scenario (ie. AP and several ED), the Join token is a way for network authentication as well besides just passing a Link token back to the ED. Consider an environment whereby there are neighboring APs, each with their own network (it is important to note "each with their own network" as I'm not implying SimpliciTI supports multiple APs). You would probably want a unique Join token for each network to be used as it's "key" to be authorized by the AP to join its network.
Brandon
Bulek Now the real question is : if I connect with Link procedure and Link Token only (leave out Join phase) - will I be able to connect to AP? And if yes, is this connection in any detail different (connection info, pollution with nodes that joined, but didn't link) than the one created with proper "Join/Link" procedure ?
If you want to remove the join call in the smpl_init function then you have to hardcode the same link token for every device in the smpl_nwk_config.dat file. You also need to get ahold of the AP address by for example letting the AP listen to linkrequests all the time or hardcoded in the ED code aswell. This is only the ED side, im not sure currently how it affects the AP side.
Is it really necessary that you have to skip the join process?
mark sonn If you want to remove the join call in the smpl_init function then you have to hardcode the same link token for every device in the smpl_nwk_config.dat file. You also need to get ahold of the AP address by for example letting the AP listen to linkrequests all the time or hardcoded in the ED code aswell. This is only the ED side, im not sure currently how it affects the AP side. Is it really necessary that you have to skip the join process?
thanks for all responses.
@Mark: It is not necessary, only a thought at the moment.
@Brandon: thanks for response. I think you're right. I'll loose ability to join only right network...
What I see in practice is that nodes are doing quite some number of Join attempts and then quite a number of Link attempts before they Link with AP properly. Not sure why this happens... And since once you know Join Token, you can join network, this could be the same for Link token. This problem becomes more apparent when you have sleeping ED with low power and it has to reconnect to network, cause it lost connection for whatever reason (AP restart, out of range). In this case ED tries many times on both phases and looses quite some power doing that...
But I get both arguments: first ability to join only certain network and that Join process is inside SMPL_Init process and this could cause troubles. This one stands and probably there are more problems, maybe not of protocol itself, but also implementation wise.... And I probably don't want to get so deep into that...But the discussion is welcome, to get better understanding.
Regards,