def main(self):
        KEY = 0x20
        DATA = 0x30
        while 1:
            #add header - packet type=4 bytes and packet length = 4 bytes
            while self.dataReady("keyIn"):
                data = self.recv("keyIn")
                header = struct.pack("!2L", KEY, len(data))
                packet = header + data
                self.send(packet, "outbox")
            yield 1