The sample should be 127 which large enough to get proberly value of RSSI. The timer to check sensor whether joined a network should long enough compare with DIS timer