try:
    while True:
        t = time.time()
        if t - logfileCheck >1000:
            checkLogFile()
            logfileCheck=time.time()

        if t - paramCheck >100:
            readParams(False)
            paramCheck=time.time()

        beaconsNew={}
        toLog(3,"beacons info: "+unicode(beaconsExistingHistory))
        timeAtLoopStart = t
        setAliveFlag()
        reason=1

        for ii in range(loopMaxCallBLE):
            t=time.time()
            if reason >1: break
            if t - timeAtLoopStart  > sendAfterSeconds: break # send curl msgs after collecting for xx seconds

            ## get new data