how to send and receive data in 1 program on xbee s2

how to send and receive data in 1 program on xbee s2 series?
1 xbee send and receive, 1 other send and receive too
thankz

While the radios are capable of bidirectional communications, it is fully your control on which side sends and which side receives. Simply put, if you don’t provide the DI line with Data, than it can’t send.

thankz for your answer…but sorry…i don’t understand…my project is 2 xbee s2 and arduino uno…and i want to send data between xbee 1 to others in api mode…the point in here is MQTT-SN (Message Queue Telemetry Transport - Sensor Network)

From the sounds of it, you don’t know how to send and receive data from your Arduino is that correct?

sorry for my english…
i have successfully send and receive data in arduino, but i want to create mqtt in arduino with xbee s2 as a communication

may I know your email?
please… i want to share my sketch but this sketch in nrf

I think you are on the wrong site. What you want is help in writing Code for your Arduino. This site is for help with XBee modules.