def pktRecv(endPoint): dataArray = endPoint.read(64) data = dataArray.tostring() Info("RECEIVED 0x%X (%d) bytes: " % (len(data), len(data))) print_hex(0, data) return data
def pktSend(endPoint, data): Info("SENDING 0x%X (%d) bytes: " % (len(data), len(data))) print_hex(0, data) endPoint.write(data)