For your Information:
Class B means --> The module can connect to both GSM & GPRS networks one at a time.
Class CG means–> The module only for GPRS networks.
Class CC means–> The module activate only for GSM network like CSD calls.
For your case: put your module in classB mode,
then AT+CGREG?
CGREG:0,1
OK
Thanks for your input. After setting the Modem in Class “B”, I am able to establish the connection.
I have tried with UDP and TCP Client. I am sucessfully receiving the data over UDP Client. Where as I am not able to see any data over tcp client.
I have received the following log in the terminal
+WIND: 3
[GPRS]: open: -> DISCONNECTED
[GPRS]: start: -> CONNECTING
[GPRS]: GPRS EVENT SETUP OK (cid=1): GPRS activate
[GPRS]: GPRS EVENT ACTIVATE OK (cid=1)
[GPRS]: GPRS: -> CONNECTED
[SAMPLE]: connecting to client 122.165.48.88:2000…
[WIP] new TCPCLIENT 0x180c7548
[SAMPLE] Connection established successfully
[SAMPLE] Can send more data
[SAMPLE] Wrote 5840 bytes. 2749 bytes left to send in snd_buffer
[SAMPLE] Can send more data
[SAMPLE] Wrote 1072 bytes. 1677 bytes left to send in snd_buffer
[SAMPLE] Can send more data
[SAMPLE] Wrote 1072 bytes. 605 bytes left to send in snd_buffer
[SAMPLE] Can send more data
[SAMPLE] Everything has been sent, won’t send more.
I would like to know how to flush the data over socket?? Right now i am not able to see any data received through tcp client.