I am discovering a blue tooth service I am advertising through one 7650's SDP database. I want to make subsequent discoveries to get the services from the specific device. So I directly call the ListServices function -as it is defined in "Blue Tooth Discovery example" in series 60 SDK- after inquiring for the device. This is the well known code:

RSocketServ sock;
TProtocolDesc pInfo;
_LIT(KL2Cap, "BTLinkManager"
User::LeaveIfError(sock.FindProtocol((const TDesC&ampKL2Cap, pInfo));
RHostResolver hr;
User::LeaveIfError(hr.Open(sock,pInfo.iAddrFamily ,pInfo.iProtocol));
TInquirySockAddr addr;
TNameEntry name;
TRequestStatus status;

TPtrC deviceName;
if (status == KErrNone){

TBTDevAddr dir = TBTSockAddr(name().iAddr).BTAddr();


I have defined the SDP pattern and my specific MatchList in the constructor of iDiscoverer. Well, The first time I run the discovery proccess the service is discovered and logged OK (even if another BT device, without the expected service, is discovered instead of the 7650, the discovery ends without problem). But on second and subsequent discoveries the error "SDP Error: -6312" is always raised.

Why does it work only at first discovery ?Why is the error raised? What is its meaning? What can I do to avoid this crash and make the discovery function time after time? Does the SdpAgent get blocked?

I would thank your help very much. Greetings.