Hi, Now I'm trying to get the cellular shield to connect to a TCP server in order to transmit the data to it.But I can't get the TCP server connect. May I know is the code below have problem or the problem is from the TCP server?

points to localhost, i.e. to the same module that is initiating the connection. The error is detected only when the modem actually tries to initiate the connection, in the command that follows. You should try with the address of an external (public) host.

So the address of the external host is my laptop own IP address or the IPv4 Default Gateway adddress?

I'm afraid none of them. When you use GPRS the packets travel on the cellular network, not WiFi, not your home network. When you connect to your APN (the address of the provider of the GPRS service) you are on the public Internet. You should start with some well-known public address (e.g., google.com), just to see if the rest of your code works as expected.

Then if you need to "re-enter" your home network you'll have to configure your router to allow port forwarding towards your laptop (if that is your target server). It may also be convenient to use a dynamic dns service to address your home network using a name instead of its IP address.

Hi, be careful of the order and meaning of the errors (google for them). CME error 28 means that the provider is not authorizing the connection, but CME error 4 is a sort of syntax error, and in your case is most likely due to the absence of the port number in the command. So

I need to do something similar to what the OP wants: To send a string of data to a remote server (HTTP PUSH in my case) and I have a random question w.r.t this whole "design".

Does the GSM / GPRS provider need to allow HTTP through their network for it work work properly? I know that if they don't, it won't work, but are there certain GSM / cellular providers who don't allow HTTP PUSH through their networks?

If that is the case though, how else would one be able to send info from an Arduino to a remote server, if USB / Wifi / Bluetooth isn't an option at all? i.e. from an Arduino which is hundreds or even thousands of miles away from the server that needs to get the data?