Does the XBeePro always automatically "respond" to XCtu initiated range tests?

I have a couple of XBeePRO modules. The X-CTU software checked online and updated their firmwares to 10CD. (I can see that there’s now a 10E6 version, and some people say I need to downgrade firmware first to use it, but I’ll leave 10CD for the time being unless there’s some known problem with it).

I have the following setup:

PC – USB Cable – XBIB-U-DEV – XBeePro (slotted into the socket provided)

PC – USB Cable – DeviceSolutions TahoeII Development Board – XBeePro (slotted into the socket, as per the XBIB-U-DEV board)

I first used the X-CTU software, with both the RS232 and USB boards connected to my computer, to do the range test. That worked fine (as per the quick start guide that shipped with the development kit).
I then connected one of the XBee modules to the TahoeII development board and found some simple C# code to run on the device (which is at the bottom of this post).

When I run the TahoeII application on the device, and then run the range test in the X-CTU software I can see that the TahoeII is receiving the test data through XBee module. Wahay!
(why it’s receiving 7 characters at a time I’m not sure, but I’ll figure that one out later)

My problem is that the X-CTU software doesn’t say “Timeout waiting for data” anymore, but rather can see the same test data that it sent out. The code below only prints the data received into a debug window - there’s nothing there to tell it to reply/send the data back.

So is the XBee still in some test mode, or will it always automatically responde to X-CTU range tests, or am I miles off the mark? :smiley:

        public static SerialPort sp;
        public static void Main()
            sp = new SerialPort("com2", 9600, Parity.None, 8, StopBits.One);
            sp.DataReceived += new SerialDataReceivedEventHandler(sp_DataReceived);
            for (int i = 0; i < 1000; i++) { Thread.Sleep(1000); }

        static void sp_DataReceived(object sender, SerialDataReceivedEventArgs e)
            byte[] readbuff = new byte[sp.BytesToRead];
            sp.Read(readbuff, 0, readbuff.Length);
            sp.Write(readbuff, 0, readbuff.Length);
            Debug.Print(DateTime.Now.ToString() + "		" + new string(Encoding.UTF8.GetChars(readbuff)));

Anyone? :slight_smile:

… nobody?

A range test doesn’t involve some special test mode - it’s just an ordinary data transmission to the remote XBee, where you arrange a loopback by connecting the remote’s DOUT to its DIN pin. Thus the data sent is reflected back to the local XBee and the signal strength (RSSI) can be measured. Both XBees must be operating in transparent mode (the default) for it all to work. Does that help?

Thanks for the reply johnf. That does make sense, but unfortunately it doesn’t help me right now, because I still can’t see why or how my test board is replying to the range test.

I was only using the Range Test in X-CTU as a means to repeatedly send data through the XBee module (module1) (attached to the XBIB device) to my other XBee module (module2) (attached to a development board) so I could test some code on the board module2 is attached to.

My understand was that the data would be sent through X-CTU, reach module2, and I could see that the data was received there (and I can see that), but that it wouldn’t respond/send the data back because I hadn’t told it to. But X-CTU is seeing a response, even though I’m not asking the second module to reply…


Please ignore me :slight_smile: I just noticed - I WAS replying to the range test. I must have been drunk for the past month solid.

        static void sp_DataReceived(object sender, SerialDataReceivedEventArgs e)
            byte[] readbuff = new byte[sp.BytesToRead];
            sp.Read(readbuff, 0, readbuff.Length);
            [b]sp.Write(readbuff, 0, readbuff.Length);[/b]
            Debug.Print(DateTime.Now.ToString() + "		" + new string(Encoding.UTF8.GetChars(readbuff)));

sp.Read - Read the received data
sp.Write - Send it back

D’oh :slight_smile:

Well, if my reply helped (if only indirectly) then I’m glad of it. I did look at your code, but obviously not hard enough.

I wish I had sixpence for every time in my ilfe that I’ve spent ages staring at a problem in my own code and not seeing it :slight_smile: Gosh, I’d be a millionaire by now…