Sorry, I don't think I fully understand the logic from your answer:
Let's consider a scenario where new records are being generated and sent and I have a chain of GPRS commands that I want to send to the device.
In this case should I:
1. establish the connection with the device and receive its IMEI
2. Send ACK back to acknowledge the receipt of IMEI
3. Then start sending GPRS commands and ignore any records coming in? Or at this point I need to receive records first and acknowledge it?