API Frame packet from Arduino to Xbee

Project Summary:

Arduino to send API Frames to Xbee that will either open or close a city water valve, then turn the supply voltage on or off to complete the process. I currently have the circuit working between the Xbee coordinator and router perfectly. I have the Digital (DIO4, DIO5) pins of the Coordinator setup with the same pins of the Router. I now need to get the Arduino to send API packets to the Xbee Coordinator using serial communications (pin2, pin3). I believe that I am close, but I am getting an error "expected "}" before numeric constant" when the upload gets to the byte Valve_OPEN4[] . I copied the frames out of XCTU and converted them to hex. It has to be something dumb, that I am doing.... or not doing!!!

Thanks in advance for any assistance.

// Write API Frame packet from Arduino to Xbee
// http://forum.arduino.cc/index.php?topic=119463.0

// include <Wire.h>
#include <SoftwareSerial.h>

#define rxPin 2
#define txPin 3
SoftwareSerial mySerial =  SoftwareSerial(rxPin, txPin);
byte pinState = 0;

// Frame for 'Valve' Open or Valve Close

byte Valve_CLOSE4[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x8B,0x2D,0x60,0xFF,0xFE,0x02,0x44,0x34,0x04,0x5E};

// //////// the following line is the error line ///////////

byte Valve_OPEN4[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x8B,0x2D,0x60,0xFF,0xFE,0x02,0x44,0x34,0x05,0x5D};

// Frame for 'Valve' Power "ON" or "OFF"

byte Valve_Power_ON5[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x8B,0x2D,0x60,0xFF,0xFE,0x02,0x44,0x34,0x05,0x5E};
byte Valve_Power_OFF5[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x8B,0x2D,0x60,0xFF,0xFE,0x02,0x44,0x34,0x04,0x5F};


void setup()
{
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
mySerial.begin(19200);
// Serial.begin(19200);
}
void loop()
{

  mySerial.write(Valve_OPEN4,20);
    delay(3000);
  
  mySerial.write(Valve_CLOSE4,20);
    delay(3000);

////////////////////////////////////////////////////////
///////   RESET VALVE POWER TO OFF WHEN VALVE IS OPENED OR CLOSED /////////////////////
//////////////////////////////////////////////////////  
  
}
byte Valve_OPEN4[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x8B,0x2D,0x60,0xFF,0xFE,0x02,0x44,0x34,0x05 0x5D};
//                                                                                                                  ^

Oops

gfvalvo,
Thank you very much.... I have no clue as to the # of times that I went over that line looking for something to pop out at me. A new set of reading glasses may be instore for me, or maybe just clean my current ones. OK, let me move on and see how this goes.

Thanks again

Well, I a cleared the errors by adding the (,) but I uploaded the script with no luck. So I figured I would use the Arduino's Tx(0) and Rx(1) instead of pins 2 and 3. Changed the script and still no luck. The XCTU works fine sending the frames and operating the LED's on and off. So here is the breakdown of the hardware indicators:

Arduino - TX LED is flashing at regular intervals (and verified that data is being sent through the monitor)
Xbee Coordinator (API) - Yellow LED on, Green LED is on, Red LED is flashing
XBEE Router (AT) - Yellow LED on, Green LED is on

XCTU sending-
Coordinator - BLUE LED
Router - Blue LED (LED's on/off as requested)

Arduino sending
Arduino - Flashing Tx LED

XTCU receiving
Coordinator - No LED's responding

The TX and RX jumpers are correct

Any Thoughts

// Write API Frame packet from Arduino to Xbee
// http://forum.arduino.cc/index.php?topic=119463.0

// include <Wire.h>
// #include <SoftwareSerial.h>

// #define rxPin 2
// #define txPin 3
// SoftwareSerial mySerial =  SoftwareSerial(rxPin, txPin);
// byte pinState = 0;

// Frame for 'Valve' Open or Valve Close Position (Activates DPDT relay which reverses polarity (+ -) to pump)

byte Valve_CLOSE4[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x8B,0x2D,0x60,0xFF,0xFE,0x02,0x44,0x34,0x04,0x5E};
byte Valve_OPEN4[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x8B,0x2D,0x60,0xFF,0xFE,0x02,0x44,0x34,0x05,0x5D};

// Frame for 'Valve' Power "ON" or Power "OFF" (After Valve position is selected, power is then supplied)

byte Valve_Power_ON5[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x8B,0x2D,0x60,0xFF,0xFE,0x02,0x44,0x34,0x05,0x5E};
byte Valve_Power_OFF5[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x8B,0x2D,0x60,0xFF,0xFE,0x02,0x44,0x34,0x04,0x5F};


void setup()
{
// pinMode(rxPin, INPUT);
// pinMode(txPin, OUTPUT);
// mySerial.begin(19200);
 Serial.begin(19200);
}
void loop()
{

  Serial.write(Valve_OPEN4,20);
    delay(3000);
  
  Serial.write(Valve_CLOSE4,20);
    delay(3000);

////////////////////////////////////////////////////////
///////   RESET PUMP POWER TO OFF /////////////////////
//////////////////////////////////////////////////////  
  
}

Problem RESOLVED!!!!
CheckSum issue

LED's operating as programmed. Waiting for PCB board to arrive so I can finish the first phase of this project