New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send issue #27
Comments
Just some things to try:
SoftwareSerial is half-duplex, which can cause problems. Hardware is best,
That sizeof() is definitely not right :) Maybe rx.getFrameDataLength() On 7 April 2016 at 22:25, PreciousRoy0 notifications@github.com wrote:
|
about the serial connection... The uno only has one serial port and i need a way to debug. so i changed the code to this as per your suggestion. where instead of sending the data back i just send the word hi.
But i am still not receiving the data so i will do some more test and get back to you. Edit:
If i manually add the address like shown in the TX example the frame generated is not even a valid frame
when i manually make the frame i get the problem i can see is that the SH (high part) the code for making the address is
|
Ok after some more debugging, when i edit the sendByte function and only send the byte data the code works just fine. and i receive the data on the other side.
can someone tell me what exactly those lines of code do? and why my setup is wrong/not working? |
Ah. Good work. You need AP to be 2 in the Xbee configuration. That's what that line is implementing. You still need to change sizeof () in your code. Ok after some more debugging, when i edit the sendByte function and only void XBee::sendByte(uint8_t b, bool escape)
} can someone tell me what exactly those lines of code do? and why my setup — Reply to this email directly or view it on GitHub |
Thanks davidsainty: that did indeed fix my problem. i could not find it so it might not be mentioned but it could be a good idea to have the settings for the xbee mentioned somewhere that would of saved me a days work. thanks again for the help ;} |
@PreciousRoy0, you mean something like here, under "Configuration"? https://github.com/andrewrapp/xbee-arduino#configuration |
Hi, I’m using the following code to send a “Hi” message. I will really appreciate some help or guidance on what I might be doing wrong. Thanks
|
7E 00 7D 33 10 01 00 7D 33 A2 00 40 DA 9D 23 FF FE 00 00 48 65 6C 6C 6F 6E I get the impression you've got some kind of serial-level framing issue What baud rate are you using? And is the chip using a crystal, or is it On 5 June 2016 at 23:27, jortronm notifications@github.com wrote:
|
Hi David, |
I think the internal clock is not precise enough for serial timing. I You could try calibrating the internal clock, but if you want to prove it
|
I will give the crystal a go. thanks |
Suraj151 i have no idea what thy do exactly, i image it accounts for some kind of mode. can you post in code! your basic test code so we can have a look how you set it all up. |
no i mean look at the first post in this thread, i give the most basic implementation of failing code, your code not lib code that shows how you set it up, and your xbee settings can also be helpful |
Hello evening friend, well i will share my both end code....its not Echo type..mean we can made it by program...i m just sending sample text from coordinator (arduino) and i get it on end device (PC). #include <XBee.h> uint8_t ssRX = 8; XBee xbee = XBee(); char payload[] = "Hello End Device"; XBeeAddress64 addr64 = XBeeAddress64(0x0013A200, 0x41241CB2); ZBTxRequest Tx = ZBTxRequest(addr64, payload, sizeof(payload)); void setup() { void loop() { if (xbee.getResponse().isAvailable()) {
} else if (xbee.getResponse().isError()) { on PC terminal we can see received msg.... |
it seems to look ok, i would make some changes though. |
well, no matter i have done enough example with this library....sure we can make it best |
Hello,
i have been spending the last day or so trying to get my 2 (soon to be 3) xbee pro S2B to communicate with each other. in AT mode that works fine they both can send and receive.
when in API mode the Coordinator(PC) can send message to my router(arduino) node and it receives just fine, but when running the TX sample code it keeps on failing.
so i decided to edit the receive code to echo back anything it gets. but coordinator(pc) does not receive anything back. do any of you know what could be my problem?
The settings for the xbee's are:
Coordinator:
and node:
Edit: i know i have setup my xbee correctly, because if i switch them now the router(PC) can reserve data and the coordinator(arduino) can not send
Edit 2: if i manually make the frame and send it directly to the serial connection it works just fine. could there be a bug in the frame making part? is there a debug function that i can call to see what the actual frame looks like?
The text was updated successfully, but these errors were encountered: