Sendind DATA through GPRS

Well I noticed the erros on the code and I´m fixing them.

I have to call my Service Provider to see what IP should I use instead of the 255.255.255.255.

What if they don´t provide it? Any other way?

I put the code from the HTTP_Request function inside the ed_DataRequest function.

I tryed the code with the 255.255.255.255 above and the ed_DataRequest function haven´t been called yet. I think it wouldn´t anyway because of the IP.

Just to confirm, the second parameter of ed_SocketTCPStart () must be 0 instead of Listen for a Client configuration, right?

This is it for now.

Thanks once again!

I wish you and all open at forum members a Happy New Year too!

Hi Henrique,
I am not sure whether you have completely understood my reply. You don’t need to contact your service provider to provide you the IP address. The IP address for the TcpServ parameter is the IP address of the web server with which you want to make the TCP socket. Over this TCP socket your HTTP request will be sent and the response to the HTTP request (HTML page) will be sent back.

You can try to search on the internet the IP address for the server to whome you want to connect (of course some web sites provide you with the facility to get the IP address of a particular web server like “http://samspade.org/”). This IP address should be the TcpServ parameter and then try to open the socket (of course after making the changes which I suggested you earlier).

Hope this will help.

Best Regards.

Hi Henrique,
You can also use the PING utility on your Personal Computer to find the actual IP address of the web server (bb.1asphost.com).
To do so, just make sure that you are connected to internet and try to ping the web server (i.e. PING bb.1asphost.com). This will give you the actual IP address of the web server.

You can then use the received IP address in the Open-AT application in the TcpServ parameter.

Best Regards.

Hi everybody! I think I´m almost getting there!

Here´s the problem… seems like the module makes the TCP connection with the server but the server doesn´t recognize the GET request.

The code I´m trying is available at this URL:

http://bb.1asphost.com/bhmais/gps/socket.htm

Here´s what I´m trying to automate:

And the response I´m getting is:

Hello Henrique,

there are two things I have noticed…

  1. I think you are sending the GET… string more than once. The data request handler is called many times so that you can send additional data, so you will need to make sure you
  • don’t send more than the allowed amount of bytes every time

  • don’t repeat things you already sent

In your case all the data should be able to fit into the buffer of the library, so you should be OK to send the whole GET string the first time tcp_pfDataRequest() function is called. Please make sure that you don’t repeat the string on the next call! Just send nothing and wait for the answer…

  1. I would use \r\n instead of \n everywhere in the GET string - that seems to be safer… Also, there should be no line break before HTTP/1.0 - just a space there…

So it would (hopefully) be

wm_sprintf(request,"GET /bhmais/gps/data.asp?latitude=40 HTTP/1.0\r\nHost:bb.1asphost.com\r\nContent-Type: text/html\r\n");

Best Regards,
Jan

Hi Jan, thanks for the reply!

I did the modifications you told me but this time I got no reply from the server.

Here´s the new code (I used a Flag to send the GET Request Only Once):

http://bb.1asphost.com/bhmais/gps/socket.htm

Here´s the log I got:

SOCKETSTART START

 IP_SUBSCRIBE

SimHandler Receives Pincode

SOCKETSTART END

SIMHANDLER START

FIM SIMHANDLER

SIMHANDLER START

FIM SIMHANDLER

SIMHANDLER START

Pin Code OK - Sends CGATT=1 command

FIM SIMHANDLER

CGATT_RESPONSE_HANDLER START

CGATT OK!

CGATT_RESPONSE_HANDLER END

OK

TIMER_HANDLER START

 GPRS CONFIG: (null)

 Trying to Call...

 Stablish IP session with service provider and Receives IP Address

TIMER_HANDLER END

OK

TCP_CONNECTHANDLER START

Local IP : 10.126.88.97
DistantIP: 0.0.0.0Gateway: 0.0.0.0
CONNECT_HANDLER END

TCP_RESPONSECBK START

TCP_RESPONSECBK END
 Sending GET Request FUNCTION

TCP_DATAREQUEST START

TCP_DATAREQUEST END

TCP_DATAREQUEST START

TCP_DATAREQUEST END

at+socketstart=0
OK

SOCKETSTOP START

 GPRS CONFIG: (null)

Trying to ShutDown

SOCKETSTOP END

OK

+CGEV: ME DEACT "IP", "10.126.88.97",3

TCP_DATAHND START

 BUFF even Without Answer: 0

 tcp_pfDataHdn: SOCKET CLOSE

TCP_DATAHAND END

TCP_RESPONSECBK START

TCP_RESPONSECBK END

TCP_CONNECTHANDLER START

CONNECT_HANDLER END

CGATT_0_RESPONSE_HANDLER START

CGATT_0_RESPONSE_HANDLER END

+CGEV: ME DETACH

Any thoughts?

Thanks,

Henrique

Hi! Here´s the last log I made:

It remain that way and no there´s no answer from the server…

Thanks!

Hi again,

I think there is another error in the GET request… Could you try to end the string with \r\n\r\n instead of \r\n. I think there are two line feeds required to end the HTTP headers… If so, this would certainly cause the server not to answer, since the request isn’t complete yet and it waits for more input…

Also, I think you’ll face another problem… I just tried to open the page
66.36.238.51/bhmais/gps/data.asp?latitude=40
and all I got is “No web site is configured at this address.” while
bb.1asphost.com/bhmais/gps/data.asp?latitude=40
seems to work fine.

So that means when the server responds you should at least see something, but it will be an error. You will need to setup DNS and use the domain name instead of the IP to access the asp page. Probably is on some shared hosting plan…

Good Luck,
Jan

Thanks thanks!

Indeed it only works if the IP is associated directly to the domain name.
I tryed on my personal server and it was ok.

As I´m for now using a free hosting plan it won´t have the specific thing said above. Is there any way to avoid it? I mean, is it strict that I need to provide an IP? Can´t it work as Web Browsers who can resolve the IP for itself?

Thank you ALL! Thanks for all the patience!

I´ll be here soon! :slight_smile:

Henrique

Hi Jan, you told me I don´t have to Call “Start_Socket” everytime I want to send some data, right?

Until now I´ve been calling Start_Socket everytime, though I know I don´t have to after Socket connection has been stablished. This way I don´t have parameters to measure precisely time between each data sent.

I´m sending data in the function : tcp_pfDataRequest

But I can only get to this function after a Start_Socket function calling.

How can I make tcp_pfDataRequest available for Data Sending everytime I need?

Best Regards,

Henrique

Hi Henrique,

I think the ed_SocketTCPStart(…) should be enough! This will open the socket and give you access to the handlers… I only use this start function to begin a post to a web server and so far it seems to be all you need…

Best Regards,
Jan

Hi Jan, that´s what I thought! ed_SocketTCPStart(…) solves the problem.

There´s something I wasn´t worried about before but now I am. Transmission time.

Is there anyway to have a precise time control?

I use to call a Timer every 50 in 100ms wich means 10s, right?

I send to server the through HTTP the exactly time the data has been sent.

But this timer of mine only calls ed_SocketTCPStart(…) if the server has returned an “OK” message. This way I have no control of time. Sometimes it takes 7s, 30s, 50s…

Do you have any idea?
ed_SocketTCPStart(…) can´t be called anytime I want, right? I have to wait for somekind of ACK from the server I´m connected to, correct?

Best Regards,

Henrique

There´s this Parameter of Socket: TcpTxDelay

In what it does affect? The time TX has to wait before sending data?
How can I measure that? Socket Sample default is 200… 200 in 100MS as timer uses?

Thanks!

I hope and think the things I´m asking here may help others!

Thanks jan!

Henrique

Jan, I´ve been working on this sample… and everytime I get something working I make a backup of it.

The last change I made was:
Create a Vector with 1024 items of “adl_gpsPosition_t”

#define MAX_BUFFER 1024
#define GPS_MASK MAX_BUFFER-1
u16 GPS_Input = 0;
u16 GPS_Output = 0;

adl_gpsPosition_t GPS_Valores[MAX_BUFFER];

Then I thought about refreshing this vector everytime the GPS polls (GPS_Input).

adl_gpsPosition_t Position;



			adl_gpsGetPosition ( gps_GpsHandle, &Position );

			

			Tamanho1 = wm_strlen(Position.latitude);
			Tamanho2 = wm_strlen(Position.longitude);

			if ((Tamanho1>0)&&(Tamanho2>0))
			{


			   wm_sprintf(GPS_Valores[GPS_Entrada & GPS_MASK].longitude, Position.longitude);
			   wm_sprintf(GPS_Valores[GPS_Entrada & GPS_MASK].longitude_Indicator, Position.longitude);
			   wm_sprintf(GPS_Valores[GPS_Entrada & GPS_MASK].latitude, Position.latitude);
			   wm_sprintf(GPS_Valores[GPS_Entrada & GPS_MASK].latitude_Indicator, Position.latitude_Indicator);
			   wm_sprintf(GPS_Valores[GPS_Entrada & GPS_MASK].UTC_time, Position.UTC_time);
			   GPS_Entrada++;

        }

And everytime I get to send “GET” command to the server the GPS_Output would go after the GPS_Input.

if ((GPS_Entrada - GPS_Saida)>0)
	   {
			GPS_Indice = GPS_Saida&GPS_MASK;

			wm_sprintf(LatInd,GPS_Valores[GPS_Indice].latitude);
			wm_sprintf(Latitude,GPS_Valores[GPS_Indice].latitude_Indicator);
			wm_sprintf(Longitude,GPS_Valores[GPS_Indice].longitude);
			wm_sprintf(LonInd,GPS_Valores[GPS_Indice].longitude_Indicator);
			wm_sprintf(TEMPO,GPS_Valores[GPS_Indice].UTC_time);
			GPS_Saida++;

			adl_atSendResponse(ADL_AT_RSP, "\r Sending GET Request FUNCTION\r\n");

			wm_memset (request, '\0',100); 


			wm_sprintf(request,"GET /grava.asp?latitude=%s&latind=%s&longitude=%s&lonind=%s&ERRO=%s HTTP/1.0\r\nHost:sanabiovilela.sytes.net\r\nContent-Type: text/html\r\n\r\n",Latitude, LatInd, Longitude, LonInd, TEMPO); 
	   

			adl_atSendResponse(ADL_AT_UNS, request);


			len = wm_strlen(request); 

			ed_SendDataExt ( request, len , FALSE, ED_ID_TCPSOCKET_1 ); 
	
			liberado=FALSE;

	   }

Somekind of error occured and using Hyper Terminal after the “AT+WOPEN=1” command I couldn´t communicate through Hyper Terminal . I had to switch the Jumper of the module to LOW and used DWLWin program to upload the program to the module.

Now I can´t attach to the GPRS Network anymore. And I receive this message everytime the module starts:

I tryed to load the backup applications I have to the module (they used to work!) but they don´t anymore.

I try to use the “AT+IPGPRS” command to set the communication configurations.

But everytime I reset the module they seem to be erased or weren´t even recorded.

They used to be recorded on the FLASH and I never had to set it again.

What should I do!? Any ideas!?

Thanks!!!

Henrique

Hi Henrique,

when you start your application with AT+WOPEN=1 now, do you get any of the debug messages of your program at all?

I don’t know what TcpTxDelay actually does. I tried to modify the default setting but couldn’t really see a difference.

Best Regards,
Jan

Yes… I still can see the Debug messages.
But now when the program tries the AT+CGATT=1 command it returns ERROR. This way it´s not attached to the Network and no IP is retrieved.

The other thing that is most bothering me is the fact that the AT+IPGPRS isn´t being saved on the FLASH anymore. Everytime I reset the hardware by pushing RESET Button or by AT+CFUN=1 command the data isn´t there anymore.

As I told you I opened an old project that was working and it isn´t anymore. Could it be any AT configuration, like FLASH configuration or something?

How “Socket” sample creates “AT+IPGPRS” command? I couldn´t find it on the project. Because this command can´t be used on other samples.

Thanks for your help!
This time I´m really desperate! :open_mouth:

Best Regards,

Henrique

Unfortunately, I don’t know what the problem is…

You mean AT+IPGPRS works and AT+CGATT=1 after that works until you do a reset?

Please enable extended error messages with AT+CMEE=1

What is the error code when you do AT+CGATT=1?

Best Regards,
Jan

I´m working on an Old Backup I have and this one is being able to Save the “AT+IPGPRS”!!

Here´s the problem now: I can´t connect to the GPRS Network anymore.

Everything seems pretty normal… except for those 2 WIND lines.

Thanks for the help!!

Henrique Vilela

Hi Henrique,

I think you do send the CGATT=1 too early. I had problems with that too, so I switched to automatic attachment to GPRS network. You can do that with AT+WGPRS=0,0

You need to send that command only once, after Reset the ME will attach automatically to GPRS network and you don’t need to send AT+CGATT=1. Works perfectly for me, very convenient!

The extra indication shown now do not hurt. I don’t know why you didn’t have them before - maybe did you subscribe for unsolicited wind messgages without forwarding to external application? Probably not, if the code is still the same. Maybe wind indictaions were omitted because some AT+WIND=… was set to other than default… (this is not recommended when using ADL anyway).

I think you should be fine when using automatic attach or when you send the cgatt later… (I can’t tell you when or how long to wait - I don’t know…)

Best Regards,
Jan

Thank you Jan, the AT+WGPRS=0,0 really helped me out!

Also… the GPRS Service Provider wasn´t online.

Listen… there´s something odd happening now…:

I used to compile my application and get 3 errors and some warning.

Somehow, now without any signal of changes in my code when building the VisualC returns 0 errors and 1 warning which is:

When I try to build using “socket_rte” for debug instead, I get 1 warning telling “multi_app.h” coudn´t be opened.

--------------------Configuration: Socket_rte - Win32 Debug--------------------
Compiling...
Socket.c
c:\wavecom\projetos_temp\2\socket\src\socket.c(18) : fatal error C1083: Cannot open include file: 'multi_app.h': No such file or directory
Error executing cl.exe.

Socket_rte.dll - 1 error(s), 0 warning(s)

So… I opened my application with “Project Wizard” instead and now I get the same errors building “Socket” but building “Socket_rte” I get a bunch of errors that don´t make any sense.

--------------------Configuration: MultiApp_rte - Win32 Debug--------------------
Compiling...
multi_app.c
c:\wavecom\projetos_temp\2\libraries\multiapp\src\multi_app.c(414) : warning C4761: integral size mismatch in argument; conversion supplied
Creating library...
--------------------Configuration: IPConnect_rte - Win32 Debug--------------------
Compiling...
ipconnect.c
c:\wavecom\projetos_temp\2\libraries\ipconnect\src\ipconnect.c(203) : warning C4047: '=' : 'void (__cdecl *)(int ,int )' differs in levels of indirection from 'char *'
c:\wavecom\projetos_temp\2\libraries\ipconnect\src\ipconnect.c(258) : warning C4028: formal parameter 2 different from declaration
c:\wavecom\projetos_temp\2\libraries\ipconnect\src\ipconnect.c(258) : warning C4024: 'ed_DialupConnectionStart' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\libraries\ipconnect\src\ipconnect.c(263) : warning C4028: formal parameter 2 different from declaration
c:\wavecom\projetos_temp\2\libraries\ipconnect\src\ipconnect.c(263) : warning C4024: 'ed_DialupConnectionStop' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\libraries\ipconnect\src\ipconnect.c(316) : warning C4047: '==' : 'void (__cdecl *)(int ,int )' differs in levels of indirection from 'char *'
c:\wavecom\projetos_temp\2\libraries\ipconnect\src\ipconnect.c(317) : warning C4047: '==' : 'unsigned short (__cdecl *)(unsigned short ,unsigned char *,int )' differs in levels of indirection from 'char *'
c:\wavecom\projetos_temp\2\libraries\ipconnect\src\ipconnect.c(387) : warning C4047: '==' : 'void (__cdecl *)(int ,int )' differs in levels of indirection from 'char *'
c:\wavecom\projetos_temp\2\libraries\ipconnect\src\ipconnect.c(388) : warning C4047: '==' : 'void (__cdecl *)(unsigned short ,int )' differs in levels of indirection from 'char *'
ipcmd.c
Creating library...
--------------------Configuration: Socket_rte - Win32 Debug--------------------
Compiling...
keyboard.c
c:\wavecom\projetos_temp\2\socket\src\keyboard.c(6) : fatal error C1083: Cannot open include file: 'keyb.h': No such file or directory
Socket.c
c:\wavecom\projetos_temp\2\socket\src\socket.c(165) : warning C4028: formal parameter 2 different from declaration
c:\wavecom\projetos_temp\2\socket\src\socket.c(165) : warning C4024: 'ed_SocketTCPStart' : different types for formal and actual parameter 3
c:\wavecom\projetos_temp\2\socket\src\socket.c(165) : warning C4028: formal parameter 3 different from declaration
c:\wavecom\projetos_temp\2\socket\src\socket.c(165) : warning C4024: 'ed_SocketTCPStart' : different types for formal and actual parameter 4
c:\wavecom\projetos_temp\2\socket\src\socket.c(165) : warning C4028: formal parameter 2 different from declaration
c:\wavecom\projetos_temp\2\socket\src\socket.c(165) : warning C4024: 'ed_SocketTCPStart' : different types for formal and actual parameter 5
c:\wavecom\projetos_temp\2\socket\src\socket.c(192) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(192) : error C2146: syntax error : missing ';' before identifier 'Buff'
c:\wavecom\projetos_temp\2\socket\src\socket.c(192) : error C2065: 'Buff' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(192) : error C2109: subscript requires array or pointer type
c:\wavecom\projetos_temp\2\socket\src\socket.c(193) : error C2275: 's8' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(48) : see declaration of 's8'
c:\wavecom\projetos_temp\2\socket\src\socket.c(193) : error C2146: syntax error : missing ';' before identifier 'sReturn'
c:\wavecom\projetos_temp\2\socket\src\socket.c(193) : error C2065: 'sReturn' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(194) : error C2275: 'u8' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(47) : see declaration of 'u8'
c:\wavecom\projetos_temp\2\socket\src\socket.c(194) : error C2146: syntax error : missing ';' before identifier 'Listen'
c:\wavecom\projetos_temp\2\socket\src\socket.c(194) : error C2065: 'Listen' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(196) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(196) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(203) : warning C4028: formal parameter 2 different from declaration
c:\wavecom\projetos_temp\2\socket\src\socket.c(203) : warning C4024: 'ed_SocketTCPStart' : different types for formal and actual parameter 3
c:\wavecom\projetos_temp\2\socket\src\socket.c(203) : warning C4028: formal parameter 3 different from declaration
c:\wavecom\projetos_temp\2\socket\src\socket.c(203) : warning C4024: 'ed_SocketTCPStart' : different types for formal and actual parameter 4
c:\wavecom\projetos_temp\2\socket\src\socket.c(203) : warning C4028: formal parameter 2 different from declaration
c:\wavecom\projetos_temp\2\socket\src\socket.c(203) : warning C4024: 'ed_SocketTCPStart' : different types for formal and actual parameter 5
c:\wavecom\projetos_temp\2\socket\src\socket.c(204) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(204) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(223) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(223) : error C2146: syntax error : missing ';' before identifier 'Buff'
c:\wavecom\projetos_temp\2\socket\src\socket.c(223) : error C2109: subscript requires array or pointer type
c:\wavecom\projetos_temp\2\socket\src\socket.c(273) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(273) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(284) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(284) : error C2146: syntax error : missing ';' before identifier 'Buff'
c:\wavecom\projetos_temp\2\socket\src\socket.c(284) : error C2109: subscript requires array or pointer type
c:\wavecom\projetos_temp\2\socket\src\socket.c(286) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(286) : error C2146: syntax error : missing ';' before identifier 'BuffDisp'
c:\wavecom\projetos_temp\2\socket\src\socket.c(286) : error C2065: 'BuffDisp' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(286) : error C2109: subscript requires array or pointer type
c:\wavecom\projetos_temp\2\socket\src\socket.c(288) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(288) : error C2065: 'TheBuffer' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(289) : error C2275: 's32' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(53) : see declaration of 's32'
c:\wavecom\projetos_temp\2\socket\src\socket.c(289) : error C2146: syntax error : missing ';' before identifier 'sreturn'
c:\wavecom\projetos_temp\2\socket\src\socket.c(289) : error C2065: 'sreturn' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(291) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(291) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(293) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(293) : warning C4024: 'adl_atSendResponse' : different types for formal and actual parameter 2
c:\wavecom\projetos_temp\2\socket\src\socket.c(299) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(299) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(300) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(300) : warning C4024: 'adl_atSendResponse' : different types for formal and actual parameter 2
c:\wavecom\projetos_temp\2\socket\src\socket.c(302) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(302) : warning C4024: 'strncpy' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(303) : error C2109: subscript requires array or pointer type
c:\wavecom\projetos_temp\2\socket\src\socket.c(303) : error C2106: '=' : left operand must be l-value
c:\wavecom\projetos_temp\2\socket\src\socket.c(306) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(306) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(307) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(307) : warning C4024: 'adl_atSendResponse' : different types for formal and actual parameter 2
c:\wavecom\projetos_temp\2\socket\src\socket.c(310) : warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(310) : warning C4024: 'strncmp' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(315) : warning C4013: 'Socket_stop' undefined; assuming extern returning int
c:\wavecom\projetos_temp\2\socket\src\socket.c(368) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(368) : error C2146: syntax error : missing ';' before identifier 'Buff'
c:\wavecom\projetos_temp\2\socket\src\socket.c(368) : error C2109: subscript requires array or pointer type
c:\wavecom\projetos_temp\2\socket\src\socket.c(369) : error C2275: 's8' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(48) : see declaration of 's8'
c:\wavecom\projetos_temp\2\socket\src\socket.c(369) : error C2146: syntax error : missing ';' before identifier 'sReturn'
c:\wavecom\projetos_temp\2\socket\src\socket.c(370) : error C2275: 'u8' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(47) : see declaration of 'u8'
c:\wavecom\projetos_temp\2\socket\src\socket.c(370) : error C2146: syntax error : missing ';' before identifier 'Listen'
c:\wavecom\projetos_temp\2\socket\src\socket.c(371) : error C2275: 'ed_SocketSetupParams_t' : illegal use of this type as an expression
        c:\openat\otherlibs\tcpip\v3.02\inc\ed_socket.h(84) : see declaration of 'ed_SocketSetupParams_t'
c:\wavecom\projetos_temp\2\socket\src\socket.c(371) : error C2146: syntax error : missing ';' before identifier 'Params'
c:\wavecom\projetos_temp\2\socket\src\socket.c(371) : error C2065: 'Params' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(372) : error C2275: 'ed_dialupIPInfos_t' : illegal use of this type as an expression
        c:\openat\otherlibs\tcpip\v3.02\inc\ed_dialup.h(94) : see declaration of 'ed_dialupIPInfos_t'
c:\wavecom\projetos_temp\2\socket\src\socket.c(372) : error C2146: syntax error : missing ';' before identifier 'Infos'
c:\wavecom\projetos_temp\2\socket\src\socket.c(372) : error C2065: 'Infos' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(373) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(373) : error C2146: syntax error : missing ';' before identifier 'locIP'
c:\wavecom\projetos_temp\2\socket\src\socket.c(373) : error C2065: 'locIP' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(373) : error C2109: subscript requires array or pointer type
c:\wavecom\projetos_temp\2\socket\src\socket.c(374) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(374) : error C2146: syntax error : missing ';' before identifier 'distIP'
c:\wavecom\projetos_temp\2\socket\src\socket.c(374) : error C2065: 'distIP' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(374) : error C2109: subscript requires array or pointer type
c:\wavecom\projetos_temp\2\socket\src\socket.c(375) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(375) : error C2146: syntax error : missing ';' before identifier 'gway'
c:\wavecom\projetos_temp\2\socket\src\socket.c(375) : error C2065: 'gway' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(375) : error C2109: subscript requires array or pointer type
c:\wavecom\projetos_temp\2\socket\src\socket.c(377) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(377) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(389) : error C2224: left of '.TcpPort' must have struct/union type
c:\wavecom\projetos_temp\2\socket\src\socket.c(390) : error C2224: left of '.TcpTxDelay' must have struct/union type
c:\wavecom\projetos_temp\2\socket\src\socket.c(391) : error C2224: left of '.TcpServ' must have struct/union type
c:\wavecom\projetos_temp\2\socket\src\socket.c(391) : error C2198: 'sprintf' : too few actual parameters
c:\wavecom\projetos_temp\2\socket\src\socket.c(392) : warning C4133: 'function' : incompatible types - from 'int *' to 'struct ed_SocketSetupParams_t *'
c:\wavecom\projetos_temp\2\socket\src\socket.c(394) : warning C4133: 'function' : incompatible types - from 'int *' to 'struct ed_SocketSetupParams_t *'
c:\wavecom\projetos_temp\2\socket\src\socket.c(401) : warning C4133: 'function' : incompatible types - from 'int *' to 'struct ed_dialupIPInfos_t *'
c:\wavecom\projetos_temp\2\socket\src\socket.c(403) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(403) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(403) : error C2224: left of '.LocalIP' must have struct/union type
c:\wavecom\projetos_temp\2\socket\src\socket.c(403) : error C2198: 'ConvertIP_itoa' : too few actual parameters
c:\wavecom\projetos_temp\2\socket\src\socket.c(404) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(404) : warning C4024: 'adl_atSendResponse' : different types for formal and actual parameter 2
c:\wavecom\projetos_temp\2\socket\src\socket.c(405) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(405) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(405) : error C2224: left of '.DistantIP' must have struct/union type
c:\wavecom\projetos_temp\2\socket\src\socket.c(405) : error C2198: 'ConvertIP_itoa' : too few actual parameters
c:\wavecom\projetos_temp\2\socket\src\socket.c(406) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(406) : warning C4024: 'adl_atSendResponse' : different types for formal and actual parameter 2
c:\wavecom\projetos_temp\2\socket\src\socket.c(407) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(407) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(407) : error C2224: left of '.Gateway' must have struct/union type
c:\wavecom\projetos_temp\2\socket\src\socket.c(407) : error C2198: 'ConvertIP_itoa' : too few actual parameters
c:\wavecom\projetos_temp\2\socket\src\socket.c(408) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(408) : warning C4024: 'adl_atSendResponse' : different types for formal and actual parameter 2
c:\wavecom\projetos_temp\2\socket\src\socket.c(411) : warning C4028: formal parameter 2 different from declaration
c:\wavecom\projetos_temp\2\socket\src\socket.c(411) : warning C4024: 'ed_SocketTCPStart' : different types for formal and actual parameter 3
c:\wavecom\projetos_temp\2\socket\src\socket.c(411) : warning C4028: formal parameter 3 different from declaration
c:\wavecom\projetos_temp\2\socket\src\socket.c(411) : warning C4024: 'ed_SocketTCPStart' : different types for formal and actual parameter 4
c:\wavecom\projetos_temp\2\socket\src\socket.c(411) : warning C4028: formal parameter 2 different from declaration
c:\wavecom\projetos_temp\2\socket\src\socket.c(411) : warning C4024: 'ed_SocketTCPStart' : different types for formal and actual parameter 5
c:\wavecom\projetos_temp\2\socket\src\socket.c(430) : error C2275: 's8' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(48) : see declaration of 's8'
c:\wavecom\projetos_temp\2\socket\src\socket.c(430) : error C2146: syntax error : missing ';' before identifier 'sReturn'
c:\wavecom\projetos_temp\2\socket\src\socket.c(431) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(431) : error C2146: syntax error : missing ';' before identifier 'Buff'
c:\wavecom\projetos_temp\2\socket\src\socket.c(431) : error C2109: subscript requires array or pointer type
c:\wavecom\projetos_temp\2\socket\src\socket.c(432) : error C2275: 'adl_tmr_t' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\adl\headers\adl_timerhandler.h(72) : see declaration of 'adl_tmr_t'
c:\wavecom\projetos_temp\2\socket\src\socket.c(432) : error C2065: 'tt' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(433) : error C2275: 'u16' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(50) : see declaration of 'u16'
c:\wavecom\projetos_temp\2\socket\src\socket.c(433) : error C2146: syntax error : missing ';' before identifier 'timeout_period'
c:\wavecom\projetos_temp\2\socket\src\socket.c(433) : error C2065: 'timeout_period' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(446) : warning C4047: '=' : 'int ' differs in levels of indirection from 'struct adl_tmr_t *'
c:\wavecom\projetos_temp\2\socket\src\socket.c(454) : error C2275: 'adl_tmr_t' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\adl\headers\adl_timerhandler.h(72) : see declaration of 'adl_tmr_t'
c:\wavecom\projetos_temp\2\socket\src\socket.c(455) : error C2275: 'u16' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(50) : see declaration of 'u16'
c:\wavecom\projetos_temp\2\socket\src\socket.c(455) : error C2146: syntax error : missing ';' before identifier 'timeout_period'
c:\wavecom\projetos_temp\2\socket\src\socket.c(463) : warning C4047: '=' : 'int ' differs in levels of indirection from 'struct adl_tmr_t *'
c:\wavecom\projetos_temp\2\socket\src\socket.c(477) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(477) : error C2146: syntax error : missing ';' before identifier 'Buff'
c:\wavecom\projetos_temp\2\socket\src\socket.c(477) : error C2109: subscript requires array or pointer type
c:\wavecom\projetos_temp\2\socket\src\socket.c(479) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(479) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(508) : error C2275: 'bool' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(46) : see declaration of 'bool'
c:\wavecom\projetos_temp\2\socket\src\socket.c(508) : error C2146: syntax error : missing ';' before identifier 'bReturn'
c:\wavecom\projetos_temp\2\socket\src\socket.c(508) : error C2065: 'bReturn' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(509) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(509) : error C2146: syntax error : missing ';' before identifier 'Buff'
c:\wavecom\projetos_temp\2\socket\src\socket.c(509) : error C2109: subscript requires array or pointer type
c:\wavecom\projetos_temp\2\socket\src\socket.c(510) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(510) : error C2065: 'PinCode' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(511) : error C2275: 's8' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(48) : see declaration of 's8'
c:\wavecom\projetos_temp\2\socket\src\socket.c(511) : error C2146: syntax error : missing ';' before identifier 'sReturn'
c:\wavecom\projetos_temp\2\socket\src\socket.c(512) : error C2275: 'adl_simState_e' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\adl\headers\adl_sim.h(68) : see declaration of 'adl_simState_e'
c:\wavecom\projetos_temp\2\socket\src\socket.c(512) : error C2146: syntax error : missing ';' before identifier 'Sim_State'
c:\wavecom\projetos_temp\2\socket\src\socket.c(512) : error C2065: 'Sim_State' : undeclared identifier
c:\wavecom\projetos_temp\2\socket\src\socket.c(516) : warning C4028: formal parameter 2 different from declaration
c:\wavecom\projetos_temp\2\socket\src\socket.c(516) : warning C4024: 'ip_Subscribe' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(538) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(538) : warning C4024: 'adl_simSubscribe' : different types for formal and actual parameter 2
c:\wavecom\projetos_temp\2\socket\src\socket.c(559) : error C2371: 'Socket_stop' : redefinition; different basic types
c:\wavecom\projetos_temp\2\socket\src\socket.c(561) : error C2275: 's8' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(48) : see declaration of 's8'
c:\wavecom\projetos_temp\2\socket\src\socket.c(561) : error C2146: syntax error : missing ';' before identifier 'sReturn'
c:\wavecom\projetos_temp\2\socket\src\socket.c(562) : error C2275: 'ascii' : illegal use of this type as an expression
        c:\openat\v302\tgtgen\wmheader\wm_types.h(49) : see declaration of 'ascii'
c:\wavecom\projetos_temp\2\socket\src\socket.c(562) : error C2146: syntax error : missing ';' before identifier 'Buff'
c:\wavecom\projetos_temp\2\socket\src\socket.c(562) : error C2109: subscript requires array or pointer type
c:\wavecom\projetos_temp\2\socket\src\socket.c(565) : warning C4028: formal parameter 2 different from declaration
c:\wavecom\projetos_temp\2\socket\src\socket.c(565) : warning C4024: 'ed_SocketLTCPStop' : different types for formal and actual parameter 2
c:\wavecom\projetos_temp\2\socket\src\socket.c(566) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(566) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(569) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
c:\wavecom\projetos_temp\2\socket\src\socket.c(569) : warning C4024: 'sprintf' : different types for formal and actual parameter 1
c:\wavecom\projetos_temp\2\socket\src\socket.c(605) : warning C4090: '=' : different 'const' qualifiers
c:\wavecom\projetos_temp\2\socket\src\socket.c(606) : warning C4090: '=' : different 'const' qualifiers
c:\wavecom\projetos_temp\2\socket\src\socket.c(607) : warning C4028: formal parameter 1 different from declaration
c:\wavecom\projetos_temp\2\socket\src\socket.c(607) : warning C4133: '=' : incompatible types - from 'void (__cdecl *)(void )' to 'unsigned char (__cdecl *)(unsigned char )'
c:\wavecom\projetos_temp\2\socket\src\socket.c(608) : warning C4113: 'int (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void )'
c:\wavecom\projetos_temp\2\socket\src\socket.c(651) : warning C4028: formal parameter 1 different from declaration
c:\wavecom\projetos_temp\2\socket\src\socket.c(651) : warning C4133: 'function' : incompatible types - from 'void (__cdecl *)(unsigned char )' to 'unsigned char (__cdecl *)(int )'
c:\wavecom\projetos_temp\2\socket\src\socket.c(651) : warning C4024: 'adl_fcmSubscribe' : different types for formal and actual parameter 2
c:\wavecom\projetos_temp\2\socket\src\socket.c(651) : warning C4133: 'function' : incompatible types - from 'void (__cdecl *)(unsigned short ,unsigned char *)' to 'unsigned char (__cdecl *)(unsigned short ,unsigned char *)'
c:\wavecom\projetos_temp\2\socket\src\socket.c(907) : warning C4133: '=' : incompatible types - from 'char *' to 'struct adl_tmr_t *'
c:\wavecom\projetos_temp\2\socket\src\socket.c(962) : warning C4047: '=' : 'void (__cdecl *)(unsigned char ,unsigned char )' differs in levels of indirection from 'char *'
c:\wavecom\projetos_temp\2\socket\src\socket.c(968) : warning C4133: '=' : incompatible types - from 'char *' to 'struct adl_tmr_t *'
Error executing cl.exe.

Socket_rte.dll - 98 error(s), 94 warning(s)

(When I mean that it doesn´t make sense…I mean that the errors belong to the Sample application I made use of… not my code and analysing them, they seem correct!)

After that I tried to open directly from VisualC and the first situation I reported happned…

Best Regards,

Henrique