Trying to send frames from xbee on arduino to other xbee (no microcontroller)

Hey guys, my situation is that I am trying to send two frames: the first frame is meant to turn the pin DIO1 on Xbee #2 (my reciever) to high, and the second frame is meant to turn the pin DIO1 on Xbee #2 to low. I got these frames from the XCTU API frame generator. I ran this code and I am not getting a high signal on DIO1, only around 24 mv, and the rx light never goes off (or any light for that matter).

I checked that the two radios could communicate through XCTU by sending a transmitter request packet from Xbee #1 to Xbee #2 and it worked. I also sent these frames via XCTU and the monitor for Xbee #1 it would say it received a response back, but when I looked at the monitor for Xbee #2 there would be nothing there (using remote AT command frames)… but when I send a transmitter request the packet would show on Xbee #2 monitor. RX light would not go off on Xbee #2 for any of these frames sent through XCTU. Also when checking the DIO1 pin on Xbee #2, it would never really change in voltage for the frames sent through XCTU…

So I still went ahead and tried on the Arduino with the code below, and still no high on DIO1 pin of my Xbee #2.

Any help figuring out what could be wrong is greatly appreciated

My setup:

Both Xbees are on API 2 mode.

Xbee #1 (my transmitter),(model here) —> Sparkfun Explorer Board (model here)

5 volt pin → 5 volt pin on Arduino UNO
Ground → Ground on Arduino UNO
DIN → Pin 3 on Arduino UNO
DOUT → Pin 4 on Arduino UNO

Here is the code I have on the Arduino UNO:

#include <Wire.h>
#include <SoftwareSerial.h>
#define rxPin 2
#define txPin 3
#define ledPin 13
SoftwareSerial xbee =  SoftwareSerial(rxPin, txPin);

//length = 21
byte ON[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x7D,0x33,0xA2,0x00,0x41,0x90,0x89,0xB2,0xFF,0xFE,0x02,0x44,0x31,0x05,0xAD};

//length = 21
byte OFF[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x7D,0x33,0xA2,0x00,0x41,0x90,0x89,0xB2,0xFF,0x02,0x44,0x31,0x04,0xAE};

//length = 25
byte request[] = {0x7E, 0x00, 0x7D, 0x33, 0x10, 0x01, 0x00, 0x7D, 0x33, 0xA2, 0x00, 0x41, 0x90, 0x89, 0xB2, 0xFF, 0xFE, 0x00, 0x00, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x3C};

void setup(){
 pinMode(rxPin, INPUT);
 pinMode(txPin, OUTPUT);
 xbee.begin(9600);
 Serial.begin(9600);
}

void loop(){
 Serial.write(ON,21);
 delay(3000);

 Serial.write(OFF,21);
 delay(3000);

 Serial.write(request,25);
 delay(3000);
 
}

DIN --> Pin 3 on Arduino UNO DOUT --> Pin 4 on Arduino UNO

#define rxPin 2
#define txPin 3
#define ledPin 13
SoftwareSerial xbee =  SoftwareSerial(rxPin, txPin);

Either you or your code is wrong.

void loop(){
 Serial.write(ON,21);
 delay(3000);

I thought you said you wanted to talk to the XBee.

I was switching between xbee.write and Serial.write... what would be the correct command to send that to the other xbee?

Also good catch, I might have been getting those pins mixed up, it should be

DIN --> pin 2 DOUT--> pin 3

what would be the correct command to send that to the other xbee?

I think that that is rather obvious.

Aha yeah sorry… I am fairly new to this and kept switching in between those because I thought that was the problem, but I switched my code to the following and also fixed those pins:

#include <Wire.h>
#include <SoftwareSerial.h>
#define rxPin 2
#define txPin 3
#define ledPin 13
SoftwareSerial xbee =  SoftwareSerial(rxPin, txPin);

//length = 21
byte ON[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x7D,0x33,0xA2,0x00,0x41,0x90,0x89,0xB2,0xFF,0xFE,0x02,0x44,0x31,0x05,0xAD};

//length = 21
byte OFF[] = {0x7E,0x00,0x10,0x17,0x01,0x00,0x7D,0x33,0xA2,0x00,0x41,0x90,0x89,0xB2,0xFF,0x02,0x44,0x31,0x04,0xAE};

//length = 25
byte request[] = {0x7E, 0x00, 0x7D, 0x33, 0x10, 0x01, 0x00, 0x7D, 0x33, 0xA2, 0x00, 0x41, 0x90, 0x89, 0xB2, 0xFF, 0xFE, 0x00, 0x00, 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x3C};

void setup(){
 pinMode(rxPin, INPUT);
 pinMode(txPin, OUTPUT);
 xbee.begin(9600);
 Serial.begin(9600);
}

void loop(){
 xbee.write(ON,21);
 delay(3000);

 xbee.write(OFF,21);
 delay(3000);

 //xbee.write(request,25);
 //delay(3000);
 
}

So now xbee#2 has the rssi pin light up on the xbee.write(request,25), which I think is a good sign as that is what it would do on the xctu frames, but no lights turn on for the other two frames and DIO1 remains a low voltage…

edit: actually rssi flashes for the other two frames, but no rx lights