Closed GoogleCodeExporter closed 9 years ago
Hi,
I have a similar problem with this library. It can never send any data.
Although I'm using the new zigbee modules, S2B.
What is the expected output? What do you see instead?
I'm using the Series2_Tx example too. I'm only trying to send a payload like
{1,2,3,4} to a specific address, and also a broadcast one, but it doesn't
matter, the message never arrives.
What version of the product are you using? On what operating system?
xbee-arduino 0.3 from the zip file; OS Ubuntu 11.10, Arduino IDE 023
Arduino Mega2560 with Xbee Shield
XBee Pro Series2B from Digi (digi.com) FCC-ID MCO-PROS2B, IC: 1646A-PROS2B
baud rate 57600, 8N1
Please provide any additional information below.
The receive example works fine, because I have been investigating and messages
are shown when they arrived. To do this, I used the x-ctu app, and I send the
data by terminal making my own frame, and this frame is received by the api in
a right way.
The frame I made was: "7E 00 10 10 01 00 7D 33 A2 00 40 86 15 D9 00 00 00 00 12
34 3F" (It might be the same frame as send example must send).
I'll continue making some probes to try understand where the error is, but if
you could help us it would be great.
Thanks in advance.
Regards!!
Original comment by Alvjo...@gmail.com
on 23 Apr 2012 at 8:31
Hi!
In my case the problem was that the XBees need to be initialized to AP=2. the
xbee-api (Java) does it automatically, but not the arduino library. It is
indeed mentioned in the documentation, yet IMHO not with big enough letters ;)
So, before doing anything else, just after xbee.begin, you need to send an
ATCommandRequest with AP=2 (careful, the AP will be a char array {'A','P'}, but
the 2 in the value is a byte/int, not a char '2'). This worked for me.
Ciao & good luck,
Erion.
Original comment by er...@erion.info
on 23 Apr 2012 at 2:19
Hi,
thanks!!
The Xbees are setted by X-CTU to AP2, so in my case it isn't necessary,
although I will try it.
I was checking the library and in the XBee.cpp, at 'sendByte' function I
substituted the 'write' instructions for 'Serial.print(xxx, HEX)', where xxx
are 'ESCAPE', 'b^20' or 'b'. And it shows the frame to send, but this frame is
wrong (I know that when a byte is '00', it only shows one '0').
I couldn't tell you if it because of the 'Serial.print' instruction this wrong
behaviour, but how I told you before if I send the frame manually, the mesage
is delivered to the receiver (in my case the coordinator).
Regards,
Jorge
Original comment by Alvjo...@gmail.com
on 23 Apr 2012 at 6:37
[deleted comment]
Hi,
I've been doing more attempts today. I modified the 'send' function when it
adds '2' to the frame length because the didn't be equal as the length of my
frame. But it doesn't matters it didn't work yet.
So, I was looking for another thing, and I did the next things:
- I was sending data in AT mode and the coordinator received it in api mode
(AP2).
- Instead an arduino mega2560 I used an arduino UNO, but the behaviour was the
same as in the mega ones.
- I tried to send the data in the API mode (AP2), and received it by
coordinator in AT mode, but coordinator didn't get anything.
- And, finally, I checked if it could be because of the serial. How I did this?
Ok, I switched the jumpers to USB mode, and tried again to send data by
terminal (x-ctu). It worked! Coordinator get the message. But when I switched
back the jumpers to XBEE mode, the router didn't send anything once more.
I'm using the examples in the xbee library for API modes, and for AT modes I
only printed the next message: Serial.print("HELLO");
So, it wouldn't be because of the serial. But I don't know what more to try.
Also I updated the ZB modules firmwate, but they don't work yet.
Regards,
Jorge
Original comment by Alvjo...@gmail.com
on 24 Apr 2012 at 4:56
I am running out of suggestions, but if I were in this position, I'd go back to
the beginning and trace my steps in the the following order:
-reset everything to AT mode, 9600 bps
-check that things are working in AT mode, no api library needed for this
-switch the node (NOT the coordinator!) to API, check that xbee-api library in
Java works. How you connect from Java to the XBEE depends on what cables and
electronic skills you have. Worst case, remove the controller chip from one of
the arduinos; this will turn the arduino into a basic FTDI cable (google to
find more details)
-switch the coordinator to API, AP=2, check that everything is working -- again
only xbee-api library in Java, from the same author as xbee-arduino
-in the library, go to "private void doStartupChecks()" in XBee.java and
comment out the part that reads and sets the AP=2 mode. Run and check that
everything still works.
-if everything is fine up to here, you may start using the xbee-arduino
library. double-check to make sure the serial ports in the code and in the
XBees are set to 9600 bps. use a hardware serial port, not a software serial
one.
hopefully it should work at this point. if it doesn't, you might need an
oscillator to see what is being sent to the xbees and compare it with what
should be sent. I used this one when I had problems: http://www.saleae.com/logic
Good luck!
Erion.
Original comment by er...@erion.info
on 25 Apr 2012 at 10:10
Hi,
it doesn't work.
I can't find a solution, so if somebody could try it and post his/her solution
it would be great!
Thanks!
Regards,
Jorge
Original comment by Alvjo...@gmail.com
on 4 May 2012 at 1:18
In 'sendByte' function, when the it calculates the checksum it has to be:
"checksum = 0xff - (checksum & 0xff);"
But communication still fails!
Original comment by Alvjo...@gmail.com
on 11 May 2012 at 11:25
Could not reproduce
Original comment by andrew.rapp@gmail.com
on 2 Feb 2014 at 6:58
try to give xbee 3.3 from different source, but common the ground of both
sources.
It will work perfectly..
I faced this issue many times and the solution worked for me.
If powering from same source a little googling could tell you to ad some
capacitor or resistor on VCC DOUT of xbee ...
search for it.
Original comment by mohammed...@gmail.com
on 1 Apr 2015 at 9:16
Original issue reported on code.google.com by
eelmasllari
on 21 Mar 2012 at 6:01