+ Reply to Thread
Results 1 to 20 of 20

Thread: XBee Series 2 Getting Started

  1. #1

    Default XBee Series 2 Getting Started

    Could anyone point me to resources for getting started with the XBee Series 2 modules. My professor and I purchased the series 2 because of the long range capabilities (we figured the better the distance the less likely hood we would loose connection at a bad time). However I am finding that the Series 2 take a little work to get running. We failed to purchase a USB interface (soon to be fixed) to do programming.

    This is what I understand so far:
    • At least one XBee module needs to be in Coordinator mode. The rest can be in Router or EndPoint.
    • Series 2 can be run in either AT or API modes
    • Firmwares exist for all 6 configurations (Cord-At,Route-At,EP-At,Cord-API,Route-API,EP-API) and at least 1 must be flashed to the module to begin using it.
    • Example code is primarily geared to series 1 modules and is not necessarily compatible with series 2
    Here is what I am trying to do:
    1. Create a simple Point-2-Point wireless connection
    2. The system will likely be setup as Coordinator <<->> Router
    3. Get a firmware on the XB2 sans USB Programer if it is even doable
    4. Find example code to get our project ported from 433MHz links to XB2-Mesh
    If anyone can kindly point to any howto or can give any idea where I can get started that would be nice. Thanks.

  2. #2

    Default Re: XBee Series 2 Getting Started

    Hello Tecker!

    I have been working on a document to be posted for EXACTLY this application - point to point with XBee Series 2. With what I have, I get really snappy communication between both modules - like what you would get if you have the series 1 modules. I have the content down but its not yet in a "prettied up" format to post on the website.

    It would be a great test for me if you went through it and tried to configure your modules with it. You could give me some good feedback on how to make the document better. If you would like to give it a go, send me a PM and I'll send you what I have.

    You have the idea right, you will configure one module as a Coordinator and the other as a Router. The trick is to configure the Coordinator to ONLY talk with the Router, and visa-versa.

    As for configuring the modules without the USB adapter, you can totally do that! You just have to do a little extra wiring. Check out the attached pic. Basically, you need to connect the TX and RX lines to the XBee's DIN and DOUT pins respectively and then connect the XBee's ground pin to give it a reference to the computer. Be careful using a line level COM port - those typically operate at higher voltages than the USB COM port and will likely damage your module (maybe use a MAX232 chip to manage this).

    Lemme know how things go

    Last edited by Daniel Harris; 10-19-2010 at 03:13 AM. Reason: Forgot to attach the pic.
    Daniel Harris
    Application Engineer, Parallax Inc
    (916) 632-4664 x 3003
    dharris@parallax.com
    http://www.parallax.com

  3. #3

    Default Re: XBee Series 2 Getting Started

    Excellent, I will send you that email.

    As for the XBee module via the propeller plug, we only have Basic Stamp boards. I have a Board of Education with BS2 and BS2x modules and a BS2pe MOBO board and SIP adaptors for the XBee modules. Can I program through one of those BS2s or do I need to hack up a USB cable/use a USB-Serial adapter (got one of those)/buy the board to make the connection you diagrammed below?

  4. #4

    Default Re: XBee Series 2 Getting Started

    The big thing here is that you need to set one of the XBees up as a coordinator which requires changing the firmware. Otherwise, you can just send commands to the XBee to do the configuration. I'll get to that in a moment.

    Solving the connection issue... It would be best if you could use the USB-serial adapter. That way, you wouldnt have to convert RS232 levels to TTL. Hopefully you have an extra serial extension cable. If so, you can plug one end into your USB-serial adapter and cut the other to gain access to the Transmit, Receive, and Vss/ground pins. Just connect those to the XBee SIP header like you would with the Prop plug. That should get you communicating.

    Ok, the commands. From what I can tell, all the commands that you can change using the X-CTU tool, you can issue the XBee serially and modify. All you have to do is put the XBee in command mode ("+++" by default, wait for the OK) and then issue your AT command. For example, if you wanted to get the node identifier, you would do the following (my commands in regular font, XBee responses in bold):

    +++OK
    ATNI <enter>
    COORDINATOR

    You can set these attributes by adding your setting as an argument to the command. For example, setting the Node Identifier:

    +++OK
    ATNI BOB<enter>
    OK
    ATWR <enter>
    OK
    ATNI <enter>
    BOB

    The command ATWR stands for "write". This writes the settings to the XBee's flash memory. Since this is flash memory, it does have a limited number of write cycles. The XBee datasheet notes this - its ok to use, just dont issue the command after EVERY change. If you dont write the flash the setting will stay loaded into RAM until the XBee is rebooted/power cycled.

    If you want to know more about issuing commands to the XBee manually with a serial connection (either by PC or uController), just let me know. I could go on about it. (dont want to bore you or confuse with extraneous fine details though)
    Daniel Harris
    Application Engineer, Parallax Inc
    (916) 632-4664 x 3003
    dharris@parallax.com
    http://www.parallax.com

  5. #5

    Default Re: XBee Series 2 Getting Started

    Hmmm. Sorry for the delay on this message. I have been moving to a new room at our office and didn't have much time to work on this. Here is the status update.

    I still am having trouble connecting to the modules to the computer. I am trying to hack up a serial DB9 cable. I have the following configuration

    Computer/BOE ----- XBee Sip Adapt 32402A
    BOE Vdd ------------------ +5V
    BOE Vss ------------------ GND
    PC Tx (Pin 3) --------------- Din
    PC Rx (Pin 2) --------------- Dout
    <nothing> --------------- /RTS (Unconnected)

    With this hooked up I have on the SIP board PWR, On_Sleep, ASSOC and TX lights on. Using a Prolific USB-Serial (Com5) adapter when I query out of XCTU Nothing comes up. It tells me communications failed. I have even put XTCU in XP compatibility on Win7 to no avail. Am I doing things right? I think I am going to need to break down and buy a USB to XBee adapter but that will take time to come in.

  6. #6

    Default Re: XBee Series 2 Getting Started

    Depending on your pc you could have burned out your adapter or the xbee. If your computer has rs232 levels on the db9 you are putting 10 to 12v on the 5v inputs of your adapter. Check this with a meter before going any further.

  7. #7

    Default Re: XBee Series 2 Getting Started

    Since you are using the XBee SIP adapter, your module is likely protected from voltage spikes. That SIP adapter has a 5V to 3.3V translator on it, essentially acting as a buffer. IF things did go wrong, it probably didnt hurt your XBee.

    Did you make sure that you tied the GND pin on your XBee to the computer's GND somehow? This provides the module a common reference point with the computer so that the two can "talk apples to apples".

    The minimum connections you need to power and talk to the XBee are as follows:

    +5V/3.3V -------> Vdd/Vcc respectively (make SURE that only 3.3V is connected to Vcc as this goes straight to the XBee. I.E. only run power to the Vcc line if its coming through a 3.3V regulator.) Otherwise, connecting +5V to Vdd will be fine as it goes through a voltage regulator on the SIP adapter.

    DIN -------------> Conncet to Tx
    DOUT -----------> Connect to Rx
    GND ------------> Connect to GND
    Daniel Harris
    Application Engineer, Parallax Inc
    (916) 632-4664 x 3003
    dharris@parallax.com
    http://www.parallax.com

  8. #8

    Default Re: XBee Series 2 Getting Started

    Quote Originally Posted by Franklin View Post
    Depending on your pc you could have burned out your adapter or the xbee. If your computer has rs232 levels on the db9 you are putting 10 to 12v on the 5v inputs of your adapter. Check this with a meter before going any further.
    I pulled out my multimeter and checked. I am seeing about -6.6v on the Tx line and 0.0 on the Rx line when checked off of the Signal ground pin (mm+ to pin 3, mm- to pin 5 on USB-Serial). Trying Pin3 to Vss on a BOE shows 0.0 volts.

    Quote Originally Posted by Daniel Harris (Parallax) View Post
    Did you make sure that you tied the GND pin on your XBee to the computer's GND somehow? This provides the module a common reference point with the computer so that the two can "talk apples to apples".
    No I really didn't. I had thought of that but didn't know quite sure how to go about that. Below is what I tried for a wiring diagram, I have the XBee SIP adapter hooked up as follows:

    +5V ------------> Vdd {5v coming from a Board of Education Vdd pin}
    DIN -------------> Conncet to Tx {pin 3 on serial converter}
    DOUT -----------> Connect to Rx {pin 2 on serial converter}
    GND ------------> Connect to GND {connected to BOE Vss and pin5 of serial converter}

    If I try to run the GND to just pin 5 on the Serial converter nothing lights up on the board. I dont know if tyings pin 5 to PowerNegitive/Ground will help but there is not Ground port on the Xbee side.

    When I connect the system as shown above then what I get is the Tx light always on. This happens even if I don't connect anything but Vdd and Vss to +5 and Gnd respectively. Should I at this point assume the SIP adapter is fried?
    Last edited by tecker; 10-06-2010 at 10:01 PM.

  9. #9

    Default Re: XBee Series 2 Getting Started

    I am also trying to communicate with the Xbee Pro series 2 unit attached to the Parallax sip adapter. I have 2 sets that I am trying to configure with the series 1 code that I found on the OBEX. Is there any documentation ready, which will walk me through the setup?
    Is there any test code to just transfer some text and variables that is written for the series 2?

    I would love to see these communicating.

    Thanks,
    Don

  10. #10

    Default Re: XBee Series 2 Getting Started

    @don: Dan Harris sent me a draft form of some documentation. I dont quite know what you are trying to do. If you are wanting to do point-to-point serial communication then his guide will get you up and running. If you are trying to mesh net then that will take some more work. Email him to be a beta tester of the guide.

    If you follow Dan's guide you can use most of the simple serial transmit and receive code. I was successfully using just some test code to my computer over my link I made. I to am going to be looking at more complex solutions but for the time being what I have works.

    @Dan, I am going to send you some suggestions. I was able to get it working but I think some things could be explained better for more novice users.

  11. #11

    Default Re: XBee Series 2 Getting Started

    Thanks,
    That is exactly what I am looking for . . . a very simple network.

    I will send Dan an e-mail to ask him for his instructions.

    I will let you know how it works.

    Thanks again,
    Don

  12. #12

    Smile Re: XBee Series 2 Getting Started

    Daniel Harris,
    Thanks so much for the instructions for the XBEE Pro series 2. You did a great job, which would have been a lot harder without your instructions.

    The terminal test at the end is great diagnostic tools to verify simplest communications exist. I keep going back to verify it still works.

    The propeller drivers are great. I go between the onboard prop driver and the "parallax serial terminal" with no problems at all.
    Thanks again,
    Don

  13. #13

    Smile Re: XBee Series 2 Getting Started

    Daniel Harris,
    I am trying to communicate between 2 props now and I am having a problem with the RX command on the full duplex serial. I have no problem transmitting, but I loose data using the RX command (on the receive side).
    I am using 9600 baud and get very intermittent loss of data from prop to prop.

    This should be like trying to send data from prop to prop directly . . . maybe I should look up code on the OBEX under that.


    Thanks again,
    Don

  14. #14

    Smile Re: XBee Series 2 Getting Started

    Daniel Harris,

    The Xbee pro series 2 network is running great.

    I am now communicating prop to prop, with no problems.

    Thanks again,
    Don

  15. #15

    Cool Re: XBee Series 2 Getting Started

    Daniel Harris,

    2 questions for you . . .

    It now takes 8 seconds for association, when you first turn it on. Is there any way to shorten this?

    Now that these Xbees just communicate with each other, how difficult is it to add another?

    Thanks again,
    Don

  16. #16

    Default Re: XBee Series 2 Getting Started

    donnpangy,

    To add more devices to your network, it will just be a matter of updating the new device with the same PAN ID and setting up the Function Set for the device you added. Then based on the Function you setup for that device, determines how you address it.

    You may see some association time increases if you have some of the notifications and verifications enabled which could slow you down.

  17. #17

    Smile Re: XBee Series 2 Getting Started

    Kevin Cook,
    Thanks for the quick reply.

    Do you know which notifications and verifications I can safely turn off? I would like to shave off as much time as I can.

    I am looking at putting this in a hand held battery operated device, so every second counts.

    Thanks,
    Don

  18. #18

    Default Re: XBee Series 2 Getting Started

    Hi guys, I realise that I am posting in an extremely old thread, but I wonder if Daniel ever managed to upload his text document anywhere, as I am having difficulty getting my Xbee S2 coordinator and router to talk in a two way manner! Any advice appreciated

  19. #19

    Default Re: XBee Series 2 Getting Started

    Quote Originally Posted by ikeet View Post
    Hi guys, I realise that I am posting in an extremely old thread, but I wonder if Daniel ever managed to upload his text document anywhere, as I am having difficulty getting my Xbee S2 coordinator and router to talk in a two way manner! Any advice appreciated
    Welcome to the forums!

    Have you downloaded the book from:

    http://www.parallax.com/product/122-32450

    Free to download.
    Infernal Machine

  20. #20

    Default Re: XBee Series 2 Getting Started

    Have you seen this book?

    It deals primarily with the Series 2 (ZigBee) XBees.

    What processor are you using?

    I have a project using two Series 2 XBees. I haven't worked out all the kinks yet but I do have the XBees talking with each other.

    I could take a snap shot of my X-CTU screen if you think it would help.

+ Reply to Thread

Similar Threads

  1. Replies: 18
    Last Post: 07-08-2010, 02:48 AM
  2. XBee Series 2.5 replaced by "XBee ZB".
    By sylvie369 in forum General Discussion
    Replies: 10
    Last Post: 05-08-2010, 03:25 AM
  3. XBee 2mW Series 2.5
    By Richard S. in forum Propeller 1 Multicore Microcontroller
    Replies: 26
    Last Post: 02-19-2010, 08:10 PM
  4. Getting started with XBee and Basic Stamp
    By skatj in forum General Discussion
    Replies: 17
    Last Post: 02-24-2008, 02:12 AM
  5. Javelin and Xbee Series 2
    By vic-solar in forum Javelin Stamp
    Replies: 7
    Last Post: 02-08-2008, 04:42 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts