In simpliciti there are several situations that are not fully worked out by stack. At least it looks to me like this.
1. There is no fail to link policy. If ED has bad signal, it may Join but not Link. It will remain in the ED table as CONNSTATE_JOINED. The slot will remain occupied forever. As per AP as datahub I implemented failed to link policy like a new function to SMPL that is switching any device with CONNSTATE_JOINED to CONNSTATE_FREE if LinkLIsten does not succeed. But I had to modify the stack. Is there any way to change the CONNSTATE with existing API?
2. Unlink. Unlink "only" causes the stack to change the device CONNSTATE_CONNECTED to be changed to CONNSTATE_FREE. Therefore again I implemented a new SMPL routine that is called every while to crawl thru the ED table and invalidates any LID (Link ID) that has CONNSTATE_FREE. As far as I can say, this is not possible with existing API. Please correct me if I am wrong.
3. SMPL_Init - it sets once and forever sInitDone to 1. This causes that any following SMPL_Init call does not set a radio registers. How do the designers of the SimpliciTI meant this to be "reinitialized"? I personally add the sInitDone=0 to SMPL_Unlink. But I would expect there to be a call to reinitialize the RF if needed. Maybe I am missing something?
4. There may happen a situation when ED is Linked to the AP, but ED is reset. The subsequent Join and Link from ED to AP seems to succeed, but it is not passed to user application like a CallBack. It looks like this is working OK and ED that was once joined may join again and will remain on the same port/LID, however I'd like to be sure, this is really working by intention and not by accident.
Thank you for any comments..