Please Help ! Some XBEE questions!

Hello all,

I have a couple of questions regarding XBEE ( Series 2 ). Also, I'm using AT MODE. Also, I'm hooking them up to Arduino FIO

1 - Assuming we have three XBEEs, one is configured as a coordinater, XBEE1, and the others as router/end-devices, XBEE2 and XBEE3. If the coordinator is configured to send to XBEE3, by using DH and DL, but XBEE3 is not in its range but XBEE2 is in both of XBEE1 and XBEE2 ' s range. The message will be routed to XBEE3 through XBEE2, I know. But can XBEE2 change the content of the message or it only acts as a " Data Link" layer?

2 - If I have 100 xbees let's say, and they all have the same PAN ID. However, for a certain situation, I want let's say XBEE 67 to send a message ONLY to the XBEEs in its range without them routing it to other xbees in the network. Can that be done? I'm thinking of giving each node a node identifier and then at the node that wants to send to the ones next ot it, it only has to send atnd and get the NIs of the nodes next to it and use ATDN to send to them. Is that feasable using only the 128 bytes of serial buffer on the arduino FIO?

3 - For two adjacent nodes, how can I get the RSSI value of one of them from the other?

Thanx in advance!!

1 - configured as End Device they won't route any data

2 - if you are using the "normal" XBees and not the programmable ones this won't work. and beside that - what do you mean with "ONLY to the XBEEs in its range"?

markbee

1 - Well, they're being configured as Router/End device. Sorry my bad.

2 - What do you mean by " Normal " XBEEs?. I'm putting the XBEE on Arduino Shields, if that's what you're asking.

And what I mean by what " ONLY to the ones in its range " . Because I programmed all of them to be router/end device, I want one to send to only the ones near it, i.e. the ones near it won't route the message to other XBEEs

I hope you understand now :slight_smile: and thank you for your response :slight_smile:

I was trying to answer your question and got totally confused by the Digi documentation. Digi's support site will drive you nuts if you let it. However, I think there's a couple of things you should consider. First, here's the (correct, not what you get on the support site) description of the various versions:

** XBee-ZB Firmware Versions **

XBee version numbers will have 4 significant digits. A version number is reported by issuing an
ATVR command. The response returns 3 or 4 numbers. All numbers are hexadecimal and can have a
range from 0-0xF. A version is reported as "ABCD". Digits ABC are the main release number and D
is the revision number from the main release. "B" is a variant designator. The following
variants exist in ZB firmware:

• “0" - Coordinator, AT Command Mode (AP=0)
• “1" - Coordinator, API Mode (AP=1,2)
• “2" - Router AT Command Mode (AP=0)
• “3" - Router API Mode (AP=1,2)
• “8” – End Device, AT Command Mode (AP=0)
• “9” – End Device, API Mode (AP=1,2)

Digi has developed an assortment of sensor adapter products that use the ZB firmware. (See
www.digi.com for details.) Adapter firmware versions include the following variants:
• “4" - Router/End Device Sensor Adapter
• “5" - End Device Power Harvester Adapter
• “6" - Router/End Device Analog IO Adapter
• “7" - Router/End Device Digital IO Adapter

So, the router/End Device designations you see in XCTU are for the special sensor devices like zigbee temperature sensors and smart plugs http://www.digi.com/pdf/ds_xbeesensors.pdf, not the 'normal' XBees that we usually mess with. So, you want to use either Router or End Device configurations. Don't worry, those configurations will support the I/O pins; I tested the router configuration to be sure. I suspect this is why the Faludi book skips over the descriptions of what all those choices are for.

Now, back to the problem you're researching. Routers and Coordinators route; that can't be stopped. End Devices don't route, they just receive the messages and keep quiet about it. So to fit the model you describe, the XBees in range will have to be End Devices to keep them from forwarding. This makes total sense because the model of networking that the XBees adhere to requires the devices do everything they can to get the message through to the endpoint.

Perhaps there is another method of doing what you want?

Dear draythomp,

First of all I would like to thank you for helping me in my previous thread, your input was very valuable.

Second of all, the problem is that I want them all to route, but in one instance of my system I would like for them to just get a message an not route it. Is that achievable? I put the solution I have in mind in the first post, but I don't think the arduino serial buffer can take that much.

Third, If you may, can you answer the first question please, and if XBEE2 can, or can not, change the message, will XBEE2 have it on its serial port?

Fourth, I added a question above, could you please answer it?

Thank you very much, may God bless you :slight_smile:

1 - Assuming we have three XBEEs, one is configured as a coordinater, XBEE1, and the others as router/end-devices, XBEE2 and XBEE3. If the coordinator is configured to send to XBEE3, by using DH and DL, but XBEE3 is not in its range but XBEE2 is in both of XBEE1 and XBEE2 ' s range. The message will be routed to XBEE3 through XBEE2, I know. But can XBEE2 change the content of the message or it only acts as a " Data Link" layer?

No, based on Digi's documentation, none of their devices can change a message targeted for a different device. In your example XBee1 sends, XBee2 forwards without looking at the payload data at all and XBee3 receives. As best I can tell, the fancy programmable XBees (more on these devices below) can't get at the forwarded paylod either.

2 - If I have 100 xbees let's say, and they all have the same PAN ID. However, for a certain situation, I want let's say XBEE 67 to send a message ONLY to the XBEEs in its range without them routing it to other xbees in the network. Can that be done? I'm thinking of giving each node a node identifier and then at the node that wants to send to the ones next ot it, it only has to send atnd and get the NIs of the nodes next to it and use ATDN to send to them. Is that feasable using only the 128 bytes of serial buffer on the arduino FIO?

Yes, you can do this. It isn't part of the XBee's operation, but you can certainly give them meaningful names, and then send to the appropriate devices using something like an arduino to set up the messages by getting the addresses based on the names. If you are building your own simple table of names and addresses, you can send to specific devices based on the lookup.

3 - For two adjacent nodes, how can I get the RSSI value of one of them from the other?

You have to read it, then send it. I can't find anything in their documentation about remotely reading another XBee's RSSI value. Or, if you mean how can you tell the signal strength of a nearby XBee, send it something it has to respond to and check the RSSI of its response. The reason for two answers is because I'm not totally sure what you want to do.

2 - What do you mean by " Normal " XBEEs?. I'm putting the XBEE on Arduino Shields, if that's what you're asking.

There's a bunch of different kinds of XBees. Most of us talk about Series1 or Series2 embedded modules like the XB24-Z7CIT-004 this is what is normally referred to as 'normal'. However, last year Digi introduced a number of other devices to confuse us. They have programmable XBees like the XBP24BZ7WITB003 which one can actually program to do something special and not add a separate processor as well as the special purpose sensors I mentioned before. However, best I understand, the programmable XBees require the Digi development kit appropriate to them and use a different IDE for developing code. I have no interest in these devices for a couple of reasons. First, I can easily use one of the tiny arduinos to handle the programming and second, I can't find out how much the darn things cost. One of the really small 3V arduinos + a wall wart power supply + a 'normal' Xbee would be an extremely powerful combination.

Did I get all the questions? Did any of the answers make any sense at all?

No, based on Digi's documentation, none of their devices can change a message targeted for a different device. In your example XBee1 sends, XBee2 forwards without looking at the payload data at all and XBee3 receives. As best I can tell, the fancy programmable XBees (more on these devices below) can't get at the forwarded paylod either.

So what I understand from this is that it will not even be on the serial port of XBEE2, i.e Serial.available() < 0.

Yes, you can do this. It isn't part of the XBee's operation, but you can certainly give them meaningful names, and then send to the appropriate devices using something like an arduino to set up the messages by getting the addresses based on the names. If you are building your own simple table of names and addresses, you can send to specific devices based on the lookup.

To elaborate more on this. What I want to do is let the coordinator send a message to an end device. The message will be routed until it reaches the end device. After that, and here is my problem, I want that same End Device to send a message to ONLY the Routers next to it within a certain range to determine the RSSI, i.e. I don't want these Routers to route the message.
If I use ATND and get all the names of the Routers in range and I have more than 10 nodes next to the XBEE, will I have enough buffer size to get all of that data on Arduino FIO?
Do you have any better solution?

You have to read it, then send it. I can't find anything in their documentation about remotely reading another XBee's RSSI value. Or, if you mean how can you tell the signal strength of a nearby XBee, send it something it has to respond to and check the RSSI of its response. The reason for two answers is because I'm not totally sure what you want to do.

Sorry for being vague, but what I meant was how to check, is there an AT command that provides this or should I connect PWM of XBEE to a DIO of an Arduino?

As for the normal and "not" normal XBEEs, I'm using the "normal" ones, and thanx for explaining both.

Thank you very much :slight_smile:

So what I understand from this is that it will not even be on the serial port of XBEE2, i.e Serial.available() < 0.

No, you can't see it at all.

If I use ATND and get all the names of the Routers in range and I have more than 10 nodes next to the XBEE, will I have enough buffer size to get all of that data on Arduino FIO?
Do you have any better solution?

You should be able to get a list of all the devices on the entire network if that's what you need. In AT mode you get a series of lines back with data in them about the various nodes and you have to parse it yourself. In API mode you get a series of messages, one per device out there that responded. The limit isn't the XBee, it's how fast you can grab the data and store it in a meaningful fashion (meaning something you can actually use). This is the method I would use. You can't tell how far away it is, but you can use a broadcast message and set the maximum hops to 1. That should limit which devices receive it to those in range (I have not tested this). From there you can send messages specifically and make them send their RSSI back. This will be a lot of work.

what I meant was how to check, is there an AT command that provides this or should I connect PWM of XBEE to a DIO of an Arduino?

ATDB will give back the signal strength of the last packet received. There's some restrictions on this so look at the documentation to be sure how to use it. http://ftp1.digi.com/support/documentation/90000976_G.pdf page 132. And yes, I actually have read most of that document.

Wow. I had ATDB in mind, but for some reason I thought it was only compatible with XBEE series one!

Okay, I got the general idea of the solution now. I just need to spend a couple of hours on it to get it working.

Thank you very much, sir. You truly helped me, and sorry for asking a lot of questions :slight_smile: