Shop OBEX P1 Docs P2 Docs Learn Events
Xbee problems — Parallax Forums

Xbee problems

RsadeikaRsadeika Posts: 3,837
edited 2011-10-26 00:02 in General Discussion
I just got my Xbee modules, and I am having problems trying to get the simple loop-back test to work. I am using the Selmaware AppBee-SIP boards to hold the xbee Pro, and xbee Pro S2 module. When I plug the propplug into the AppBee-SIP module, and run X-ctu, the 'sense' program seems to communicate with the xbee. But, all the other programs do not work, or at least it does not communicate with the second xbee module.

The setup that I have is, I have power and ground to the first xbee module, with the propplug plugged in. The second xbee module has power and ground, plus I have the Rx and Tx pins connected together, loop-back part. I tested both modules with the X-ctu program, and it seems to achieve communication with the X-ctu program. Any help with this would be appreciated.

Thanks

Ray

Comments

  • RsadeikaRsadeika Posts: 3,837
    edited 2011-08-19 05:36
    A couple of years back, when Selmaware was still active, I also picked up a couple of USB-PC adapter boards made by Surveyor Corp. The computer found and installed the driver for the chip, but when I try to communicate between two of these setups, I get nothing. I am starting to get the feeling that Xbee is not that easy to work with.

    After reading the "Getting Started with XBee Modules" manual, I got the impression that this was going to be a simple plug and play setup, but I must be missing something very important, because it isn't working for me. So, what do I do now?

    Ray
  • sylvie369sylvie369 Posts: 1,622
    edited 2011-08-21 06:36
    Hmm.

    You wrote that you're using "xbee Pro and xbee Pro S2" modules. It's not entirely clear what you mean there (largely because of Digi's ever-changing naming conventions), but if one of your XBees is a standard XBee Pro 802.15.4, like this one, and the other is a ZigBee (formerly "Series 2") like this one, you won't be able to get them to communicate with each other. The different types (802.15.4/ZigBee) of XBee are not inter-compatible. You can read a little about that here.

    Can you give us the exact models of your XBees modules? That'd be good place to begin trouble-shooting.

    Also, you wrote that each of your modules/SIP board setups seems to work fine with X-CTU. If I'm reading you correctly, you're plugging a Propplug into the SIP module to make the connection to your computer's USB port, correct? And when you bring up X-CTU you're able to read the XBee settings from the modules just fine, right? If that's the case, could you read each module's settings, and tell us what you get for
    ATCH (Channel)
    ATMY (Source Address)
    ATDL (Destination Address)

    These are the most important addressing parameters, and they have to be correct for two modules to communicate with each other. The simplest setting is to have both XBees on the same channel, and then one of them identified as Module 0 and the other as Module 1, with Module 0 set to transmit to Module 1 and Module 1 set to transmit to Module 0:

    Module 0
    ATCH 0C (or whatever - must match ATCH for Module 1)
    ATMY 0
    ATDL 1

    Module 1
    ATCH 0C
    ATMY 1
    ATDL 0

    Finally, when you're trying to transmit with a module on the SIP board, does the green transmit LED come on? I assume the red receive LED on the receiving board does not, right?
  • RsadeikaRsadeika Posts: 3,837
    edited 2011-08-22 02:29
    I have fixed my Xbee problems, I went back to using BlueTooth. Thanks, sylvie369 for taking the time to address the problem(s).

    Ray
  • Huda alsheyabHuda alsheyab Posts: 6
    edited 2011-10-14 02:20
    hi , I have one xbee pro s2 and another xbee s2 "not pro" I tried to do loopback test and always failed can you help me and told me why this happened ?
    Thank you in advance !
  • RsadeikaRsadeika Posts: 3,837
    edited 2011-10-14 11:45
    Since my last reply, I did get some S1 XBee modules, and got them working without a problem. As for the S2 modules, somebody else will have to address that problem. I do have a couple of S2 modules, but when I tried to work with them, I could not get them to talk to each other. Maybe somebody will come up with a tutorial for working with the the S2 modules.

    Ray
  • FranklinFranklin Posts: 4,747
    edited 2011-10-14 13:54
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-10-14 15:01
    @Huda,

    Are you still having trouble with your S2 XBees?

    I've used series 2 (zig bee) XBees with the Propeller. The XBees need to be set up correctly before hand and the serial numbers need to be used. I know I have some Propeller code that lets two zig bee XBees communicate together. I'll look through my files and find the program if anyone wants to try it. Just let me know.

    Duane
  • Huda alsheyabHuda alsheyab Posts: 6
    edited 2011-10-16 00:48
    Thx guys I will try the web site and I hope you "Duane" find the files and help me :) cause really I need to solve the problem as soon as I can it's my graduate project and there is no time for these problem
    thank you for caring .
  • FranklinFranklin Posts: 4,747
    edited 2011-10-16 13:05
    it's my graduate project and there is no time for these problem
    I think this is one of the best lessons you will learn from this, "every project takes more time than you have unless you plan ahead." And sometimes even then...
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-10-16 15:49
    Huda,

    I'm attaching the files I used to communicate with Series 2 XBees.

    There's more information about the serial object I use in this thread.

    You'll need to change the serial numbers in the program to match the serial numbers of your XBees.

    The serial numbers are listed at the bottom of XBeeComTest and XBeeAux. Here's what they look like in XBeeComTest.
    shCoordinator byte "0013A200", 0                ' a
    shBarcode     byte "0013A200", 0                ' e
    shBackup      byte "0013A200", 0                ' h
    shSam         byte "0013A200", 0                ' s 
    shFred        byte "0013A200", 0 
    shBroadcast   byte "00000000", 0
    slCoordinator byte "403BCAA8", 0
    slBarcode     byte "400A27EB", 0
    slBackup      byte "403BC58E", 0                ' h
    slSam         byte "403DDA49", 0
    slFred        byte "403DDA4A", 0
    slBroadcast   byte "0000FFFF", 0
    shAttached    byte 0[Header#_XBeeSerialSize + 1]
    slAttached    byte 0[Header#_XBeeSerialSize + 1] 
    shDestination byte 0[Header#_XBeeSerialSize + 1] 
    slDestination byte 0[Header#_XBeeSerialSize + 1]
    xAttached     byte 0[Header#_XBeeNameFieldSize]
    xDestination  byte 0[Header#_XBeeNameFieldSize]
    xbeeNames     byte "Coordinator", 0             ' a
                  byte "Barcode", 0[5]            
                  byte "Backup", 0[6]            
                  byte "Sam", 0[9]            
                  byte "Fred", 0[8]            
                  byte "Broadcast", 0[3]
    

    I used the prefix "sh" to indicate serial number high and "sl" for serial number low.

    You can see I also named the XBees.

    The XBees need to be configured with the software from Digi (I think it's called XTU). One XBee needs to be a coordinator and the others all need to be end point/router (or something like that).

    You'll want to look at the pin assignments to know which XBee is expecting to be the coordinator.

    It's been a while since I've used these XBees so I don't remember all that the program does. I think two XBees can be attached to the same Propeller board and the the two XBees will try to communicate with each other. I think the coordinator also tries to communicate with other XBees that have their serial numbers listed in the program.

    Let me know if you have questions and I'll try to answer them.

    Duane
  • sylvie369sylvie369 Posts: 1,622
    edited 2011-10-16 16:02
    Duane Degn wrote: »
    The XBees need to be configured with the software from Digi (I think it's called XTU). One XBee needs to be a coordinator and the others all need to be end point/router (or something like that).

    The program is called "XCTU", and it's available here: http://www.digi.com/support/kbase/kbaseresultdetl.jsp?kb=125
  • Huda alsheyabHuda alsheyab Posts: 6
    edited 2011-10-17 23:37
    Thank you all :) , we solve it :) and it's do well ;)
    thx again :D
  • Huda alsheyabHuda alsheyab Posts: 6
    edited 2011-10-24 10:02
    hi again ,
    umm I wanna ask , if I want to send audio or video from one arduino board to another via xbee radio , Do I need to packetize it ?
    if yes , There is a specific way to packetize it ? Or what?!!
  • Mike GreenMike Green Posts: 23,101
    edited 2011-10-24 10:13
    You can't send video via xBee unless it's highly compressed ... there's just too much data and it's too fast for the xBee. You could send audio via xBee, but, if you want it to be real-time, you'd have to packetize it and mark it with time codes because xBee transmission is automatically packetized and the end-to-end transmission time varies. Do some research into audio and video streaming techniques. That's effectively what you would be doing. The techniques involved are very complex and the details are not really a subject for discussion here. An Arduino is not really capable of doing what you want without external hardware to do most of the work.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-10-24 10:26
    There's a forum member using nRF24L01+ modules to stream audio. You can get the modules pretty cheap on ebay.

    As Mike said, I doubt the audio streaming will work on the Arduino (the code I linked to is for the Propeller).

    Duane
  • Huda alsheyabHuda alsheyab Posts: 6
    edited 2011-10-25 11:15
    OMG !! you really shocked me :$ , we have to send video ! any way until now we didn't reach this stage .
    ok right now we tried to send data from one arduino to another one , but what we note ! that's data doesn't the same !!
    I mean if the value send from first arduino equal 500 , It does not reach the other side as the same value it may be reach the other side with value equal 10 ,50 something like this , although we send data from arduino to another without using xbee radio "just putting wires between tx , rx in each arduino " !! I don't know ! does arduino change on data ?! before it send it ?!!!!
  • RsadeikaRsadeika Posts: 3,837
    edited 2011-10-25 12:57
    Huda, why are you using my thread to discuss problems about your Arduino? This thread is to be used for XBee and the Propeller!

    Ray
  • Huda alsheyabHuda alsheyab Posts: 6
    edited 2011-10-26 00:02
    ok I'm sorry !!! I will not use it again !
Sign In or Register to comment.