Can not get connection with WIP


#1

hi all, i’m trying to make a tcp client using wip over gprs, and it has some problems.

#include "adl_global.h"
#include "wip.h"

#define SERVER_PORT 80
#define SERVER_ADDRESS "google.com.vn"

const u16 wm_apmCustomStackSize = 1024* 3 ;

void myHandler(wip_bearer_t br, s8 event, void *context) {
	TRACE((1,"bearer_receive %d",event));
	switch (event) {
	case WIP_BEV_CONN_FAILED:
		TRACE((1,"connection fail"));
		break;
	case WIP_BEV_IP_CONNECTED:
		// IP connectivity, start IP application here
		TRACE((1,"connected,ok"));
		break;
	case WIP_BEV_IP_DISCONNECTED:
		//stop IP application here
		TRACE((1,"disconnected,ok"));
		break;
	default:
		break;
	}
}
wip_bearer_t myBearer;

bool connectToGPRS(void) {
	s8 ercode;
	if (ercode = wip_bearerOpen(&myBearer, "GPRS", myHandler, NULL)) {
		TRACE((1,"cannot open gprs,code=%d",ercode));
		return FALSE;
	}
	if (ercode = wip_bearerSetOpts(myBearer, WIP_BOPT_GPRS_APN, "v-internet",
			WIP_BOPT_LOGIN, "", WIP_BOPT_PASSWORD, "", WIP_BOPT_END)) {
		wip_bearerClose(myBearer);
		TRACE((1,"setopt fail,errorcode=%d",ercode));
		return FALSE;
	}
	if ((ercode = wip_bearerStart(myBearer)) != OK && (ercode
			!=WIP_BERR_OK_INPROGRESS)) {
		wip_bearerClose(myBearer);
		TRACE((1,"cannot start bearer,errorcode=%d",ercode));
		return FALSE;
	}
	wip_bearerGetOpts(myBearer, WIP_BOPT_ERROR, &ercode, WIP_BOPT_END);
	TRACE((1,"lasterr=%d",ercode));
	return TRUE;
}

void commonHandler(wip_event_t *e, enum state *ctx) {
	static bool init = FALSE;
	u8 buffer[256];
	ascii buff[256];
	s32 nread;
	wip_channel_t c = e->channel;
	TRACE((1,"recevice wip kind=%d",e->kind));
	switch (e->kind) {
	case WIP_CEV_READ:
		nread = wip_read(c, buffer, sizeof(buffer) - 1);
		buffer[nread] = '\0';
		wm_sprintf(buff, "rev:%s", buffer);
		TRACE((1,buff));
		break;
	case WIP_CEV_WRITE:
		TRACE((1,"sending hello"));
		wip_write(c, "GET / HTTP/1.1\r\n\r\n", wm_strlen(
				"GET / HTTP/1.1\r\n\r\n"));
		break;
	case WIP_CEV_ERROR:
	case WIP_CEV_PEER_CLOSE:
	case WIP_CEV_PING:
		break;
	}
}
void startClient(u8 timeID) {
	wip_channel_t client = wip_TCPClientCreate(SERVER_ADDRESS, SERVER_PORT,
				commonHandler,NULL);

}
void simHandler(u8 event) {
	switch (event) {
	case ADL_SIM_EVENT_FULL_INIT:
		TRACE((1,"sim event full init"));
		s8 code = wip_netInit();
		TRACE((1,"init: %d",code));
		if (connectToGPRS()) {
			//adl_tmrSubscribe(TRUE, 50, ADL_TMR_TYPE_100MS, startClient);
			startClient();
		}
		break;
	}
}
void adl_main(adl_InitType_e InitType) {
	TRACE (( 1, "project13 gprs/tcpip : Main" ));
	s32 ret = adl_simSubscribe(simHandler, NULL);
	TRACE((1,"Subscribed %d",ret));
}

when app start, wip_bearerStart() function return WIP_BERR_OK_INPROGRESS, which i don’t know that is OK or not. At later, when wip_TCPClientCreate() is called, the bearerHandler received a connection fail event(i’ve used gprs with this sim on my hand phone and it work ok) log of the program:

09/10/12,04:34:41:32	CUS4	1	sim event full init
09/10/12,04:34:41:81	CUS4	1	[GPRS]: initialized.
09/10/12,04:34:41:82	CUS4	1	[GSM]: initialized.
09/10/12,04:34:41:83	CUS4	1	[UART1]: initialized.
09/10/12,04:34:41:84	CUS4	1	[UART2]: initialized.
09/10/12,04:34:41:85	CUS4	1	[]: initialized.
09/10/12,04:34:41:86	CUS4	1	init: 0
09/10/12,04:34:41:88	CUS4	1	[GPRS]: open: -> DISCONNECTED
09/10/12,04:34:41:163	CUS4	1	[GPRS]: start: -> CONNECTING
09/10/12,04:34:41:163	CUS4	1	lasterr=0
09/10/12,04:34:41:202	CUS4	1	[GPRS]: GPRS EVENT SETUP OK (cid=1): GPRS activate
09/10/12,04:34:41:536	CUS4	1	recevice wip kind=1
09/10/12,04:34:46:131	CUS4	1	[GPRS]: GPRS EVENT: 27 (cid=1)
09/10/12,04:34:47:767	CUS4	1	[GPRS]: GPRS EVENT SETUP/ACTIVATE KO (cid=1): -> DISCONNECTED
09/10/12,04:34:47:768	CUS4	1	bearer_receive 1
09/10/12,04:34:47:769	CUS4	1	connection fail

please help me!


#2

Have you looked-up what GPRS EVENT: 27 means :question:


#3

thanks you for reply, awneil
i think code -27 (WIP_BERR_OK_INPROGRESS) mean that bearer still in init progress and myHandler function will receive the result later when init progress done, but i only receive WIP_BEV_CONN_FAILED in myHandler. I’ve checked APN,USERNAME,PASSWORD are correct, so i don’t know where is the problem.


#4

I think you are confusing the return value from the API function call with the Event Code received by the handler… :question:


#5

ok, i’ve check for gprs service document and adl_gprs.h

enum
{
    ADL_GPRS_EVENT_RING_GPRS,               // 0
    ADL_GPRS_EVENT_NW_CONTEXT_DEACT,
    ADL_GPRS_EVENT_ME_CONTEXT_DEACT,
    ADL_GPRS_EVENT_NW_DETACH,
    ADL_GPRS_EVENT_ME_DETACH,
    ADL_GPRS_EVENT_NW_CLASS_B,              // 5
    ADL_GPRS_EVENT_NW_CLASS_CG,
    ADL_GPRS_EVENT_NW_CLASS_CC,
    ADL_GPRS_EVENT_ME_CLASS_B,
    ADL_GPRS_EVENT_ME_CLASS_CG,
    ADL_GPRS_EVENT_ME_CLASS_CC,             // 10
    ADL_GPRS_EVENT_NO_CARRIER,
    ADL_GPRS_EVENT_DEACTIVATE_OK,
    ADL_GPRS_EVENT_DEACTIVATE_OK_FROM_EXT,
    ADL_GPRS_EVENT_ANSWER_OK,
    ADL_GPRS_EVENT_ANSWER_OK_FROM_EXT,      // 15
    ADL_GPRS_EVENT_ACTIVATE_OK,
    ADL_GPRS_EVENT_GPRS_DIAL_OK_FROM_EXT,
    ADL_GPRS_EVENT_ACTIVATE_OK_FROM_EXT,
    ADL_GPRS_EVENT_HANGUP_OK_FROM_EXT,
    ADL_GPRS_EVENT_DEACTIVATE_KO,           // 20
    ADL_GPRS_EVENT_DEACTIVATE_KO_FROM_EXT,
    ADL_GPRS_EVENT_ACTIVATE_KO_FROM_EXT,
    ADL_GPRS_EVENT_ACTIVATE_KO,
    ADL_GPRS_EVENT_ANSWER_OK_AUTO,
    ADL_GPRS_EVENT_SETUP_OK,                // 25
    ADL_GPRS_EVENT_SETUP_KO,
    ADL_GPRS_EVENT_ME_ATTACH,
    ADL_GPRS_EVENT_ME_UNREG,
    ADL_GPRS_EVENT_ME_UNREG_SEARCHING
};

27 is ADL_GPRS_EVENT_ME_ATTACH, the document say: “if the ME has forced a network attachment” :frowning: :question:


#6

OK, “ME” = “Mobile Equipment”; ie, your Wavecom device - so you have successfully “attached” to the basic radio service - but then the connection fails.

This probably means that you have not correctly configured your GPRS settings?


#7

I have a Fasttract Supreme and i’m following the Simple TCP client from WIP 3.0 document.
i posted full my code in the first post, i think it use default setting for gprs, i just set APN,USERNAME,PASSWORD with my bear settings,
could you advise me some other settings to try?
thank you.


#8

Hiya,

I’ve had some issues connecting to GPRS when using a newly flashed module for the first time after being flashed.

Try doing the following from the modem console:

  1. Ensure your application is not running - use AT+WOPEN=0 to stop
  2. Reboot your modem for good measure - use AT+CFUN=1
  3. Manually set the PDP context to something - use AT+CGDCONT=1,“IP”,“fred.net (fred.net doesn’t have to be a valid APN, either)
  4. Reboot your modem - AT+CFUN=1
  5. Restart your application - AT+WOPEN=1

This fixes the GPRS Event 27 issue for me.

Let us know how you get on.

ciao, Dave


#9

thank you davidc, i’ve did as you but it did not solve my problem.
i also try ping-gprs example, at gprs_handler, i receive a ADL_GPRS_EVENT_ACTIVATE_KO, the document say it cause of the call to adl_gprsAct() on the Cid X failed. So i debug this part of ping-gprs:

case ADL_GPRS_EVENT_SETUP_OK:
		TRACE((1, "PDP Ctxt Cid %d Setup is OK", Cid));

		/* Activate context */
		s8 ret=adl_gprsActExt(ping_CID, ping_ResponsePort);
		TRACE((1,"Activate return code %d",ret));
		break;

it print out return value is OK (code=0), :question: any suggest?
thanks.


#10

Hiya,

Has your SIM card been enabled for GPRS DATA service by your network provider?
Can you ‘Surf the Internet’ from a Mobile Phone using the same SIM you are using for this project?

ciao, Dave


#11

If you enable the ATI Level 1 Traces, you will be able to see the “internal” AT Commands & responses being used by Open-AT and WIP - this might give you a clue…


#12

@davidc: yes, i used this sim on my phone, it’s work well.
@awneil: when use ATI Level 1 Traces, i get this

Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace		1	Unable to find the string of the remote trace in the file (ID = 14721)
Trace		1	Unable to find the string of the remote trace in the file (ID = 14174)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8846)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8847)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8845)
Trace	ATI	1	
			+CME ERROR: 3

try to check commercial feature:

AT+WCFM=2
+WCFM: 0066,0
OK

–> enable feature = GPRS Class 2 (02), Wireless CPU Highest GPRS CLASS allowed (04), Echo Cancellation Algorithm (20), and EDGE (40)

AT+WCFM=5
+WCFM: 00000071,0
OK

–> enable Internet Plugin (01), RealTime Operating System , C-GPS and Sim Access.
i think that’s enough feature to access gprs service :question:


#13

We need to see more of the trace to know what command caused the +CME ERROR: 3 response!
Also, if any earlier commands have had error responses…

Are you sure that you are waiting for the SIM to complete its initialisation, and for the unit to gain GSM registration, before attempting a GPRS connection?


#14

ok, this is full trace

Trace	IP	1	GPRS Setup return : 0
Trace	IP	1	Embedded : Event receive 25
Trace	IP	1	PDP Ctxt Cid 1 Setup is OK
Trace	IP	1	Active return code 0
Trace	ATI	1	AT+CGACT=1,1

Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 6658)
Dump	ATI	1	41 54 2b 43 47 41 43 54 3d 31 2c 31 1a 
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","24FE"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 34 46 45 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace		1	Unable to find the string of the remote trace in the file (ID = 14721)
Trace		1	Unable to find the string of the remote trace in the file (ID = 14174)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","2AF1"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 41 46 31 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace		1	Unable to find the string of the remote trace in the file (ID = 14721)
Trace		1	Unable to find the string of the remote trace in the file (ID = 14174)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8846)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8847)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8845)
Trace	ATI	1	
			+CME ERROR: 3
			
Dump	ATI	1	0d 0a 2b 43 4d 45 20 45 52 52 4f 52 3a 20 33 0d 0a 
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8838)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8841)
Trace	IP	1	Embedded : Event receive 23
Trace	IP	1	ADL_GPRS_EVENT_ACTIVATE_KO
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","29C3"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 39 43 33 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","2AF1"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 41 46 31 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","24FE"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 34 46 45 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","3A90"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 41 39 30 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","24FE"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 34 46 45 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","29C3"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 39 43 33 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","382D"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 32 44 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","29C3"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 39 43 33 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","382D"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 32 44 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","24FE"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 34 46 45 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","29C3"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 39 43 33 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","24FE"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 34 46 45 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","2AF1"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 41 46 31 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","38F5"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 46 35 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","2AF1"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 41 46 31 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","38F5"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 46 35 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","29C3"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 39 43 33 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","38F5"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 46 35 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","29C3"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 39 43 33 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","38F5"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 46 35 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","29C3"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 39 43 33 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","38F5"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 46 35 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","29C3"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 39 43 33 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","382D"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 32 44 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","38F5"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 46 35 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","29C3"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 39 43 33 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","1479"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 31 34 37 39 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","382D"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 32 44 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","38F5"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 46 35 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","29C3"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 39 43 33 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	AT+WCFM

Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 6658)
Dump	ATI	1	41 54 2b 57 43 46 4d 1a 
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8846)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8847)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8845)
Trace	ATI	1	
			+CME ERROR: 3
			
Dump	ATI	1	0d 0a 2b 43 4d 45 20 45 52 52 4f 52 3a 20 33 0d 0a 
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8838)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8841)
Trace	ATI	1	AT+WCFM?

Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 6658)
Dump	ATI	1	41 54 2b 57 43 46 4d 3f 1a 
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8846)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8847)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8845)
Trace	ATI	1	
			ERROR
			
Dump	ATI	1	0d 0a 45 52 52 4f 52 0d 0a 
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8838)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8841)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","382D"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 32 44 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	AT+WCFM=2

Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 6658)
Dump	ATI	1	41 54 2b 57 43 46 4d 3d 32 1a 
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8855)
Trace	ATI	1	
			+WCFM: 0066,0
			
Dump	ATI	1	0d 0a 2b 57 43 46 4d 3a 20 30 30 36 36 2c 30 0d 0a 
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8846)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8847)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8845)
Trace	ATI	1	
			OK
			
Dump	ATI	1	0d 0a 4f 4b 0d 0a 
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8838)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8841)
Trace	ATI	1	AT+WCFM=3

Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 6658)
Dump	ATI	1	41 54 2b 57 43 46 4d 3d 33 1a 
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8846)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8847)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8845)
Trace	ATI	1	
			+CME ERROR: 3
			
Dump	ATI	1	0d 0a 2b 43 4d 45 20 45 52 52 4f 52 3a 20 33 0d 0a 
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8838)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8841)
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","38F5"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 46 35 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","334B"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 33 34 42 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","1479"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 31 34 37 39 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","2AF1"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 41 46 31 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","1479"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 31 34 37 39 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","38F5"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 33 38 46 35 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","2AF1"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 32 41 46 31 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","1479"
			
Dump	ATI	1	0d 0a 2b 43 47 52 45 47 3a 20 31 2c 22 32 46 44 32 22 2c 22 31 34 37 39 22 0d 0a 
Trace	IP	1	Embedded : Event receive 27
Trace	IP	1	ADL_GPRS_EVENT_ME_ATTACH
Trace	ATI	1	Unable to find the string of the remote trace in the file (ID = 8856)
Trace	ATI	1	
			+CGREG: 1,"2FD2","15E0"

and i’m sure waiting for SIM init progress, i’ve modify a litle of code from ping-gprs so it’s only start to go when ADL_SIM_EVENT_FULL_INIT event is sent to SIM event handler.
this is it http://secmask.pastebin.com/f20363da


#15

You seem to be getting a very large number of +CGREG: unsolicited responses; ie, your unit is doing a lot of switching between cells.

Are you in a very poor coverage area?


#16

no, in my hand phone it show that very good (i’m in city, without obstruction), sms service work on fasttrack supreme light fast too.


#17

Are you certain that you have correctly entered the GPRS settings into the Fastrack?


#18

yes, i use a Viettel SIM, its APN is “v-internet”, both username and password are blank, i use this setting for my nokia hand phone, it work well.
so with ping-gprs, at remoteshell i type this:

AT+GSET=1,"v-internet","","","",0,0
OK
AT+WDATA=1,"222.255.24.149",1,400,100,128
Context activation error
+CME ERROR: 3

i hear in an old forum say that, it is need to active RST pin to use gprs feature :question: , is this right?
thanks very much.


#19

Rather than make them actually blank, what happens if you use a single space instead?
ie,

AT+GSET=1,"v-internet"," "," "," ",0,0

Sounds extremely unlikely to me - if the RST pin were in the wrong state, the unit would not work at all.


#20

Reference: viewtopic.php?f=28&t=3496&p=13269&hilit=single+space#p13269