Recent Changes - Search:

edit SideBar

XBeeLogging

Summary

The XBeeJava library uses slf4j (Simple Logging Facade for Java) to control logging for the XBee.

To enable debugging, add slf4j-simple*.jar to the classpath and remove slf4j-nop*.jar. Then set the org.slf4j.simpleLogger.defaultLogLevel property to trace

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

See http://www.slf4j.org/apidocs/org/slf4j/impl/SimpleLogger.html for How to control the Simple logger by setting properties

Sample Run

bash-3.2$ java -Dorg.slf4j.simpleLogger.defaultLogLevel=debug -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
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Using the connection interface SerialPortRxTx.
[main] INFO com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Opening the connection interface...
[main] INFO com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Connection interface open.
[Thread-1] DEBUG com.digi.xbee.api.connection.DataReader - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Data reader started.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Sending AT command 'AP'.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Sending XBee packet:
Packet: 7E00040801415065
Start delimiter: 7E
Length: 00 04 (4)
Frame type: 08 (AT Command)
Frame ID: 01 (1)
AT Command: 41 50 (AP)
Checksum: 65

[Thread-1] DEBUG com.digi.xbee.api.connection.DataReader - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Packet received:
Packet: 7E0006880141500001E4
Start delimiter: 7E
Length: 00 06 (6)
Frame type: 88 (AT Command Response)
Frame ID: 01 (1)
AT Command: 41 50 (AP)
Status: 00 (Status OK)
Response: 01
Checksum: E4
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] AT command response: 01.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Using API mode.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Sending AT command 'SH'.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Sending XBee packet:
Packet: 7E0004080253485A
Start delimiter: 7E
Length: 00 04 (4)
Frame type: 08 (AT Command)
Frame ID: 02 (2)
AT Command: 53 48 (SH)
Checksum: 5A

[Thread-1] DEBUG com.digi.xbee.api.connection.DataReader - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Packet received:
Packet: 7E000988025348000013A20025
Start delimiter: 7E
Length: 00 09 (9)
Frame type: 88 (AT Command Response)
Frame ID: 02 (2)
AT Command: 53 48 (SH)
Status: 00 (Status OK)
Response: 00 13 A2 00
Checksum: 25

[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] AT command response: 00 13 A2 00.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Sending AT command 'SL'.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Sending XBee packet:
Packet: 7E00040803534C55
Start delimiter: 7E
Length: 00 04 (4)
Frame type: 08 (AT Command)
Frame ID: 03 (3)
AT Command: 53 4C (SL)
Checksum: 55

[Thread-1] DEBUG com.digi.xbee.api.connection.DataReader - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Packet received:
Packet: 7E00098803534C0040E9002587
Start delimiter: 7E
Length: 00 09 (9)
Frame type: 88 (AT Command Response)
Frame ID: 03 (3)
AT Command: 53 4C (SL)
Status: 00 (Status OK)
Response: 40 E9 00 25
Checksum: 87

[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] AT command response: 40 E9 00 25.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 - Sending AT command 'NI'.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 - Sending XBee packet:
Packet: 7E000408044E495C
Start delimiter: 7E
Length: 00 04 (4)
Frame type: 08 (AT Command)
Frame ID: 04 (4)
AT Command: 4E 49 (NI)
Checksum: 5C

[Thread-1] DEBUG com.digi.xbee.api.connection.DataReader - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Packet received:
Packet: 7E000688044E490020BC
Start delimiter: 7E
Length: 00 06 (6)
Frame type: 88 (AT Command Response)
Frame ID: 04 (4)
AT Command: 4E 49 (NI)
Status: 00 (Status OK)
Response: 20 ( )
Checksum: BC

[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 - AT command response: 20.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 ( ) - Sending AT command 'HV'.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 ( ) - Sending XBee packet:
Packet: 7E00040805485654
Start delimiter: 7E
Length: 00 04 (4)
Frame type: 08 (AT Command)
Frame ID: 05 (5)
AT Command: 48 56 (HV)
Checksum: 54

[Thread-1] DEBUG com.digi.xbee.api.connection.DataReader - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Packet received:
Packet: 7E0007880548560018427A
Start delimiter: 7E
Length: 00 07 (7)
Frame type: 88 (AT Command Response)
Frame ID: 05 (5)
AT Command: 48 56 (HV)
tatus: 00 (Status OK)
Response: 18 42
Checksum: 7A

[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 ( ) - AT command response: 18 \
42.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 ( ) - Sending AT command 'VR'.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 ( ) - Sending XBee packet:
Packet: 7E00040806565249
Start delimiter: 7E
Length: 00 04 (4)
Frame type: 08 (AT Command)
Frame ID: 06 (6)
AT Command: 56 52 (VR)
Checksum: 49

[Thread-1] DEBUG com.digi.xbee.api.connection.DataReader - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Packet received:
Packet: 7E0007880656520010EECB
Start delimiter: 7E
Length: 00 07 (7)
Frame type: 88 (AT Command Response)
Frame ID: 06 (6)
AT Command: 56 52 (VR)
Status: 00 (Status OK)
Response: 10 EE
Checksum: CB

[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 ( ) - AT command response: 10 \
EE.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 ( ) - Sending AT command 'MY'.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 ( ) - Sending XBee packet:
Packet: 7E000408074D594A
Start delimiter: 7E
Length: 00 04 (4)
Frame type: 08 (AT Command)
Frame ID: 07 (7)
AT Command: 4D 59 (MY)
Checksum: 4A

[Thread-1] DEBUG com.digi.xbee.api.connection.DataReader - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Packet received:
Packet: 7E000788074D59000000CA
Start delimiter: 7E
ength: 00 07 (7)
Frame type: 88 (AT Command Response)
Frame ID: 07 (7)
AT Command: 4D 59 (MY)
Status: 00 (Status OK)
Response: 00 00
Checksum: CA

[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 ( ) - AT command response: 00 \
00.
Sending broadcast data "Hello XBee World"
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 ( ) - Sending data to 00000000\
0000FFFF >> 48 65 6C 6C 6F 20 58 42 65 65 20 57 6F 72 6C 64.
[main] DEBUG com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 ( ) - Sending XBee packet:
Packet: 7E001B0008000000000000FFFF0048656C6C6F205842656520576F726C6459
Start delimiter: 7E
Length: 00 1B (27)
Frame type: 00 (TX (Transmit) Request 64-bit address)
Frame ID: 08 (8)
64-bit dest. address: 00 00 00 00 00 00 FF FF
Options: 00
RF data: 48 65 6C 6C 6F 20 58 42 65 65 20 57 6F 72 6C 64
Checksum: 59

[Thread-1] DEBUG com.digi.xbee.api.connection.DataReader - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Packet received:
Packet: 7E00038908006E
Start delimiter: 7E
Length: 00 03 (3)
Frame type: 89 (TX (Transmit) Status)
Frame ID: 08 (8)
Status: 00 (Success)
Checksum: 6E

Successfully sent broadcast data
[main] DEBUG com.digi.xbee.api.connection.DataReader - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] Data reader stopped.
[main] INFO com.digi.xbee.api.XBeeDevice - [/dev/tty.usbserial-DA01QZI2 - 9600/8/N/1/N] 0013A20040E90025 ( ) - Connection interface clos\
ed.
bash-3.2$

External Resources

Edit - History - Print - Recent Changes - Search
Page last modified on December 27, 2015, at 02:13 PM