Move From Socket to PPP frames


I am with Open AT V3.01 ,Q2406B and v650.
My Embeded Adl Application works fine with Socket.
Basicly I
do configuration,
AT+CGATT=1 Attach
ed_DialupConnectionStart() in GPRS
ed_SocketTCPStart(…) and I get ED_INFO_WAITING_FOR_DATA
and I can exchange the data and close the Socket.

Without my embeded application, from HyperTerminal when I do
I get CONNECT and PPP frame form the GSM Operator and in this case
I can use Windows RAS to connect to the Internet.

How can I connect from my embedded application to the GSM Operator exacly like Windows in PPP mode.
I only need a PIPE to my GSM/GPRS operator so that I can send everything that comes from windows to the operator and back but I can keep monitoring the data.

I tryed to Attach and then

GprsFlowHandle = adl_fcmSubscribe ( ADL_FCM_FLOW_GPRS, Gprs_FlowCtrlHandler, Gprs_FlowDataHandler );

but I am not getting any Frames from the network.
I get in debug
PPS: Wrong UART Specified: 3 and it Boots.

If I adl_fcmSubscribe(GPRS…) after ed_DialupConnectionStart I get
error that it is allready subscribed.

Do I have to use ed_PPP… but once I am attached and ed_DialupConnectionStart() and connected how can I exchange data
without Sockets ???

Thank you.

Hello Sladjan,

Since you are using the TCP(IP stack in Windows you could skip the ed_ stack and use only “Basic Open AT” API

Use the GPRS API and the FlowControlManager API.


Unfortunately I can not do that because some thimes I do need My
Socket Application. What I need is like the …adl/duplex_data form the Open At saples but with Gprs and not the GSM.

I think that I can not mix Adl and Basic Open AT ???

Any idea how I can use

There must be a way to open just a GPRS PIPE on the network from
the embedded application ???

Thank you.

Please answer, it is important !!!

  1. In Open AT ADL user Guide, page36 FCM Service, we can se that
    I should be able to open the flow with 2a and 2b which is Gprs layer 2 I think, that what I need but it does not work, is it possible ???

  2. My embeded application have only one line, ed_init() and when
    I AT+CGDATA=1 I get in the trace
    CONNECT 1200
    Wrong UART Specified: 3 and the modem Boots.
    Can you confirm that I can not do Interent with the windows when my
    embedded application is +wopen=1 and when it has only this line?

If I use Basic AT that would solve this problem but I would have to write my own TCP/IP stack for Sockets, that is a big job …

There must be a way to do Internet with windows without +wopen=0 !!!
Is there something in Open AT V3.02 and wavecom firmware V651 ??

Thank you, I can not tell you how this is important for me …

Hi sladjan,

   The above syntax would not work because eDlibrary internally subscribes to GPRS flows to receive data (from the GPRS connection). As you know GPRS flow can be subscribed only once. Hence, when you call ed_DialupConnectionStart (), the internal GPRS subscription (by eDlibrary) would fail. Hence, you will not be able to make any GPRS connection.
  1. The same condition applies when you try to subscribe to FCM for GPRS flow after calling ed_DialupConnectionStart () API. In this case, you receive ADL_RET_ERR_FLOW_ALREADY_SUBSCRIBED.

To view the data that is sent and received from Windows, you can create an Open-AT application without using eDlibrary. In the Open-AT application , you subscribe for GPRS (using adl_gprsSubscribe ()).
When you receive ADL_GPRS_EVENT_ACTIVATE_OK in the GPRS callback handler, subscribe for FCM flow for GPRS. This is because GPRS FCM flow is subscribed only after the context is activated. Compile this application for target mode and execute this application.

Now for making a GPRS connection, use the Windows Dialup Connection. You can use the string 99**1# (as the number to dial) in the dialup connection settings. Give your username and password in the username and password fields for the dialup connection. Before making the connection, you should execute the following commands in hyperterminal:

  1. AT+CGDCONT=1,“IP”,“yourapn”
  2. AT+IPR=0
  3. AT&w

Now you dial using Windows DialupConnection. (Note that the number to dial should be 99**1#). When windows dial this number internally, it is changed to AT+CGACT, AT+CGDATA commands by the modem.

From now, when your GPRS connection will activate, your GPRS handler will receive ADL_GPRS_EVENT_ACTIVATE_OK. And as coded, your embedded applciaton will now subscribe to GPRS FCM flow.

From now onwards, whatever is received in the GPRS will also come to the GPRS handler. To check what is sent by Windows, you can use applicaitons like Port Monitor etc.

Do remember to return TRUE from your data handler and control handler for GPRS FCM flow. Here you can keep in mind that you do not have to code the entire IP stack.


Thank you very much OpenAT_Fan,

I understand that With Basic Open AT I can monitor Gprs Data exchanged with the Windows.

My MAIN GOAL is not to monitor windows data.
My main goal is to use ed_Sockets.
My embedded wavecom application exchange simple data over GPRS useing wevecom Tcp/Ip Stack and sockets.
I need sockets but when windows sends ATD99**1# my embedded application will not interfere in any way, I do not need to see data exchanged at that time, I can even Unsubscibe everything that I Subscribed, I just want windows to connect normally to local ISP and my emmbeded application will resubscribe when windows Hangup.

Unfortunately, I notice that when my embedded ed application is runing
Windows CAN NOT connect to local ISP. The modem boots on ATD99*1#
Is there any solution to make ATD
99***1# work while the smallest possible ed application is working …

Thank you very much for your effort.

Hi Sladjan,
For the scenario described by you (Open-AT applicaiton using eDlibrary when a connection is to be made using Windows), you can do the following steps:

  1. In the Open-AT application, subscribe to call services.
  2. When Windows issues ATD99**1# (by using dialup connection), your embedded application will receive ADL_CALL_EVENT_SETUP_FROM_EXT.
  3. In this event, close the already made GPRS connection (by calling ed_DialupConnectionStop () API).
  4. Issue AT+IPR=0 command internally from your Open-AT applcation.
  5. Now your Windows connection will work fine.
  6. However, make sure that you do not send any response to the external application (PC) after you issue ed_DialupConnectionStop () API. This is because, any extraneous character might confuse the Windows Dialup Connection.


Unfortunately, It does not work …

I call ed_DialupConnectionStop () , It does close the GPRS connction but
when I type ATD99**1# I see in Target Monitoring Tool
Wrong Uart Specified: 3
And it Boots.

As I said before, if you have only this in your main function

void adl_main ( adl_InitType_e InitType )
s8 r;

r = ed_Init();


then you can not do ATD99**1# it boots.
I am with Open AT V3.01 and firmware 650a09gg


I tryed the 651 version with the same embedded application and
IT WORKS… with one +CME ERROR: 3 in middle.

I have to install and recompile with Open AT V3.02 but I think that it will
work fine.

Thank you OpenAT_Fan …