Class XBeeHello

    • Constructor Summary

      Constructors 
      Constructor Description
      XBeeHello()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)
      Generate "Hello XBee World!" on a XBee radio connected to a serial port.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XBeeHello

        public XBeeHello()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        Generate "Hello XBee World!" on a XBee radio connected to a serial port.

        To send data, the two radios need to be in api mode. See https://docs.digi.com/display/XBJLIB/Building+your+first+XBee+Java+application.

        To list the ports, use:

         java -classpath ${PTII}:${PTII}/lib/nrjavaserial-3.11.0.devel.jar:${PTII}/lib/xbjlib-1.1.0.nrjavaserial.jar:${PTII}/lib/slf4j-api-1.7.13.jar:${PTII}/lib/slf4j-simple-1.7.13.jar ptolemy.actor.lib.jjs.modules.xbee.test.XBeeHello
         

        To send data on a port, append the port name:

         java -classpath ${PTII}:${PTII}/lib/nrjavaserial-3.11.0.devel.jar:${PTII}/lib/xbjlib-1.1.0.nrjavaserial.jar:${PTII}/lib/slf4j-api-1.7.13.jar:${PTII}/lib/slf4j-simple-1.7.13.jar ptolemy.actor.lib.jjs.modules.xbee.test.XBeeHello /dev/xxyy
         

        To send data on a port and get debugging:

        For example:

         java -Dorg.slf4j.simpleLogger.defaultLogLevel=trace -classpath ${PTII}:${PTII}/lib/nrjavaserial-3.11.0.devel.jar:${PTII}/lib/xbjlib-1.1.0.nrjavaserial.jar:${PTII}/lib/slf4j-api-1.7.13.jar:${PTII}/lib/slf4j-simple-1.7.13.jar ptolemy.actor.lib.jjs.modules.xbee.test.XBeeHello /dev/tty.usbserial-DA01QZI2