Hello,
I have an Xbee Series 2 and an Arduino Leonardo and i want to send an XBee API frame using the arduino. I have already accomplished sending that frame through the X-CTU program, so i know that th frame is correct. But i haven't had any luck yet using the arduino.
Some of my code:
byte frame[] = { 0x7E,0x00,0x16,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x00,0x76,0x00,0x4C };
void setup() {
Serial1.begin(9600);
Serial.begin(9600);
}
void loop() {
Serial.println("Sending command to the XBee");
Serial.write(frame,26);
Serial1.write(frame,26);
delay(1000);
while (Serial1.available() > 0) {
Serial.write(Serial1.read());
}
}
I also tried the XBee library written by Andrew Rapp but the frame that i want to send is not implemented yet. I want to send an Explicit TX request. (0x11 frame i think)
Has anybody tried that before?