1

I have an Arduino Uno R3, Wireless Proto Shield and a XBee XB24-AWI-001 all hooked together. I'm using X-CTU software to access the XBee and change the properties of it. I did a little research and found out that if I want to access the XBee, I have to connect the GND to the RST pin (on the Proto Shield) or hold the RESET button on the board. This method works and when I do that, I can find the XBee on X-CTU.

The question is - why do I have to do that? I'm probably wrong, but as far as I understand, if I have my Arduino connected to the computer, I'm accessing the ATmega microprocessor and that's the reason I can't access the XBee, but when I do the reset, I'm constantly resetting the microcontroller and that's the reason why I can access the XBee? Hopefully someone can explain this...

The link where I found the information about resetting (or removing) the ATmega microproccesor, Using Arduino to Connect Xbee Serial to Computer.

1
  • @Greenonline Done! – L2PA Mar 26 '16 at 7:34
0

I am slightly surprised that you can actually talk to the XBee from your PC over USB with the XBee in the shield. XBee shields are generally designed for the XBee to be used by the Arduino only. The fact that you can actually talk to the XBee from the PC using X_CTU with the XBee in the Arduino shield, by holding down reset, seems to either be a quirk or a feature of the shield1.

Generally to use X-CTU to talk to the XBee, one would use an XBee explorer board or a Development board. One would configure the XBee completely in the Explorer dongle and then transfer the XBee to the shield for the Arduino to use it.

See the thread on the Digi forums, xbee s1 xctu arduino:

The shield is not design for writing and reading firmware to and from the XBee module. It is only designed for basic two way communications. If you want to read or write firmware to the module, you need to use a board that is designed for it such as the XBIB boards from Digi.

See also Can an XBee be programmed with an XBee Shield.

However, hopefully someone with more knowledge of the internals of an Uno and XBee shield than I, could explain the actual electrical reasoning behind this issue. I have attempted to explain it below in the footnote.


1 Having said all of that, looking at some of my XBee shields, a couple have a microswitch, that enables the XBee to talk to either the Arduino or the USB, but not both at the same time. So, I guess that the need to hold the reset on your shield is because you do not have such a microswitch.

So the reason being, is that the Arduino and the USB can not talk to the XBee at the same time, as there would be conflict on the Rx and Tx serial lines - see this thread, UNO + Sparkfun's Xbee Shield Always Reset if Receiving Data From X-CTU Terminal which hints at the same thing. Two comments of note from that thread are:

It would be a lot simpler to debug the issue if you put the switch in the other position, and used SoftwareSerial to talk to the XBee and Serial to talk to the PC. Using one port to talk to two devices IS going to frustrate you no end.

and

Note that a communication application connected to an arduino that opens a com port, sends data, then closes may cause the arduino to reset.

As a (really wild) guess, I would imagine that the USB-to-TTL IC's DTR line, or equivalent (?), is [logically] tied to the Arduino's RST line, so that if the PC tries to communicate to the XBee, it ends up resetting it, rather than signalling to the XBee that it is ready to communicate.

Note: The USB-to-TTL IC could be a FTDI, ATmega 4U2/8U2/16U2 or an FTDI clone, depending on the variety of Uno that you possess.

Addendum

I do wonder why the switch is there, if it doesn't end up working correctly. Regardless, I would still get a $3 explorer board clone to use with X-CTU. Be careful which one you buy as not all of them work with OS X, if you use a Mac, see the end of USB-TTL interface devices on OS X. That explorer, XBee USB Adapter Bluetooth Bee FT232RL USB to Serial Port Module for PC Arduino, is good value for money and compatible with WinTel, LinTel and OS X machines:

XBee explorer

4
  • About the microswitch- I do have it on the shield! It can either be set to micro or usb, but i've tried both of them and X-CTU still did not find the Arduino.. I guess the best I can do right now to use Xbee for my project is to just restart the board all the time to configure the xbee and then remove the wire from gnd to reset and see where that takes me... Hopefully i'll be able to use it in some way... – L2PA Mar 26 '16 at 7:58
  • @L2PA - Interesting, so in that case the Arduino forums link in my answer, UNO + Sparkfun's Xbee Shield Always Reset if Receiving Data From X-CTU Terminal, is applicable to you. I do wonder why the switch is there, if it doesn't end up working correctly. Regardless, I would still get a $3 explorer board clone to use with X-CTU. Be careful which one you buy as not all of them work with OS X, if you use a Mac, see the end of USB-TTL interface devices on OS X. That explorer is good – Greenonline Mar 26 '16 at 8:11
  • Sorry for late response. I'll check out the links later and let you know if it worked. ;) – L2PA Mar 26 '16 at 14:32
  • I guess I understood that there's no other way how I'll be able to access the Xbee without resetting the board (because of the resources that I have). Thanks for the answer and research you did! – L2PA Mar 26 '16 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.