xbee-arduino icon indicating copy to clipboard operation
xbee-arduino copied to clipboard

Ack packet from receiver

Open victors0991 opened this issue 6 years ago • 9 comments

I have two xbee s2b one coordinator and one router. I want to know if there is a way that receiver send ack when receiver recieve data from transmitter. ?

victors0991 avatar May 19 '18 18:05 victors0991

Yes, actually it's automatic. After sending data via a ZigBee Transmit Request frame (see ZBTxRequest) the transmitter will receive a ZigBee Transmit Status response frame (see ZBTxStatusResponse), which includes among other things, Delivery Status. Spend some time with the XBee User Guide and with the documentation for this library. It's all there but be patient there may be a bit of a learning curve if you're new to this sort of thing. Page 126 in the XBee User Guide explains the Transmit Status frame.

JChristensen avatar May 20 '18 00:05 JChristensen

Yes I tried and its work. I have a last question. I have a problem now because xbee is booting faster that arduino so when xbee transmiter send data to xbee receiver, so xbee receiver replay with ack but that data never go to arduino because it is booting so I put power of xbee into digital pin in arduino so when arduino is booted so send power to that pin and xbee power and but that is not work because xbee is power but with a little voltaje becausd xbee's leds are power up but not brigther than when I send voltaje to xbee so how do can I do in order to power up xbee when arduino is booted. My xbee is in router mode

victors0991 avatar May 20 '18 01:05 victors0991

If only a small amount of data is being sent, the XBee should hold it in a buffer until the Arduino reads it.

It's a bad idea trying to power the XBee from an Arduino pin, it is not capable of supplying sufficient current to properly power the XBee. This could potentially damage the microcontroller. Also beware if the Arduino operates on 5V because the XBee is a 3.3V device and too much voltage will damage it.

I might use the XBee's reset pin. Hold it in reset until the Arduino is ready to talk to it. If the Arduino operates at 5V, a small level-shifting circuit will be needed to connect to the XBee reset pin.

JChristensen avatar May 20 '18 01:05 JChristensen

My xbee have a shiled that take care about how many voltage it recieved for that reason I connect directly to arduino but when arduino power up, xbee power up but leds are less brigther than when I power up xbee using usb

victors0991 avatar May 20 '18 01:05 victors0991

Right. The LEDs are not as bright because the Arduino pin cannot supply sufficient current. Hope your microcontroller is OK.

JChristensen avatar May 20 '18 01:05 JChristensen

Yes, me too. But if I use reset pin of xbee, I will erase all configuration and that I dont want to use. Is there any way to make xbee wait until arduino is booted?

victors0991 avatar May 20 '18 01:05 victors0991

As long as configuration changes have been written to non-volatile memory, a reset will not erase them.

JChristensen avatar May 20 '18 01:05 JChristensen

I will try. I read the xbee-arduino library but what means xbeecallback function? If it uses when we want something to return?

victors0991 avatar May 20 '18 03:05 victors0991

And what happen when retry values on xbee is reached? If i write 2 retries, what happen next?

victors0991 avatar May 20 '18 03:05 victors0991