Shop OBEX P1 Docs P2 Docs Learn Events
XBee 2.5 Still Not Working with BS2 — Parallax Forums

XBee 2.5 Still Not Working with BS2

kenwtnkenwtn Posts: 250
edited 2009-01-14 02:17 in BASIC Stamp
Hi,

··· I have been working with Microcontroller where I bought the DTE Boards I am using but still I have not got this working. I have attached Picture of my connections and sample code I m using. I have both transmit side and receive side wired the same way. Any ideas would be a big help.
2048 x 1536 - 844K
«1

Comments

  • Tracy AllenTracy Allen Posts: 6,662
    edited 2008-06-20 15:09
    Did you read what I said in the other thread from a couple of days ago? http://forums.parallax.com/showthread.php?p=732057
    The xbee series 2 that you have and the xbee series 1 for which that code was written are different devices. Different hardware, different firmware, different network. Digi also has a forum where you can post questions, although it is not very active. Still, you can homeworrk through the posts there and glean useful insights.

    In general, when you have a thread started that brings up an issue, you should post to that same thread so people can pick up on the issues.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • kenwtnkenwtn Posts: 250
    edited 2008-06-20 15:19
    Ok sorry about the new tread.
  • kenwtnkenwtn Posts: 250
    edited 2008-06-20 15:25
    I will not post any more questions about this XBee problem. If I can't work it out on my own I will just trash the XBee modules I have. Thanks
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2008-06-20 16:51
    kenwtn,

    It is a useful question, because there is confusion about the different flavors of xbee. Other people thinking about this need to be clued in. Digi in my opinion doesn't do a good job with the caveats. At the embedded systems conference a few weeks ago Digi/Maxstream was there and I bought the development kit (a great show deal) that included three xbee modules, a wall router and a connectPort X2 gateway (ethernet--programmable in Python). At the time I had no idea about the differences between series 1 and series 2 and thought I would have a lot of examples to go on from Martin's Selmaware projects. But of course these were series 2 devices and a period of frustration ensued, such as you are experiencing, before I dug and realized there were significant differences. The connectport gateway came pre-programmed as the coordinator, and the rest of the modules as routers. We had to reflash the firmware anyway, to get it up to version 1.x.4.1, and make one of the other modules the coordinator, because our target project (for air pollution monitoring) will not be able to use the connectPort.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • kenwtnkenwtn Posts: 250
    edited 2008-06-20 17:30
    Tracy I do want to thank you since you have repeatedly given me feedback and help in anyway you could. I was and I am frustated because of the lack of information I can get from Micocontroller and Digi Key. I went ahead for now and bought the 912 mhz RF transceiver pair from Parallax and will continue playing around with XBee as I can. Thanks again
  • terry_bearterry_bear Posts: 84
    edited 2008-06-22 18:14
    Gentlemen,

    Perhaps some more light (or not!) on the subject...

    In all cases, "PRO" seems to designate the high-power version.

    Series 2 is now series 2.5

    Xbee Znet is older firmware than Xbee ZB.

    Neither Znet nor ZB are compatible with Series 1, nor are they compatible with each other, but Znet can be "upgraded" to ZB and ZB can be "downgraded" to Znet. Series 1 cannot...

    It appears the any 2 units are supposed work together hands-off out of the box IF they are the same series.

    If any of the above appears to be incorrect, shout it out. I could easily have misread something...

    Regards,

    Terry (who has been threatening to buy several modules for a weather station, gate monitoring, etc.)
  • kenwtnkenwtn Posts: 250
    edited 2008-06-22 19:30
    Terry that is about what Mircocontroller told me. They now say if I connected to my BS2 as above then I probalbly blew the UART by using 5volts from the BS2 pins. Since I don't know how to test this I must accept what they say.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-22 19:48
    I did mention on 6/13 "Please do not use this connector by itself to connect to the xBee. You probably will damage the xBee." regarding the Microcontroller connector board. The 5V signal from the BS2 can certainly destroy the xBee's UART pins. Occasionally you will find a 3.3V logic device like the xBee that is either specifically designed to be able to be connected to 5V logic or is robust enough to withstand it if accidentally done, but that's not the usual case. There's no easy way to test the xBee other than to hook it up in a proper interface circuit and see if it works.
  • kenwtnkenwtn Posts: 250
    edited 2008-06-22 19:50
    I had a 22K ohm resistor in place like it said in the Parallax manual, but then microcontroller told me to take it out. I also posted a datasheet on this forum asking for help but no one jumped forward to help me out with the connections. Bottom line is I felt I was left out to hang myself.

    Post Edited (kenwtn) : 6/22/2008 8:07:46 PM GMT
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2008-06-23 05:06
    I looked at that link for that converter, microcontrollershop.com/product_info.php?cPath=297&products_id=2369, , and it sure seemed to me from the wording and from the picture (IC next to the RS232 connector), that it provides both 3.3 volt power for the xbee and also level conversion so that the xbee will see safe 3.3 volt levels. So I don't think you have blown out the xbee. (but I could certainly be proven wrong!)

    Terry,

    Agree with some statements, not others.

    -- "Pro" is higher power in either series, 50 or 100 milliwatts vs 1 or 2 milliwatts, and about $10 more for Pro.

    -- What was originally called "XBee series 2" is now called "XBee ZNet 2.5" and is optimized for mesh networking with multiple hops

    -- The original XBee, which was for a while called "series 1" to distinguish it from "series 2" is now called "XBee 802.15.4" and is optimized for single point to multipoint networking.
    . The original XBee is the one to have if you want to use the Selmaware code examples.
    . The purpose of the two series are somewhat different, and I don't see anything about the earlier series being discontinued.

    -- I don't know about anything called ZB independent of ZNet, in either hardware or firmware.

    -- XBee ZNet 2.5 is a different hardware platform than the older XBee. Non-interoperable, so you can't turn a series 1 into a series 2 or vice versa with a firmware change.

    -- The current firmware for XBee ZNet 2.5 is version 1.x.4.1, where x designates the mode, coordinator vs. router/endpoint, and interface, command vs API.
    -- The current firmware for XBee 804.15.4 is 10C8. One firmware for all devices in the network.
    -- There are thorough revision histories available on the Digi web site.

    -- Hands on out of the box is relative. (A joke you'd think in frustration!) That was relatively more true for the original XBee (XBee 802.15.4), because the same firmware resides on all devices in the network, and roles were changed using commands. Of course, you do have to give it the correct commands to discover and set the network addressed, before any taling back and forth is possible. In series 2, one device in the network _has_ to be burned with the separate coordinator firmware. It works "out of the box" only if that has been done, and most of the devices come "out of the box" with the router/endPoint firmware, not coordinator firmware. But once that is done and a few fundamentals are understood, it is equally easy to get either type of network talking. (but I'm just beginning at this too.)


    terry_bear said...
    Gentlemen,
    Perhaps some more light (or not!) on the subject...
    In all cases, "PRO" seems to designate the high-power version.
    Series 2 is now series 2.5
    Xbee Znet is older firmware than Xbee ZB.
    Neither Znet nor ZB are compatible with Series 1, nor are they compatible with each other, but Znet can be "upgraded" to ZB and ZB can be "downgraded" to Znet. Series 1 cannot...
    It appears the any 2 units are supposed work together hands-off out of the box IF they are the same series.
    If any of the above appears to be incorrect, shout it out. I could easily have misread something...
    Regards,
    Terry (who has been threatening to buy several modules for a weather station, gate monitoring, etc.)
    smilewinkgrin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • kenwtnkenwtn Posts: 250
    edited 2008-06-23 13:17
    Ok it is easy to see I do not know much about electronics. Can some please look at the attachment above and tell me if there is anyway I might have blowen the UART. There is a pin on the DTE board that is suppose to be 3.3 volts and I get that reading there.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-23 15:03
    kenwtn,
    The problem is that you connected to the row of solder islets on the side of the board. I can't tell for sure, but, from the description and the appearance of the board, these look like they provide a direct connection to the xBee pins which are 3.3V logic. The DB-9 connector provides an RS232 connection with the protection of an RS232 to 3.3V logic converter/translator. The solder islets provide no protection and any voltage above 3.3V or less than zero applied to those islets will likely burn out the attached xBee pin circuitry.

    The description of a serial connection using a Stamp with a 22K resistor that is in the PBasic manual, would probably have worked if you connected to the DB-9 (serial) connector on the DTE board. At least it wouldn't have damaged the xBee.
  • kenwtnkenwtn Posts: 250
    edited 2008-06-23 15:41
    Ok Thanks Mike, I could only hope. I have to say Microcontroller was not much help at all and thier documentation SUCKS! The only pins on the side I connected were RX, TX and RTS I did not use any other pins.

    Post Edited (kenwtn) : 6/23/2008 3:46:48 PM GMT
  • kenwtnkenwtn Posts: 250
    edited 2008-06-23 15:57
    I am confused for sure, but is it the connections to TX, RX and RTS that would have blowen the UART?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-23 16:01
    Usually it's a good idea to use a 220 Ohm resistor in series with all Stamp I/O pins. The HomeWork Board even has those built in. If you connect the Stamp to a device and that device provides an output pin and your program also provides an output there, the resistor will prevent destruction of the device and Stamp I/O pins from the possible short circuit by limiting the maximum current to maybe 25mA which most devices can tolerate without damage. The same sort of thing holds true for connecting devices with different logic voltages. There's a whole long thread on using the Propeller (a 3.3V logic device) with 5V logic devices. The general rule there is to use a 1K series resistor.

    What probably happened is that the Stamp was using +5V to signal to the xBee's RX and RTS inputs. This is greater than the xBee's 3.3V supply voltage. There are usually "protective" diodes from I/O pins to the supply lines (3.3V and ground). These are connected "backwards" so they don't normally conduct. If the input pin is connected to a source of negative voltage (below -0.6V) or a source higher than the supply voltage (above 3.9V), these diodes will conduct to the + supply bus on the chip or to the ground bus. If there's enough current available, the diodes or the connecting "wires" will eventually melt damaging the circuitry around them. Even if there's not enough current available to cause heating, the voltage "spike" can damage the chip if it's high enough or lasts for long enough.

    Post Edited (Mike Green) : 6/23/2008 4:11:04 PM GMT
  • kenwtnkenwtn Posts: 250
    edited 2008-06-23 16:05
    Thanks Mike, I will keep that in mind.
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2008-06-23 16:35
    Mike is right. I didn't look carefully at your photo that shows the connections directly to the XBee tx and tx lines, instead of to the level converters on the DB9 connector. I would not assume that it is toast, though. The Stamp would have to contend with the output side of the level converter, and that might have saved the XBee from having to absorb all of the fault current. Might have.

    To test it, you could to hook the XBee module up to your computer's serial port via a crossover (null modem) cable, to the DB9 connector. Leave it powered from your homework board, but remove the other rx and tx and rts connections that you have to Stamp pins. Then run a terminal program such as hyperterminal. Type "+++" in quick succession to put the XBee in command mode. If it responds "OK", then it is not burnt out. Then you can try a couple of other XBee AT commands, such as "ATMY" CR, or "ATND",CR to see if the module is alive. Remember that commands have to be entered within 10 seconds of one another, or else the module automatically goes out of command mode back into transparent mode, and you will have to enter "+++" again to reenter command mode. Those commands/responses do not depend on having a network connection.

    I highly recommend that you get a connection going from the XBee directly to your desktop PC, so that you can get a feel for the command set.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • kenwtnkenwtn Posts: 250
    edited 2008-06-23 16:55
    Should I use defualt settings 2400,8,N,1,
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2008-06-23 16:57
    9600,8,N,1, flow control=none.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • kenwtnkenwtn Posts: 250
    edited 2008-06-23 17:03
    Ok then I believe it is TOAST. Can you tell me is this a Series 1 http://www.sparkfun.com/commerce/product_info.php?products_id=8665

    If I buy replacements I think I will want the SERIES 1
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-06-24 01:24
    Yes, that is a Series 1 XBee.
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2008-06-24 14:39
    That is series 1, XBee 802.15.4.

    Don't throw your earlier XBees in the trash quite yet. One of the first rules of troubleshooting--the possibility that the test setup might be defective. If you had seen a positive "OK" response in the above test, that would show that the XBee was working. But seeing no response does _not_ prove that the XBee is toast. It might be that the cable is incorrect, or that something is wrong with the carrier board or the power supply, or that your PC or hyperterminal are not configured correctly. The better test would be to see that the test setup works with a device known to be good (as in a brand new XBee), and then use the same setup for a device that is questionable.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • terry_bearterry_bear Posts: 84
    edited 2008-06-24 16:34
    Tracy,

    I understand "relative"! And I can see that, in order to work "out of the box", one device would have to be configured as a coordinator; but that was Maxstream's claim. I believe (don't recall for sure) that their eval kits do come that way...

    You commented that you don't know anything about ZB being independent of Znet, in hardware or firmware. I found this is the ZB product manual:

    quote: The XBee/XBee-PRO ZB firmware release can be installed on XBee modules. This firmware is
    compatible with the ZigBee 2007 specification, while the ZNet 2.5 firmware is based on Ember's
    proprietary "designed for ZigBee" mesh stack (EmberZNet 2.5). ZB and ZNet 2.5 firmware are
    similar in nature, but not over-the-air compatible. Devices running ZNet 2.5 firmware cannot talk
    to devices running the ZB firmware.

    I am learning a lot from this thread! (which will be put to good use)

    kenwth,

    As Tracy says, don't throw them out yet! There is a list as long as your arm of things that could be causing problems, but aren't fatal...

    Terry (Having been faced more than once with the bench tech's dilemma )
  • kenwtnkenwtn Posts: 250
    edited 2008-06-24 20:59
    I still have the XBee's I got 912 RF modules from parallax and they do work out of the box. But I would really like to get the XBee's working as they have many more capabilities. I will keep you all updated on this tread and will try any ideas you all have. Thanks for so much input.
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2008-06-27 16:28
    I have found that it is quite possible to operate the XBee ZNet 2.5 without a coordinator. That provided that all you want to do is send messages from one device directly to another (Which was the original issue in this thread). All you have to know is the 32 bit serial number of each device that is to be a target, and that can be discovered by connecting to a PC and using the ATSL and ATSH and ATND commands.
    Then the serial number of the target has to be entered into the XBee that wants to send the message, using the ATDH, ATDL and ATWR commands.

    I was concerned that there was a serious weak link in the network, if the coordinator goes kerplunk. The coordinator does provide advanced services, but I was relieved to find that there are workarounds and that it is possible to establish communication on a crude device to device level.

    Terry, I see what you mean about the new XBee ZB firmware, that would seem to supercede the XBee ZNet 2.5 firmware, but runs on the XBee ZNet 2.5 (aka "series 2") hardware. It seems everything is in a constant state of transition; as of today, there are two incompatible versions of XBee hardware available from Digi/Maxstream, and three incompatible versions of firmware. Caveat Emptor.

    Here is the link to the Digi page, and a link there will download a folder with documentation for XBee ZB and the firmware required to burn into coordinators, routers and end devices. (6 different firmware versions between those three device performance options and the two AT vs API interface options)
    www.digi.com/support/kbase/kbaseresultdetl.jsp?id=3025.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2008-06-29 19:37
    Here is a program that allows one XBee series 2 device to send data to another series 2 device, without a coordinator to set up the network. The difference in the PBASIC code, compared with series 1 XBee, has to do with how to set up the destination address. On series 1 that is done using the ATMY command to enter a 16 bit destination, whereas on series 2 it is done using the ATDH and ATDL commands to enter a 64 bit destination address. The destination address also happens to be the unique 64 bit serial number of the destination XBee. It is possible to discover the destination address by entering commands from a terminal program, however, you can also just read the serial number from the label on the bottom of the XBee (see attached photo). The serial number from the photo appears as the destination address in the following program.

    ' {$STAMP BS2pe}
    ' {$PBASIC 2.5}
    ' **************************************
    ' * Config_XBeeZNet25_SEROUT.bpe    *
    ' * Illustrates configuring the XBee   *
    ' * from the BASIC Stamp.              *
    ' * see caveats about channel selection *
    ' **************************************
    
    ' read the 64 bit serial number off the bottom of the target zigbee module
    ' and enter it here.  16 ascii hex characters:
    ' For example, my target module is 0013A200 405421A0.
    destHi1    CON $0013     ' target Node high Address
    destHi0    CON $A200
    destLo1   CON $4054
    destLo0    CON $21A0
    
    Baud      CON 84     ' Baud rate, 9600, 8-N-1, non-inverted, on BS2.
    
    RX        CON 16      ' Receive Pin
    TX        CON 16      ' Transmit Pin
    
    TICK    VAR BYTE
    
    
    HIGH TX
    
    DEBUG CLS, "Configuring XBee..."
    PAUSE 2000                               ' Guard time for command sequence
    SEROUT TX,Baud,[noparse][[/noparse]"+++"]                   ' Enter command mode
    PAUSE 2000                               ' Guard time for command sequence
    SEROUT TX,Baud,[noparse][[/noparse]"ATDH ", HEX4 destHi1,HEX4 destHi0,CR, ' Set destination node address
                "ATDL ", HEX4 destLo1,HEX4 destLo0,CR, ' Set destination node address
                   "ATCN",CR]                ' Exit command mode
    
    PAUSE 1000
    DEBUG "Configuration Complete!",CR
    DO                                       ' Send message forever at 1S intervals
      SEROUT TX,Baud,[noparse][[/noparse]"Hello Node! ",DEC TICK, CR]
      PAUSE 1000
      TICK=TICK+1
    LOOP
    



    One caveat is that the two devices have to be operating on the same channel. On series 1 the channel can be both read and set, but on series 2 it is read only. One role of the coordinator is to select the best channel and pass that value (read only) to all of the other XBees on its network. Nonetheless, my series 2 XBees all came up with a default to channel D, and were able to communicate with that default setting. The documentation implies that a series 2 XBee won't have any channel at all until the coordinator passes it one. But that does not seem to be true, but I wouldn't count on it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
    199 x 273 - 9K
  • kenwtnkenwtn Posts: 250
    edited 2008-06-29 22:54
    Tracy,
    Thanks so much for keeping me posted on what you have found. I also appreciate the sample code. GOOD JOB!

    Ken

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Keep buying replacement parts and sooner or later you will get it RIGHT!
  • terry_bearterry_bear Posts: 84
    edited 2008-06-30 15:26
    Ken, Thanks for starting this thread!

    Tracy, Thanks for all of the words of wisdom.

    This has saved me a lot of potential head-banging, and has caused me to do my homework ahead of time, instead of after (my usual mode)

    Cheers,

    Terry
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2008-07-01 18:07
    A new series 2 module arrived, and it indeed came with the channel=0 (null), and two such modules did not see one another and did not form a network that would allow them to talk to one another. The association light stayed constantly on. They both had the default PAN id of 0x234. I couldn't find a way (yet) to force them on their own to a valid channel. (That is in contrast to series 1 XBee, where the channel is settable.)

    However, as soon as I powered up an old series 2 module that had already been part of a network, on PAN id 0x234 and channel D, the new modules (after reset) immediately saw that and formed a network of 3 devices that could send data back and forth to one another. The association lights started blinking. The old device that seeded the network was _not_ programmed with the coordinator firmware. It was a router programmed with the same firmware as the new devices.

    The channel number, once acquired, sticks with the device even after the network is shut down and even survives the ATRE (reset to default settings) command. The reset command does rest the PAN id back to its default value of 0x234 (The documentation says otherwise).

    So, observation 1: You have to have a coordinator at some point in time to set up a network.
    And observation 2: The coordinator is not absolutely necessary to the subsequent establishment or survival of the network, once channels have been selected.

    I don't want to make it seem too problematic to get these going. It really is easy once a coordinator is in the loop. In fact, once it is preconfigured and the settings stored in it's eeprom, the XBee can be a totally transparent serial cable replacement. I'm just trying to dig into the workings and robustness factors.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Tom CTom C Posts: 461
    edited 2009-01-14 02:17
    Hi all,

    First of all, I would like to thank all of you for all of the enlightening XBee information. It has made it a lot easier to be able to get attempt to get two XBee 2.5 modules to talk to one another. However, I still have some questions that you might be able to answer.

    I bought two XBee 2MW Series 2.5 from Sparkfun and plan to use them with my·BS2p controlled robot.

    Using X-CTU, I found both modules to be ZIGBEE router/end devices which means that I will have to program one of them to be a ZIGBEE coordinator to be able to form a network and communicate with each other, right?

    Is, as terry_bear has said, ZIGBEE (ZB) firmware newer than ZNET 2.5? In other words, should I stick with ZB and not reprogram to ZNET 2.5?

    Regards,

    TCIII


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!
Sign In or Register to comment.