Problem with conversion into GRPS packets


#1

hi,experts.
i am thinking how to encapsulate a data into GPRS packets and transfer them on GPRS.
i dont know ,is there a function in the embedded software library ,which is responsible for the conversion.if ang,where and what is the name.Aother problem is when i execute sample Ping_GPRS,the return value is ADL_GPRS_EVENT_ME_UNREG.i am puzzled.
regards


#2

hi,i am also studing GPRS dada transfer.and i face the same problem .i dont know how to encapsulate a data into GPRS dada packets.i am looking forward the reply from experts.
regards


#3

hi,experts.
i am in desperation.
i hope some one give me some suggestions or recommend me some books to read.
regards.


#4

Hi,
The data that is transferred over the GPRS network is in the form of IP packets. You cannot transfer raw data over the GPRS. Hence, to be able to send/receive data from the GPRS network it has to be packged in IP packets.
Hence, you need to implement the complete IP layer functionality in your Open-AT application.

You can also use the TCP/IP library plugin (eDlib) that is provided along with the Open-AT SDK. This library is present in /otherlib/TCPIP folder in your Open-AT directory (where you installed Open-AT). This library provides you APIs which can be used to send data over the GPRS. In this case, the eDlib encapsulates the data in IP packets and sends it over the GPRS network.
Please refer to the user guide for eDlib for more information on the APIs that are available (the documentation is present in /otherlibs/TCPIP/doc folder.

You can refer to the 3GPP specs to find out the internal working of GPRS and also to check how to send data over the GPRS. You can also search on google.com to find out how the data is sent over the GPRS network and get an overview of working of GPRS.

The PING sample is giving you error ADL_GPRS_EVENT_ME_UNREG. In such case, you should refer to the ADL user guide (present in the /openat/documentation directory) to find out the cause of problem.
However, in this case, the error means that your module is not connected to the GPRS network.
It means that you have not given the AT+CGATT=1 command (to attach to the GPRS network) before giving the custom comands which are subscribed by the PING sample application.

Hence, the proper way to execute the PING sample is:

  1. Give AT+CGATT=1 command.
  2. Set the APN parameters, Username and password etc using the AT+GSET command.
  3. Use AT+PING command to send the ICMP ping echo requests.

Hope this solves some of your problems.
Best Regards,
Open AT Fan.


#5

hi,again,
when i use at+CGATT=1,the value i get is
+CME ERROR: 148

+CGREG: 2

+CGREG: 0
oh,there is a thing that has to be clear.now i dont have a GPRS card.i only have a SIM card.
does the absence of GPRS cards cause the error,or something else?


#6

Error codes are described in the document “Appendixes to AT Commands Interface Guide”
P_AT_Commands_Interface_Guide_for_X51a_Appendix_rev006.pdf

Unfortunately, it just lists CME Error 148 as “unspecified GPRS error” :frowning:

I’m not sure what you mean by that?

The GPRS capability is a function of the modem (or module or phone or whatever);

The SIM card is what identifies you as a customer of the network for the purposes of billing, call routing, etc.

Depending on your particular subscription to the network, you may or may not be allowed to use GPRS - you need to check this with your service provider.


#7

hi,thank you,
i dont know why ,when i execute the Ping_GRS sample .it always returns the ME unregister.do you face the same problem ,when you execute the sample ? this morning,i apply for the service and now ,i am allowed to use the GPRS service .but the problem is still here .now,i am desperated , i hope some one can help me and i am looking forwards his coming.
regards!


#8

Hello junjie,
Please make sure that you have GPRS feature activated on your SIM card. The most common reason for receiving +CME ERROR : 148 as a result of AT+CGATT=1 is that you don’t have GPRS activated on your SIM card. Also, you need to have an access point name (which specified a node in the GPRS network which will assign you an IP address), a username and a password. So, when you activate your PDP context over the GPRS session, you will receive an IP address only when you have a valid APN, username and password strings.

Please contact your service provider to give you these values. After you get these values, you can perform the following test to check if you have got your SIM enabled for internet access.

  1. Close any Open-AT application that is running.
  2. Give AT+CGATT=1 command. If this command gives you an ERROR or CME ERROR, it means that GPRS attachment itself is not enabled on your SIM. Contact your service provider in this case.
  3. If CGATT gives you OK, the give AT+CGDCONT=1,“IP”,"" where is the access point name that you service provider has given you.
  4. This command will give you an OK.
  5. Now give AT+CGACT=1,1 command. If this command too gives you an OK, then give AT+CGPADDR command to check if you have a valid IP address. If AT+CGACT=1,1 gives you an error, it means that the service provider for the SIM has not enabled internet access on your SIM card.
    Contact your service provider again.

I think it is now clear, how to get the APN, username and password.

Now, follow the following steps to test the PING_Gprs appli:

  1. Start the application and give AT+CREG=1 command. Wait for +CREG: 1 indication which will tell you that you are now registered to the GSM network.
  2. Give AT+CGATT=1 command.
  3. Give AT+GSET command to set the APN, username and password. Please refer to the documentation provided along with the sample (ping_gprs.html) to check how to give this command and its parameters.
  4. Now give AT+PING command (after referring to the help file).

This will help you send ping requests to the specified destination.

Hope this helps,
Best Regards,
Open AT Fan.


#9

hi,OpenAt_fan ,thank you
i have run the Ping_GPRS sample following the steps you said.now i have got more about OpenAt .but maybe i am too stupid to live on IT industry.i cannt still execute the sample correctly.no matter what APN i set ,the system will return ERRER at the first time and OK at the second time .hi,
OpenAt_fan ,would you mind sending me the screen of the terminal emulator?
another problem is how to send a data over GPRS.i have searched on google.com but nothing useful i got.so i want to recommend me some books and tell me the general idea and the steps.
regards.


#10

Hi, staying with the theme of the ping example. Running the application is no problem but getting any response from the ping requests is proving to be a problem.

I start the application and set the APN ect the try to ping an address using the AT+PING= I have used 66.249.93.99 (Google.com) I have made sure that this address responds to pings using utility ping. It does.

I have also tried various setup for APN PASSWORD… to no avail. The sim card is activated and I have used it in my phone to ensure everything is working.

All I can get is “ping wait to long” if anyone has any ideas where I am going wrong please let me know. Terminal responses list below.

Thanks for your help. :slight_smile:

[color=green]at+gset=“pp.vodafone.co.uk”,“web”,“web”
OK
at+ping=1,“66.249.93.99”
OK

IPCP Information :
Local IP 10.92.128.120
DNS1 172.29.1.11
DNS2 172.29.1.11
Gateway 0.0.0.0

Ping Sent

Ping wait too long

Ping Sent

Ping wait too long

Ping Sent

Ping wait too long

Ping Sent

Ping wait too long

Result : Ping Sent 4 , Resp Received 0

*****Second Attempt ************************

at+gset=“pp.vodafone.co.uk”,“wap”
OK
at+ping=1,“66.249.93.99”
OK

IPCP Information :
Local IP 10.178.125.144
DNS1 10.203.129.68
DNS2 10.203.129.68
Gateway 0.0.0.0

Ping Sent

Ping wait too long

Ping Sent

Ping wait too long

Ping Sent

Ping wait too long

Ping Sent

Ping wait too long

Result : Ping Sent 4 , Resp Received 0

******* THIRD ATTEMPT *************
Ping Appli is started
at+cgatt=1
OK
at+gset=“pp.vodafone.co.uk”,“web”,“web”,“212.183.137.012”
OK
at+ping=1,“66.249.93.99”
OK

IPCP Information :
Local IP 10.160.1.64
DNS1 10.203.129.68
DNS2 10.203.129.68
Gateway 10.160.255.254

Ping Sent

Ping wait too long

Ping Sent

Ping wait too long

Ping Sent

Ping wait too long

Ping Sent

Ping wait too long

Result : Ping Sent 4 , Resp Received 0


#11

Hi junjie200801,
You can refer to “GPRS by Regis J Bates, McGraw-Hill Telecommunications (2002)” for all the details that you need for GPRS communication. This book will also tell you about the protocol stack that is used in GPRS network.
You can also refer to the AT command interface guide and try experimenting with the commands. I tell you here the commands which you should try and experiment:

  1. AT+CGATT.
  2. AT+CGDCONT
  3. AT+CGACT
  4. AT+CGPADDR
    Please refer to the AT command interface guide for more information on what these commands do. Then try to correlate these commands. Using this, the concepts will become pretty much clear in your mind.

Hi Michael,
Please make sure that your SIM card supports internet connectivity. You can do this by checking if you can browse some internet web-sites. If you can browse, then it means that your SIM card has the capability to browse, but there is some problem in the sample application.

In this case, use the APN which allows you to browse the internet (using AT+GSET command) and also check out the source code of the application. Find the function called “SendPingPacket”. This function sends PING packet on the GPRS flow and then starts a timer. This timer is the one which provides a timeout. The timeout value of this timer is 1 second (value of ping_Time is 10). Increase this timeout to 5 second (by changing the value of ping_Time to 50). Now see if you receive the ICMP echo replies. (Ping responses).

Hope this helps.
Best Regards,
Open AT Fan.


#12

Sorry I should have stated that I had already checked the sim card and that the timer was up to 10 seconds in desperation. The APN,UN,PW and fixed IP are all as per my working connection. :blush:

I am not sure if there is a problem with the sample provided, the code looks to make sense, I am using V3.01. Using the monitoring tool is proving a problem with this application and it just appears to lock up. I know that this is possible when switching flow as stated in the manuals, I am using the recommended baud rate 115200.

I will endeavour to find the problem, obviously if you have any further ideas let me know. Your help is much appreciated.

Regards Mike.