Hi Anthony,
After this problem, the library for communicating with the XBee module over UART was completely rewritten, so I don’t know the exact cause of the hangs then.
However, the few days ago I encountered that the AS(Active Scan) command sometimes fails to respond and after that the response to AS is always with an error code. I described this issue here. I think in this case there was the same error, but at that time I didn’t know how to keep track of such situations.
Now I am testing a new solution - when there are many errors in a row for AS command, I send FR(Software Reset) command and wait for module reset. So far it works, but I would like to know the exact cause of such behavior of AS command.