Main Site Documentation

Xbee setup problems


#1

ok, so i have 2 xbees (series 1), i used X-CTU to set their baud rates (both at 115200), their pan IDs are the same and everything else is the default setting. in my code i have the following:


            SerialPort UART = new SerialPort("COM1", 115200);
            UART.Open();

            Debug.Print("Panda Xbee started");
 
            string nowDateTime = "";

            while (true)
            {
                nowDateTime = DateTime.Now.ToString();
                tx_data = Encoding.UTF8.GetBytes(nowDateTime);
                UART.Write(tx_data, 0, tx_data.Length);

                Debug.Print(nowDateTime);

                Thread.Sleep(5000);

                // toggle LED state
                ledState = !ledState;
                led.Write(ledState);
            }

the secondary xbee is connected to my laptop through usb and i have X-CTU open on the terminal tab (after testing the connection using the test/query button). but i get nothing coming through, i event wrote my own com port listener but i get nothing on it.

i even tried to go the other way, and use the laptop as the sender and the fez as a receiver. after completely switching all the setup (wiring etc) to go the opposite direction, and having the incoming data output to debug.print all i get coming through is “OK OK” even when i dont have the other xbee plugged in. what am i missing here? are one of these things fried and i just cant tell? below is the pic of how i have it wired in using the fez as the sender. im losing my mind trying to figure this out…


#2

here is my x-ctu screen capture, anybody see any issues with this?


#3

Please do not double post.

http://www.tinyclr.com/forum/2/5122/#


#4

here is the other xbees x-ctu data for comparison


#5

sorry about the double post, the page got stuck loading and i had to refresh it, didnt realize it went through, my bad


#6

Did you see my reply on the other post?


#7

You forgot to set up the destination address high and destination aaddress low.

Check this out:
http://wiki.tinyclr.com/index.php?title=FEZ_Xbee


#8

ianlee74, i tried that but with no effect

Robert Jacobs, i looked at that link, but there isnt a discussion on it about setting the destination high and low on it, it only discusses the Pan ID. i thought that if i left those at 0’s that they would listen to all traffic, is that wrong? where can i find a good explanation of how i am supposed to set those parameters? i have just the 2 xbees and its really just one way communication from the xbee attached to the fez (A) and the one on the USB module (B). how should i set the destination high and low for both A and B?


#9

I’ll check my X-CTU settings tonight. It’s been a long while since I’ve change them. The address is the big guid looking number on the bottom of your XBee. My guess here is that you need to put the address of A on B and B on A for high & low to get a single-pair match.


#10

You need to match high and low so the devices know who to talk to.
So the high and low of the first module is the destination of the second and vice versa.


#11

im sorry but because there are 2 devices, its tough to understand which fields you are referring to in each case (i should prob mark my xbee sensors too). could you put it into a format i might be able to grasp a little more concretely, like so:

XBee Sensor A (sender, attached to fez)
DH:?
DL:?
MY:?
SH:?
SL:?

XBee Sensor B (receiver, attched to USB)
DH:?
DL:?
MY:?
SH:?
SL:?

i cant change the serial numbers (or can i?), so im guessing that the DH/DL of the sender need to match the SH/SL on the receiver if i am only doing 1 way communication. if i am doing 2 way then the DH/DL of the receiver must match the SH/SL of the sender. right? do i need to have the MY parameter set as 2 different numbers on the 2 different devices?


#12

On the back of your Xbee there is a set of serial numbers. Let’s say…

Sensor A = "abcdefgh-ijklmnop"
Sensor B = “qrstuvwx-yzabcdef”

Then…

XBee Sensor A (sender, attached to fez)
DH:qrstuvwx
DL:yzabcdef
MY:?
SH:abcdefgh
SL:ijklmnop

XBee Sensor B (receiver, attched to USB)
DH:abcdefgh
DL:ijklmnop
MY:?
SH:qrstuvwx
SL:yzabcdef

I don’t remember ever changing the MY: value. Try just leaving it at its default. Also, the DH & DL values are optional. If you leave them as zero then you will be in broadcast mode and all XBees in range can receive. This is a good first test.

Also, to be safe you might want to start out at 9600 baud until you’re sure everything is talking and then step it up.


#13

Ianlee, very well explained.
Oh yeah, I found this tutorial to be useful:


#14

Thanks, Robert. Hope it helps the Wolf!


#15

i got it working, xbee is easy but i started with the xbee breakout board wired wrong, thanks for the replies


#16

Check out xbee.codeplex.com in a while if you are interested in using XBee