Zigbee Network Setup

So I'm trying to do simple serial communication and am on day 2. I've read the manuals and about a dozen online tutorials. So here's where I'm at.

I'm trying to run a simple blink code. I push the button on one and the other arduino next to it lights up. The code works wired directly.

2 - Zigbees Series 2 (one coordinator one router/end point)

  • Same PAN ID
  • Channel Verification is enabled
  • The lights on the two shields are blinking (the coordinator 1/sec the endpoint 2/sec)
  • Talking to the endpoint zigbee through X-CTU indicates that it is receiving a network ID from the coordinator

So in my estimation they appear to be connected on a zigbee level, but not willing to transmit any serial information.

Well I've upload firmware for Zigbee AT instead of Znet AT for the Coordinator and Router/End. Now I've at least got an Arduino talking to my computer!

So this changes my question to what is the difference between the two? I fixed (it seems) my problem, but don't know why.

There is no need to start a new thread. This one was all you needed. You just need to post the new question here.

Now your delay issue may be from the code or from the transmitters themselves. So post your code so we can have a look at it and help you figure this out.

With a zigbee interface between two Arduinos controlling a simple blinking Led/Switch Combination has anyone seen a delayed blink effect. When the button is pushed with the two Arduinos wired together the light blinks immediately, but with the zigbees in line there is a 10+ second delay.

Any ideas on a solution. I've toyed with adding a delay at the sending end, but to no avail.

Sender:

//A sketch to use the serial interface directly to send a wired command between 2 zigbees


int Button = 7;   // Switch is connected to this pin

int val = 0;    //state of switch
// The setup() method runs once, when the sketch starts

void setup() {
// Serial port enable
Serial.begin(19200);
pinMode(Button, INPUT);
}

void loop() {
// read analog pin 5
 
val = digitalRead(Button);   //sets val to the button status




// send the value to the serial port
Serial.println(val,BYTE);

delay(200);
}

Receiver:

//wire an led to a pin and then the second arduino will control the status triggering

byte incomingByte;
int ledPin =  13;    // LED connected to digital pin 13
int val;

void setup() {
// Serial port enable
Serial.begin(19200);

// declare pin ledPin as output, this is the LED
pinMode (ledPin, OUTPUT);
}

void loop() {

// if there is bytes available coming from the serial port
if (Serial.available()) {

// set the values to the 'incomingByte' variable
incomingByte = Serial.read();

val = incomingByte;
  if(val == HIGH) {
  digitalWrite(ledPin, HIGH);   // set the LED on

  } else {
  
  digitalWrite(ledPin, LOW);    // set the LED off

}
}
}

They give no indication of falling asleep.

Series 1 or 2? How are the XBees configured?

Mine react faster than I can.

Series 2

Zigbee Router End Device AT

ID 234
DH 0
DL FFFF
MY 4020
BH 0
SC 1FFE
SD 3
JN 1
NJ FF
NI
DD C
NT 3C
AR FF

BD 19200

SM 0
ST 1388
SP 20
SN 1

Zigbee Coordinator AT

CH D
ID 234
DH 0
DL FFFF
MY 0
BH 0
SC 1FFE
SD 3
NJ FF
NI
DD 0
NT 3C
AR FF

BD 4

SP 20

Further testing with my computer's serial port has indicated that the first message is typically sent instantaneously, but a second message and response takes a couple of seconds to arrive and return.

Brad