Hello,

I use in an application the code below to make a HTTP request over WSP. The
problem is that using two different Nokia 3650 phones, on one it work
always, and on one never. More precisely, the phones use the same APN, but
on one it always takes very long until the GetEvent after conn.Connect(ClientHeaders) completes and then I get
the error -5469 (EInvalidState) after createTransaction. Could it be that
the phones have different settings in commdb regarding the timeout to
establish the connection? Or which setting could it be fault?
Here comes the code:

LIT8(RemoteHost,"139.7.29.1"); // your wap gateway
_LIT8(Headers, "");
_LIT8(Body, "");
_LIT8(ClientHeaders, "");

RGenericAgent agent;
RWAPServ wServ;
RWSPCOConn conn;
TBool isActive = ETrue;

User::LeaveIfError(agent.Open());

agent.NetworkActive(isActive);

if(!isActive)
{
TRequestStatus st;
agent.StartOutgoing(st);
User::WaitForRequest(st);
}

wServ.Connect();


Err=conn.Open(wServ,RemoteHost,9201,0,EIP,EFalse);

if(Err != KErrNone){
CEikonEnv::InfoWinL(_L("conn.Open"),_L("failed"));
return;
}

Err=conn.Connect(ClientHeaders);

if(Err != KErrNone){
CEikonEnv::InfoWinL(_L("conn.Connect"),_L("failed"));
return;
}

RWSPCOTrans trans;
RWSPCOConn::TEvent event;

conn.GetEvent(event, trans); //wait for connect confirmation

RWSPCOTrans transaction;
Err=conn.CreateTransaction(RWAPConn::EGett, _L("http://www....."), Headers,
Body, transaction);

if(Err != KErrNone){
TBuf16<100> msgErr;
msgErr.Format(_L("%d"),Err);
CEikonEnv::InfoWinL(_L("create transaction returned error"),msgErr);
return;
}

RWSPCOTrans trans;
RWSPCOConn::TEvent event;
conn.GetEvent(event, trans);

TBuf8<200> buf;
buf.Zero();
Err=transaction.GetData(buf,RWSPCOTrans::EResultBody);

Thankful for any hint.