Setup XBee Series 1: 1 Coordinator, 2 End Device on Arduino

Hello,

I have a problem to setup a Coordinator and 2 End Device attached to Arduino Uno.

Setup in XCTU
Controller:
CH: E, ID: 3332, DH:111, DL: 111, MY: 111, CE: 1, A2: 4, NI: Master, AP: 1
End Device 1:
CH: E, ID: 3332, DH:222, DL: 222, MY: 222, CE: 0, A1: 4, NI: Sensor1, AP: 1
End Device 2:
CH: E, ID: 3332, DH:333, DL: 333, MY: 333, CE: 0, A1: 4, NI: Sensor2, AP: 1

On the controller, I have the following code:


#include 
#include 

SoftwareSerial mySerial(2, 3);

XBee xbee=XBee();
ZBRxResponse zbRx=ZBRxResponse();

void setup () {
 Serial.begin(9600);
 delay(1000);
 mySerial.begin(9600);
 delay(1000);
 xbee.begin(mySerial);
 Serial.println("End Setup");
}

void loop () {
  xbee.readPacket();
  if(xbee.getResponse().isAvailable()) {
    if(xbee.getResponse().getApiId() == ZB_RX_RESPONSE) {
      xbee.getResponse().getZBRxResponse(zbRx);
 
      for(int i=0; i
#include 

uint8_t text[]={'S', 'e', 'n', 's', 'o', 'r', '_', 'X'};

XBee xbee=XBee();
XBeeAddress64 remoteAddress=XBeeAddress64(0x111, 0x111);
ZBTxRequest zbTx=ZBTxRequest(remoteAddress, text, sizeof(text));

void setup() {
  Serial.begin(9600);
  xbee.setSerial(Serial);
}

void loop() {
	xbee.send(zbTx);
	delay(5000); 
}

Is this right?

I see the transmit LED blinking every 5sec on both End Device and nothing on the Coordinator. Also, I don’t see any traffic in the Console of XCTU and in the Network Working mode, the End Device appears with a ? in stead of E.

Any help is welcome!
Renaud

Your addressing is incorrect. For using 16 bit addressing, you only set the DL to equal the MY of the remote. DH would be 0.

If you are going to use API mode and issue API frames, you need to make sure that you issue the proper API frame and match the address field it wants. If you are doing remote AT commands (0x17), then you need to use the SL and Sh of the remote module as the source address.

Thanks,
I just tried with the following setup and have the same result.
Controller:
CH: E, ID: 3332, DH:0, DL: 0, MY: 111, CE: 1, A2: 4, NI: Master, AP: 1
End Device 1:
CH: E, ID: 3332, DH:0, DL: 111 MY: 1, CE: 0, A1: 4, NI: Sensor1, AP: 1
End Device 2:
CH: E, ID: 3332, DH:0, DL: 111, MY: 2, CE: 0, A1: 4, NI: Sensor2, AP: 1

And have changed XBeeAddress64 remoteAddress=XBeeAddress64(0, 0x111); in the End Device

I see the led blink on the End Device and nothing hapend in the coordinator :((

But have the same problem:

Do you self a favor. Take the Arduino out of the picture and connect all three radios to the PC. Then restore all three of them to defaults.

Now set the following:
Base Remote 1 Remote 2
MY1 MY 2 MY3
DL0xFFFF DL0x1 DL0x1
DH0x00 DH0x00 DH0x00

Then using XCTU’s Terminal, send data from the base and then from each remote. You will find that the base will talk to both remotes and the remotes will only send data to the base.

Same problem.
Then I need 3 explorer?
Can you tell me how to send data with the XCTU?
Thx,

Yes, you would need three interface boards that you can connect the radios to the PC with to make this test.

Ok, I order two more.
I have posted here (http://www.alligatorcms.com/download/XCTU.zip) the 3 configuration profile.
For info, when I send data from a remote, I see the send LED blinking but nothing happend on the base.

Turn of API mode on all three modules and then see what happens.

I have turned to off the API mode on the 3 xbee. With only one explorer, it there a way to test the communication?
I need to send few bytes from the remote to the base (all on Arduino). What method do you recommend use?

Without having some way to power the radios and listen to their COM ports, you really have no way to verify they are communicating. At least not in the fashion you want to use them in.

Thanks, it is out of stock here. They will have some next week.

Hello, I am back with 3 explorer connected. What is the next step? How can I send few byte from the coordinator to a end node and from a end node to the coordinator?
Thx

Simply. First connect each radio to a board and the PC. Then launch XCTU and Discover all three radios.

Next restore all three to defaults.

Open a Terminal session to each radio (All three at the same time) and then type data in one terminal. What you type in one should show up in the other two.

That is working.
I try desperately to communicate from the Arduino but it does not work :frowning:
When all radio are connected to the PC; in XCTU, I can communicate to the base ex: (7E 00 0A 01 01 00 01 00 48 65 6C 6C 6F 08). But when I plug one of the radio to the arduino and send the same sequence, I see the out led blinking but nothing on the coordinator.

That is because the Arduino is using API mode with what looks like 16 bit addressing and XCTU is using transparent mode. Try modifying your Arduino code to do simple Serial Read and Writes to the Xbee port instead of using API frame.

Of course I can use Serial.print but what sequence of byte should I have to output in order to send few byte from end node to the coordinator?

Anything you want. That is the entire reason why transparent mode exists. It is meant to be just that. Data In on the Transmitting module = Data Out on the Receiving module.

In transparent mode, what happend if 2 node are sending data to the coordinator at the same time?

The exact same thing that would occur in API mode. A data collision may occur resulting in data loss. If unicast mode was used, then a random back off and re transmission would occur.

I have done the following test in transparent mode: 3 radios connected with explorer to the PC. Everything is fine: in XCTU, when I type in something in the console of a radio, I see the message in the console of the 2 other radios.
Now, I take one of the radio an place it the the xbeeshield with the following code:
void loop() {
Serial.print(“hello”);
delay(2000);
}
I see the DOUT led of the xbeeshield blinking but nothing on the 2 radios connected to XCTU.
What is wrong?