Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User alberto.cruz's Avatar
    Join Date
    Feb 2009
    Posts
    4
    Hello!

    I am trying to develop a simple Bluetooth service discovery. I've taken code from Bluetooth Point to Multipoint example. I've changed the UUID in order to search for RFCOMM services.

    The result is always the same, no found services. I've tried to search other UUIDs (L2CAP, SerialPortUUID,...), but the result is always the same. The most surprising thing is that listener methods are not executed.

    My first thought was that the MAC addresses obtained in the device discovery process were wrong or missmatched, but I've checked them, and they aren't wrong.

    Could anybody help me?
    -------------------------------------------------------------------------------------------------

    Code:
    void CServiceDiscoverer::DiscoverServicesOnDevice(TDeviceData* aDevData)
    	{
    	FinishDiscovery();
    
    	iDevDataChanged = EFalse;
    	iDevData = aDevData;
    	TBuf<20> address;
    	iObserver.printMessage(iDevData->iDeviceName);
    	iDevData->iDeviceAddr.GetReadable(address);
    	iObserver.printMessage(address);
    
    	// init new service discovery agent
    	iAgent = CSdpAgent::NewL(*this, iDevData->iDeviceAddr);
    	// set search properties for agent
    	iSpat = CSdpSearchPattern::NewL();
    	// use our service id to filter the services discovered
    	// -> will return only the services with matching service id(s)
    
    	TUUID service(KRFCOMM);
    
    
    	//service = KL2CAP;
    	iSpat->AddL(service);
    
    	//service = KSerialPortUUID;
    	//iSpat->AddL(service);
    
    	iAgent->SetRecordFilterL(*iSpat);
    
    	// initiate search
    	// this will result in call to NextRecordRequestComplete()
    	
    	iAgent->NextRecordRequestL();
    	iRunning = ETrue;
    	}
    Thanx.

  2. #2
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,712
    have you tried what if the original example works ?

    And if it does, try doing all your modification, one-by-one, and check that it works after each modifications, and when it stops working, you have found your bug.

  3. #3
    Registered User alberto.cruz's Avatar
    Join Date
    Feb 2009
    Posts
    4
    Thnkx, it was a good advice,

    I`ve just tried to execute the example in a Nokia N95 8GB and in a Nokia E61 and it hasn't work. Both mobiles are unable to find each other services.

    Anybody has tried and succeed?

    Thank you.

  4. #4
    Regular Contributor k4l4's Avatar
    Join Date
    Mar 2003
    Posts
    50
    But the phones discover each other as devices? Only the service discovery fails?
    --
    Matti Dahlbom
    http://irssibot.777-team.org/

  5. #5
    Registered User alberto.cruz's Avatar
    Join Date
    Feb 2009
    Posts
    4
    Hi!

    First of all, thank you.

    Device Discovery works perfectly. They discover each other as devices, their fiendly names and their addresses.
    I haven´t had any other problem but the service discovery. I've succeed connecting devices, advertising bluetooth services, discovering devices; but I'm not able to discover services.

    I'm a bit frustrated.

  6. #6
    Registered User alberto.cruz's Avatar
    Join Date
    Feb 2009
    Posts
    4
    Hi All!!

    I'm just solved the problem. The example didn't work because of its capabilities; ReadDeviceData must be declared at.mmp file.

    Thnaks!

  7. #7
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,744
    That would be surprising. ReadDeviceData is about reading "settings" of your own device. BT service discovery is about reading something from another device. Where the another device is not necessarily Symbian at all. And vice versa.

Similar Threads

  1. Multiple service records on remote BT server
    By harshadnatiye in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2009-05-01, 12:20
  2. Bluetooth service discovery problems
    By codepatch in forum Bluetooth Technology
    Replies: 2
    Last Post: 2007-05-31, 12:51
  3. If you cannot find BT service on your phone
    By krampuls in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2007-03-22, 11:42
  4. Problems with search remote bt device
    By garzetti in forum Bluetooth Technology
    Replies: 0
    Last Post: 2006-06-12, 09:35
  5. Service discovery problems on Nokia 3250
    By wauer in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2006-04-27, 21:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved