def testComms():
 p = snap.Packet(snap.localAddress, snap.localAddress, 0, 1, [255, 0])
 p.send()
 notif = _getNotification(serialPort)
 if (notif.dataBytes[0] == 255):
  return True
 return False

def testComms ( ) : p = snap . Packet ( snap . localAddress , snap . localAddress , 0 , 1 , [ 255 , 0 ] ) p . send ( ) notif = _getNotification ( serialPort ) if ( notif . dataBytes [ 0 ] == 255 ) : return True return False
test that serial communications are working properly with simple loopback .