Ejemplo n.º 1
0
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

#    Contact me at:
#    [email protected]
#    solenerotech.wordpress.com
##############################################################################

from netscan import netscan
from loggingQ import setupLogger
from time import time, sleep

logger = setupLogger('myQ', True, 'netscan_log.txt')

myNetscan = netscan(ip='192.168.0.70', timeout=0.5)  # wifi >WP
#myNetscan = netscan(ip='192.168.137.10', timeout=1)  # phoneAP > rpi
#myNetscan.scanAll('192.168.137.')

myNetscan.start()
initTime = time()


try:
    #do something...
    sleep(20)


finally:
    # shut down cleanly
    myNetscan.stop()