xbee not transmitting or receiving any data
SRLM
Posts: 5,045
Hi,
I'm probably forgetting something simple, but I can't seem to get any data through two xbees. I'm trying to use the serial interface ("transparent" from the documentation) and I thought it would be easy. I guess I've proved myself wrong once again. [noparse]:)[/noparse]
I'm trying to send data over the wireless link from one Xbee to another, but in the same Propeller (different cogs).
On the receiving end, I simply get "ÿ" as the output, which I've figured out corresponds to binary '11111111'.
I tried connecting the TX pin to the receive pin directly across the PPDB I/O header with a 470ohm resistor and it worked fine. I've tried both FullDuplexSerialPlus.spin and Xbee_Object.spin, and neither seem to do the job. I've posted the code and a photograph of the setup. Any thoughts?
I'm probably forgetting something simple, but I can't seem to get any data through two xbees. I'm trying to use the serial interface ("transparent" from the documentation) and I thought it would be easy. I guess I've proved myself wrong once again. [noparse]:)[/noparse]
I'm trying to send data over the wireless link from one Xbee to another, but in the same Propeller (different cogs).
On the receiving end, I simply get "ÿ" as the output, which I've figured out corresponds to binary '11111111'.
I tried connecting the TX pin to the receive pin directly across the PPDB I/O header with a 470ohm resistor and it worked fine. I've tried both FullDuplexSerialPlus.spin and Xbee_Object.spin, and neither seem to do the job. I've posted the code and a photograph of the setup. Any thoughts?
{{Tests two modules on one board.}} CON 'These are clock constants _xinfreq = 5_000_000 _clkmode = xtal1 | pll16x OBJ XBTransmit : "XBee_Object" XBReceive : "XBee_Object" debug : "FullDuplexSerialPlus" Pub Start | counter XBTransmit.start(0,1,0,9600) ' XBee Comms - RX,TX, Mode, Baud XBReceive.start(15,16,0,9600) debug.start(31,30,0,57600) ' Initialize comms from Prop to PC waitcnt(clkfreq*5 + cnt) repeat 'repeat infinitely repeat counter from 97 to 122 'output a-z XBTransmit.tx(counter) debug.tx(counter) 'output sent char to terminal waitcnt(clkfreq/2 + cnt) debug.tx(XBReceive.rxcheck) 'output received char
Comments
That said, did you set the XBee's up?
Run the X-CTU setup program yet ?
There is more to XBee's than one thinks, BUT, once you get the hang of it, they are great.
You have series 2 XBees. You can't simply use the MAC address, as you could with the series 1. One of XBees has to have the coordinator firmware, as opposed to router/endpoint firmware. Or, you have to have another XBee nearby that that acts as a coordinator. The coordinator has to be present at least initially to assign network addresses, but after that it is optional until the address assignment expires.
If you purchase series 2 XBees from a supplier like Mouser, they will come to you programmed as router/endpoint. Use XCTU to reflash one of them as a coordinator. Then it should work just fine and you can use the MAC addresses to do point to point communication.
IMHO Digi has not done themselves a favor by having so a multiplicity of devices they call "XBee". To add to the confusion or to the potential, depending on perspective, the series 2 XBee hardware can be flashed with either the ZNet or the ZB firmware, and the series 1 XBee hardware can be flashed with either the 802.15.4 or the DigiMesh firmware. The two hardware platforms are different, and each platform has multiple possible firmware versions.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I tried it in a different location that may or may not have less RF interference, but even with only one Xbee powered I still got a blinked associate.
I also tried the AT_init command in the Xbee_Object.spin, but it didn't seem to help.
I think that my problem might be that according to the PDF page 12 of the manual (here) I'm not giving it a start bit. I'm not sure how to go about doing that though?
The data is still the same...
Edit: I'm a little bit lost on all the different Xbee modules. Is this one the same that I have and is it compatible with this one? It appears that mine differ only in the text.
Post Edited (SRLM) : 6/10/2009 5:46:15 AM GMT
Once that is done, leave the coordinator attached to XCTU and move the other XBee over to the Prop.
Now see if both will associate. Use the ATND (node discover) in the XCTU terminal to see what is out there. For purpose of development, I found it very useful to start with the command set manually from the terminal mode on the PC. Watch out for the timeouts!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com