Sending data through GPRS

HI,
I am trying to send data through gprs, this is are the steps iam following,

1.adl_fcmSubscribe
subscribing gprs by making
flow = ADL_FCM_FLOW_GPRS
(my need requires sending data through gprs, where the data is stored in some memory location after the same from uart.)

  1. adl_fcmSwitchV24State() // For making v24 in data state.

  2. adl_fcmSenddatat() // for sending data from which memory location.

4.adl_fcmGetStatus // for deciding direction of data.

Please suggest me whether this approach is ok, or i need to use “direct access” for configuring gprs.Please give me a fair idea regarding sending data through gprs.
As i am newbie , please take this consideration while giving your valuable comment.

Remember that the ‘P’ in “GPRS” stands for “Packet”, so you must use a packet protocol over GPRS - most probably IP.

Unless you plan on writing your own IP protocol stack :open_mouth: , you will need to use WIP…

Thanks awneil .
Please comment more regarding wip. If you have sample code regarding this or a link kindly send it.

It is part of the SDK - complete with documentation & examples.

awneil,
Is it possible for using flow control manager(fcm) for 2 devices at same time.(i mean using fcm for uart and gprs at same time).

My need is to read data through uart2 store it in memory, then send it through GPRS. I want to use fcm for uart2 and “direct access” approach for gprs.The sample code in sdk i.e ping.c uses fcm port for gprs as well.

Yes.

The only restriction is that you can’t use both GSM and GPRS flows simultaneously - this is clearly documented in the ADL User Guide.

i am following this method for sending data through gprs,

1.subscribe to gprs, using
a.adl_gprsSubscribe.
b.write GPRS HANDLER.
C.used adl_flhSubscribe, adl_flhGetIDCount etc.(for storing the parameters on flash).

2.subscribed to Channel using
a.adl_fcmSubscribe.
and also i wrote Control handler and Data handler.
(used the one mentioned in ping.c)

3.My idea is to establish a socket connection(tcp socket) making my q2687 module as Client and my pc as server.
For that i may have use WIP(wavecom IP).
When ever i need to send data or read,if i use wip_write/wip_read,will that work.

Hey,if any one is having sample code for reading and writing data through gprs,can you PLEASE send to me.

Hiya,

Look at the WIP samples - specifically the TCP Client and TCP server examples.

ciao, Dave

hi,
the following is the response i got,can you guys please tell what this ,GPRS EVENT:27, indicates.My code is unable to send data through gprs,the tcp client gets closed after 20sec.

at+wopen=1
OK
+WIND: 13
+WIND: 1
+WIND: 16
+WIND: 4
+WIND: 10,"SM",1,"FD",0,"ON",0,"EN",0
+WIND: 11,"6B8A187A13BF2F31F43141FEB2BE18A3",,,,"221522B691F639DC486CB36172B5B131","D881943C8851754F69260DAA8CA7B948"
+WIND: 15,4,"09/11/02,09:20:10+22",6,"0"
+WIND: 7
[GPRS]: open: -> DISCONNECTED
[GPRS]: start: -> CONNECTING
[GPRS]: GPRS EVENT SETUP OK (cid=1): GPRS activate
[GPRS]: GPRS EVENT: 27 (cid=1)
+WIND: 15,1,"Airtel",2,"Airtel",3,"+22",4,"09/11/02,09:20:15+22",6,"0"
[GPRS]: GPRS EVENT ACTIVATE OK (cid=5)
[GPRS]: GPRS: -> CONNECTED
[SAMPLE]: connecting to client 122.166.17.123:5050...
[WIP] new TCPCLIENT 0x180c5a0c
socket created
+CMTI: "SM",4
+CMTI: "SM",5
inside the events handsler[SAMPLE] Error -986 on socket. Closing.
[WIP] closing TCPCLIENT 0x180c5a0c
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 28 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)
[GPRS]: GPRS EVENT: 27 (cid=5)

hi,
for server code i have a tcpsocket running on my local machine,do i have to make any special settings so that my module gets communicated with server socket.

:smiley: .Thanks to all of you for your valuable comments,as iam able to send Data through Gprs.

I have the same problem as you, can you share with your code here? I can send data through GPRS, but i have problems with read/write memory in q2687 and in receiving data from UART (may be it’s just because i have only UART1).

Why do you say it’s the same problem?

So you don’t have the same problem! The problem was, “Sending data through GPRS” - if you can do that, then you obviously don’t have that problem!

Those are completely separate from sending data over GPRS - or any other bearer, for that matter!

  • Reading/Writing memory always works the same way irrespective of what data you’re reading/writing, where it came from, where it’s going to, how it gets there, or what it means!

  • The UART always works the same way irrespective of what data you’re sending/receiving, where it came from, where it’s going to, how it gets there, or what it means!

You need to see these as separate “modules” - get each working on its own, then bring them together;
Or, start with one, then add one, then another, etc…

This is a standard way to build any complex system.

That is my problem.

Yes, I’m understand this, but I have troubles with RTOS understanding. Every time when I get event I must do something.
Lets have a look at simple algorithm (geting data from UART and sending it through GPRS):

My first events generated on adl_simSubscribe( evh_sim, PINCODE ). Than I switch my UART1 in data-mode and when it receive some data it generate new event. Correct?
Whan it happens UARTDataHandler (u16 DataLen, void * Data) will be called automatically. Correct?
In the UARTDataHandler I must call adl_gprsSubscribe to establish connection and than send my data. Correct?

But on UART1 I allready have new data and my cycle starts again without sending old data. Were is my misstake?

This has nothing to do with the current thread!

You need to start a new thread with your new question.
Before posting, think carefully about which section of the forum to use…

You might like to take a look at this article about the general principles of event-driven programming: viewtopic.php?f=9&t=4208

i have problem to send data using GPRS can anyone help me?

thank’s

I have a problem with my car - can anyone help me?

:smiley:

wanders off to find his crystal ball