Hello I have been working on using an raspberry pi with an Xbee.
So far i’m using my computer as the controller, I have downloaded the Xbee java library made by digi.
So far i wanted to modify a IO to high/low (lets start simple).
I tried sending it to a remote device got an error (seen at the end), when i got this i thought i’d try just with the local device. Same error.
Here is the piece of code and the error.
Thanks in advance guys !
Code
XBeeDevice myDevice = new XBeeDevice(PORT, BAUD_RATE);
myDevice.open();
XBee64BitAddress addresseCapteur1 = new XBee64BitAddress("0013A2004146706F");
RemoteXBeeDevice capteur1 = new RemoteXBeeDevice(myDevice, addresseCapteur1);
myDevice.setIOConfiguration(IOLine.DIO4_AD4,IOMode.DIGITAL_OUT_LOW);
Error
SEVERE: Error parsing the API packet.
com.digi.xbee.api.exceptions.InvalidPacketException: Invalid checksum (expected 0xBD).
at com.digi.xbee.api.packet.XBeePacketParser.parsePacket(XBeePacketParser.java:192)
at com.digi.xbee.api.connection.DataReader.run(DataReader.java:409)
Jul 18, 2016 11:30:35 AM com.digi.xbee.api.XBeeDevice close
INFO: [/dev/tty.usbserial-AL016TA8 - 9600/8/N/1/N] Connection interface closed.
Exception in thread “main” com.digi.xbee.api.exceptions.InvalidOperatingModeException: Unsupported operating mode: AT mode
at com.digi.xbee.api.XBeeDevice.open(XBeeDevice.java:221)
at xbeepc.XbeePc.main(XbeePc.java:65)