Index: /source/ariba/SideportListener.cpp
===================================================================
--- /source/ariba/SideportListener.cpp	(revision 5344)
+++ /source/ariba/SideportListener.cpp	(revision 5358)
@@ -41,4 +41,5 @@
 #include "ariba/overlay/BaseOverlay.h"
 #include "ariba/overlay/LinkDescriptor.h"
+#include "ariba/utility/addressing/endpoint_set.hpp"
 
 using ariba::overlay::LinkDescriptor;
@@ -82,11 +83,9 @@
 
 bool SideportListener::isRelayedNode(const NodeID& node){
+	if( overlay == NULL ) return false;
 
 	BOOST_FOREACH( LinkDescriptor* link, overlay->links ){
-
-		if( (!link->localRelay.isUnspecified()) && link->remoteRelay == node && link->up) {
+		if( (!link->localRelay.isUnspecified()) && link->remoteRelay == node && link->up)
 			return true;
-		}
-
 	}
 
@@ -95,11 +94,9 @@
 
 bool SideportListener::isRelayingNode(const NodeID& node){
+	if( overlay == NULL ) return false;
 
 	BOOST_FOREACH( LinkDescriptor* link, overlay->links ){
-
-		if( (!link->localRelay.isUnspecified()) && link->localRelay == node && link->up) {
+		if( (!link->localRelay.isUnspecified()) && link->localRelay == node && link->up)
 			return true;
-		}
-
 	}
 
@@ -108,5 +105,41 @@
 
 SideportListener::Protocol SideportListener::getReachabilityProtocol(const NodeID& node){
-	return (SideportListener::Protocol)(ipv4 | tcp);
+	int ret = SideportListener::undefined;
+	if( overlay == NULL ) return (Protocol)ret;
+
+	using namespace ariba::addressing;
+
+	BOOST_FOREACH( LinkDescriptor* link, overlay->links ){
+		if(link->remoteNode == node){
+			if(overlay->bc == NULL) continue;
+
+			BaseCommunication::LinkDescriptor& bclink =
+				overlay->bc->queryLocalLink(link->communicationId);
+
+			if(bclink.isUnspecified()) continue;
+			if(bclink.localLocator == NULL) continue;
+
+			const address_v* locator = bclink.remoteLocator;
+
+			if( locator->instanceof<tcpip_endpoint>() ){
+
+				tcpip_endpoint tcpip = *locator;
+
+				ret |= SideportListener::tcp;
+
+				if( tcpip.address().is_v4() )
+					ret |= SideportListener::ipv4;
+
+				if( tcpip.address().is_v6() )
+					ret |= SideportListener::ipv6;
+
+			}else if( locator->instanceof<rfcomm_endpoint>() ){
+				ret |= SideportListener::rfcomm;
+			}
+		}
+	}
+
+	return (Protocol)ret;
+	//return (SideportListener::Protocol)(ipv4 | tcp);
 }
 
Index: /source/ariba/communication/BaseCommunication.h
===================================================================
--- /source/ariba/communication/BaseCommunication.h	(revision 5344)
+++ /source/ariba/communication/BaseCommunication.h	(revision 5358)
@@ -95,4 +95,8 @@
 
 namespace ariba {
+  class SideportListener;
+}
+
+namespace ariba {
 namespace communication {
 
@@ -114,7 +118,11 @@
  * @author Sebastian Mies, Christoph Mayer
  */
-class BaseCommunication: public NetworkChangeInterface,
-	public SystemEventListener, public transport_listener {
+class BaseCommunication:
+	public NetworkChangeInterface,
+	public SystemEventListener,
+	public transport_listener {
+
 	use_logging_h(BaseCommunication);
+	friend class ariba::SideportListener;
 
 public:
Index: /source/ariba/overlay/OverlayBootstrap.cpp
===================================================================
--- /source/ariba/overlay/OverlayBootstrap.cpp	(revision 5344)
+++ /source/ariba/overlay/OverlayBootstrap.cpp	(revision 5358)
@@ -64,6 +64,6 @@
 
 	manager.registerCallback( this );
-	//manager.registerModule( BootstrapManager::BootstrapTypePeriodicBroadcast );
-	manager.registerModule( BootstrapManager::BootstrapTypeBluetoothSdp );
+	manager.registerModule( BootstrapManager::BootstrapTypePeriodicBroadcast );
+	//manager.registerModule( BootstrapManager::BootstrapTypeBluetoothSdp );
 }
 
@@ -76,6 +76,6 @@
 
 	manager.unregisterCallback( this );
-	//manager.unregisterModule( BootstrapManager::BootstrapTypePeriodicBroadcast );
-	manager.unregisterModule( BootstrapManager::BootstrapTypeBluetoothSdp );
+	manager.unregisterModule( BootstrapManager::BootstrapTypePeriodicBroadcast );
+	//manager.unregisterModule( BootstrapManager::BootstrapTypeBluetoothSdp );
 }
 
Index: /source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp
===================================================================
--- /source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp	(revision 5344)
+++ /source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp	(revision 5358)
@@ -283,10 +283,13 @@
 
 	for (i = 0; i < num_rsp; i++) {
-
 		address = (ii + i)->bdaddr;
-		logging_debug("found peer " << ba2string(&address) << ", querying SDP.")
+
+		string saddress = ba2string(&address);
+		string sname = ba2name(&address, sock);
+
+		logging_debug("found peer [" << saddress << "] [" << sname << "]");
 
 		// TODO: sdp_search can be very slow, fork it!
-		sdp_search(address);
+		sdp_search( address, sname );
 	}
 
@@ -295,11 +298,11 @@
 
 	int nextscan = (rand() % 40) + 5;
-	logging_debug("Next sdp scan in " << nextscan << " seconds");
-
-	scan_timer_.expires_from_now(boost::posix_time::seconds(nextscan));
-	scan_timer_.async_wait(boost::bind(&BluetoothSdp::bt_scan, this));
-}
-
-void BluetoothSdp::sdp_search(bdaddr_t target) {
+	logging_debug("next sdp scan in " << nextscan << " seconds");
+
+	scan_timer_.expires_from_now( boost::posix_time::seconds(nextscan) );
+	scan_timer_.async_wait( boost::bind(&BluetoothSdp::bt_scan, this) );
+}
+
+void BluetoothSdp::sdp_search(bdaddr_t target, string devicename) {
 
 	/*
@@ -315,9 +318,11 @@
 	uint8_t port = 0;
 
+	// connect to the SDP server running on the remote machine
+	logging_debug("querying services from bt device ["
+			<< ba2string(&target) << "] [" << devicename << "]");
+
 	// prepare the buffers for the attributes
 	char name[256], info1[256], info2[256], info3[256];
 
-	// connect to the SDP server running on the remote machine
-	logging_debug("querying services from bt device " << ba2string(&target));
 	session = sdp_connect(BDADDR_ANY, &target, SDP_RETRY_IF_BUSY);
 
@@ -377,5 +382,5 @@
 }
 
-string BluetoothSdp::ba2string(bdaddr_t *ba) {
+string BluetoothSdp::ba2string(bdaddr_t* ba) {
 	/*
 	 * Returns a string holding the bt adress in human readable form.
@@ -388,4 +393,16 @@
 }
 
+string BluetoothSdp::ba2name(bdaddr_t* ba, int sock){
+
+	char name[256] = {0};
+	memset(name, 0, sizeof(name));
+
+	if( hci_read_remote_name(sock, ba, sizeof(name), name, 0) < 0 )
+		strcpy(name, "unknown");
+
+	string result = name;
+	return result;
+}
+
 #endif // HAVE_BLUETOOTH_BLUETOOTH_H
 
Index: /source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.h
===================================================================
--- /source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.h	(revision 5344)
+++ /source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.h	(revision 5358)
@@ -85,6 +85,7 @@
 #ifdef HAVE_BLUETOOTH_BLUETOOTH_H
 	void bt_scan();
-	void sdp_search(bdaddr_t target);
-	string ba2string(bdaddr_t *ba);
+	void sdp_search(bdaddr_t target, string devicename);
+	string ba2string(bdaddr_t* ba);
+	string ba2name(bdaddr_t* ba, int sock);
 
 	sdp_session_t *sdp_session_;
Index: /source/ariba/utility/system/StartupWrapper.cpp
===================================================================
--- /source/ariba/utility/system/StartupWrapper.cpp	(revision 5344)
+++ /source/ariba/utility/system/StartupWrapper.cpp	(revision 5358)
@@ -98,8 +98,9 @@
 	{
 		log4cxx::LoggerPtr logger(log4cxx::Logger::getRootLogger());
-		logger->setLevel(log4cxx::Level::getWarn());
+		logger->setLevel(log4cxx::Level::getDebug());
 	}
 
 	// set up again an individual level if you like
+	/*
 	{
 		log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger("PingPong"));
@@ -122,4 +123,5 @@
 			logger->setLevel(log4cxx::Level::getDebug());
 	}
+	*/
 
 	//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
