Hello,
I am a beginner of xbee, Arduino and have problem sending simple data from router to the coordinator xbee. I want to send simple integer value, in this case 0x33. I use 0x00 (TX request) API mode. Destination address (coordinator) is 0013A20040F782F2. Since I am a beginner, I read instruction by Digi about the frame structure but not sure if my arduino program correctly describes required frame structure and necessary information. I tried below arduino code but doesn’t work;
Please advise me how to write arudino program for 0x00 (TX request) API mode.
#include
SoftwareSerial xbee(10,11);
void setup () {
Serial.begin(9600);
xbee.begin(9600);
}
void loop () {
/* send RSSI data to coordinator */
byte RSSI_test = 0x33;
long sum = 0x00 + 0x01 + 0x00 + 0x13 + 0xA2 + 0x00 + 0x40 + 0xF7 + 0x82 + 0xF2 + 0x00 + 0x33;
byte checksum = 0xFF - (sum & 0xFF);
byte xbee_data[] = {0x7E,0x00,0x12,0x00,0x01,0x00,0x13,0xA2,0x00,0x40,0xF7,0x82,0xF2,0x00,0x33,checksum};
xbee.write(xbee_data,8);
delay(1000);
}