#!/usr/bin/python2 import socket import time import wireless target = "192.168.178.21" port = 5005 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) w = wireless.wireless("wlan0") while 1: msg = "#WIFI:LEVEL:" + w.level() s.sendto(msg, (target, port)) time.sleep(1)