Delay between bytes

I have 2 xbee modules (, coordinator and router. Both are in API mode. They communicate fine, but the problem is that if I send bytes to serial port in a row (without delay) xbee module does not react at all.
If I put delay between bytes everithing works ok (1ms and more). Why?

Sounds like the data you are sending is not either complete API frames or you are not observing the Guard time of silence on the UART.

Hi mvut,
I’m sending payload 0x0A from router to coordinator. The API frame is 7E 00 0F 10 01 00 00 00 00 00 00 00 00 FF FE 00 00 0A E7. The baud rate is 9600, so 19 bytes sould be sent in about 19ms, but they are sent in 38ms because I have to put delay 1ms between bytes. Without delay xbee does nothing (no action, no response).
If I’m not mistaken the Guard Time is available in AT mode. How can it help?

That would be 19 ms on the UART only. That does not include any RF patronization or transmission or reception time. This process does add some delay. Are you taking that into account?

Yes guard times can be seen as entering command mode but they are also used between packets to allow the device to understand that you have finished sending a packet.

I don’t consider patronization, transmission and reception. I’m looking at UART only, as it is a bottle neck. If the higher baud rate is set the delay between bytes can be reduced proportionally (1ms delay for 9600, 500us for 19200, 250us for 38400 and so on).

I tried setting different values for GT and putting time lapse between packets. Useless…

At best, you can only achieve up to 30kbps over a signal hop with an XBee ZB module and ZigBee mesh network with additional latency needed for the rout discovery, packetisation and transmission of the data. That is where your really latency is going to be. Increasing the baud rate to above 9600bps really isn’t going to do much at all.

GT is a value that would be used for entering AT command mode and is not used in API versions of the firmware. So when using API mode, GT should not be used or adjusted in any way.