PDA

View Full Version : Xbee problems



Rsadeika
08-19-2011, 10:28 AM
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

Rsadeika
08-19-2011, 12:36 PM
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

sylvie369
08-21-2011, 01:36 PM
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 (http://www.parallax.com/Store/Accessories/CommunicationRF/tabid/161/CategoryID/36/List/0/SortField/0/catpageindex/3/Level/a/ProductID/641/Default.aspx)one, and the other is a ZigBee (formerly "Series 2") like this (http://www.parallax.com/Store/Accessories/CommunicationRF/tabid/161/CategoryID/36/List/0/SortField/0/catpageindex/3/Level/a/ProductID/680/Default.aspx)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 (http://www.parallax.com/go/xbee#chart).

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?

Rsadeika
08-22-2011, 09:29 AM
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 alsheyab
10-14-2011, 09:20 AM
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 !

Rsadeika
10-14-2011, 06:45 PM
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

Franklin
10-14-2011, 08:54 PM
Have you tried here? http://www.faludi.com/projects/zigbee/

Duane Degn
10-14-2011, 10:01 PM
@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 alsheyab
10-16-2011, 07:48 AM
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 .

Franklin
10-16-2011, 08:05 PM
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 Degn
10-16-2011, 10:49 PM
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 (http://forums.parallax.com/showthread.php?129714-Tim-Moore-s-pcFullDuplexSerial4FC-with-larger-(512-byte)-rx-buffer).

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

sylvie369
10-16-2011, 11:02 PM
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 alsheyab
10-18-2011, 06:37 AM
Thank you all :) , we solve it :) and it's do well ;)
thx again :D

Huda alsheyab
10-24-2011, 05:02 PM
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 Green
10-24-2011, 05:13 PM
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 Degn
10-24-2011, 05:26 PM
There's a forum member using nRF24L01+ modules (http://forums.parallax.com/showthread.php?130707-Looking-for-Faster-Objects-for-Nordic-Wireless-Modules-nRF24L01-and-nRF2401A&p=1019375&viewfull=1#post1019375)to stream audio. You can get the modules pretty cheap on ebay (http://www.ebay.com/itm/NRF24L01-Wireless-Transceiver-Module-2-4GHz-ISM-band-/320696838110?pt=UK_Computing_DesktopComponents_RL&hash=item4aab0567de).

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

Duane

Huda alsheyab
10-25-2011, 06:15 PM
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 ?!!!!

Rsadeika
10-25-2011, 07:57 PM
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 alsheyab
10-26-2011, 07:02 AM
ok I'm sorry !!! I will not use it again !