Irratic communication results with XStream-PKG

I’m try to write a C++ class to connect, configure and communicate with the 9XS USB 9.6kbs Radio Modem and have been having a number of frustrating intermittent problems with the command mode. Ideally I would like this program to be cross platform, but for now I’m just trying to get it to work on Windows XP and 7. So far I have successfully sent commands and received responses using both binary and ascii modes, but sometimes I get either no response from the modem, or it sends back garbage data. Sometimes disconnecting/reconnecting the modem fixes the problem, sometimes not. I have tested this on a number of modems, some with different firmware and still have the same problems.

My question is: The X-CTU utility never seems to have these problems so can anyone show me some source code example of how it communicates with the modem? Is there an already existing code library available? Any help would be much appreciated.