Need help to receive GPS Data.

Login to reply to this topic.
Sat, 2008-04-12 11:59
Joined: 2007-08-29
Forum posts: 201

Hi All,

I am able to detect bluetooth device. Now I want to receive data from GPS chip set. I am posting my code here.Can any one tell me that where I am doing wrong or what I have to make change in my code. Please give me any one some suggestion .

void CListener::StartListenerL(TInt& aChannel)
{

if ( iState!=ENone )
{
User::Leave(KErrInUse);
}
iState=EConnecting;

TProtocolDesc pdesc;
User::LeaveIfError(iSocketServ.FindProtocol(KRfComm(), pdesc));

User::LeaveIfError(
iListenSock.Open(iSocketServ,
pdesc.iAddrFamily,pdesc.iSockType,KRFCOMM)
);


User::LeaveIfError(iListenSock.GetOpt(KRFCOMMGetAvailableServerChannel,
KSolBtRFCOMM, aChannel));

TBTSockAddr btsockaddr;
btsockaddr.SetPort(aChannel);

User::LeaveIfError(iListenSock.Bind(btsockaddr));

iListenSock.Listen(KSizeOfListenQueue);

TBTServiceSecurity secSettings;

TUid settingsUID;
settingsUID.iUid = KBT_serviceID;
secSettings.SetUid(settingsUID);

secSettings.SetAuthentication(EFalse);
secSettings.SetAuthorisation(EFalse);
secSettings.SetEncryption(EFalse);

btsockaddr.SetSecurity(secSettings);

iSock.Close();

User::LeaveIfError(iSock.Open(iSocketServ));

iListenSock.Accept(iSock,iStatus);
SetActive();
}


Thanks & Regards
Ram

Symbian OS 9.1,S60 3rd edition MR,and Carbide.C++

  • Login to reply to this topic.