i want to connect to a PC with my mobile phone via bluetooth. The pc provides different RFCOMM based services. My mobile app always connects to the first found RFCOMM port (which is indeed not my own BT-server but a normal service provided by the BT driver).
I use the following part of code for finding a RFCOMM service. So its no surprise that I always get the first available.
In contrast the example chat application of the symbian sdk finds always the right port. It uses a more complicated approach that i dont understand fully with the given information there.
void SDPInvestigatorImpl::VisitAttributeValueL (CSdpAttrValue &aValue, TSdpElementType aType)
// This will be called for each attribute received. It just waits for attributes
// of certain type and parses them. All other attributes are ignored.
switch( aType )
m_previousUUID = aValue.UUID( );
if( m_previousUUID == KRFCOMM )
m_port = aValue.Uint();
m_portFound = TRUE;
So finally my question is: How can you differentiate these services? Where do i have to look for more information? Or does the chat application find the right port by accident?
PS I can not differentiate by UUID or by static port number.
Shutting down all other services works fine.