Index: source/ariba/Makefile.am
===================================================================
--- source/ariba/Makefile.am	(revision 5637)
+++ source/ariba/Makefile.am	(revision 5638)
@@ -245,5 +245,5 @@
 
 libariba_la_SOURCES += \
-  communication/networkinfo/AddressInformation.cpp \
+  communication/networkinfo/AddressDiscovery.cpp \
   communication/networkinfo/NetworkChangeDetection.cpp \
   communication/networkinfo/NetworkInformation.cpp \
@@ -251,5 +251,5 @@
 
 nobase_libariba_la_HEADERS += \
-  communication/networkinfo/AddressInformation.h \
+  communication/networkinfo/AddressDiscovery.h \
   communication/networkinfo/NetworkChangeDetection.h \
   communication/networkinfo/NetworkChangeInterface.h \
Index: source/ariba/communication/BaseCommunication.cpp
===================================================================
--- source/ariba/communication/BaseCommunication.cpp	(revision 5637)
+++ source/ariba/communication/BaseCommunication.cpp	(revision 5638)
@@ -38,4 +38,5 @@
 
 #include "BaseCommunication.h"
+#include "networkinfo/AddressDiscovery.h"
 
 #ifdef UNDERLAY_OMNET
@@ -51,6 +52,4 @@
 namespace ariba {
 namespace communication {
-
-#include "networkinfo/AddressDiscovery.hpp"
 
 use_logging_cpp(BaseCommunication);
@@ -115,5 +114,5 @@
 
 	logging_info( "Searching for local locators ..." );
-	discover_endpoints(localDescriptor.getEndpoints());
+	AddressDiscovery::discover_endpoints( localDescriptor.getEndpoints() );
 	logging_info( "Done. Local endpoints = " << localDescriptor.toString() );
 
Index: source/ariba/communication/networkinfo/AddressDiscovery.hpp
===================================================================
--- source/ariba/communication/networkinfo/AddressDiscovery.hpp	(revision 5637)
+++ 	(revision )
@@ -1,102 +1,0 @@
-#ifndef ADDRESSDISCOVERY_HPP_
-#define ADDRESSDISCOVERY_HPP_
-
-#include "ariba/utility/addressing/addressing.hpp"
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-
-#include <arpa/inet.h>
-
-#include <netinet/in.h>
-
-#include <net/if.h>
-
-#include <ifaddrs.h>
-
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/hci.h>
-#include <bluetooth/hci_lib.h>
-
-using namespace ariba::addressing;
-
-mac_address getMacFromIF( const char* name ) {
-	int s;
-	struct ifreq buffer;
-	s = socket(PF_INET, SOCK_DGRAM, 0);
-	memset(&buffer, 0x00, sizeof(buffer));
-	strcpy(buffer.ifr_name, name);
-	ioctl(s, SIOCGIFHWADDR, &buffer);
-	close(s);
-	mac_address addr;
-	addr.assign( (uint8_t*)buffer.ifr_hwaddr.sa_data, 6 );
-	return addr;
-}
-
-
-int dev_info(int s, int dev_id, long arg) {
-	endpoint_set* set = (endpoint_set*)arg;
-	struct hci_dev_info di;
-	di.dev_id = dev_id;
-	if (ioctl(s, HCIGETDEVINFO, (void *) &di)) return 0;
-	mac_address mac;
-	mac.bluetooth( di.bdaddr );
-	address_vf vf = mac;
-	set->add(vf);
-	return 0;
-}
-
-void discover_bluetooth( endpoint_set& endpoints ) {
-	hci_for_each_dev(HCI_UP, &dev_info, (long)&endpoints );
-}
-
-void discover_ip_addresses( endpoint_set& endpoints ) {
-	struct ifaddrs* ifaceBuffer = NULL;
-	struct ifaddrs* tmpAddr     = NULL;
-	void*           tmpAddrPtr  = NULL;
-	char            straddr     [INET_ADDRSTRLEN];
-
-	int ret = getifaddrs( &ifaceBuffer );
-	if( ret != 0 ) return;
-
-	for( struct ifaddrs* i=ifaceBuffer; i != NULL; i=i->ifa_next ) {
-
-		// ignore devices that are disabled or have no ip
-		if(i == NULL) continue;
-		struct sockaddr* addr = i->ifa_addr;
-
-		// only look at IPv4, not IPv6 addresses
-		if (addr->sa_family == AF_INET) {
-			if (addr==NULL) continue;
-			tmpAddrPtr= &((struct sockaddr_in*)addr)->sin_addr;
-			inet_ntop( i->ifa_addr->sa_family, tmpAddrPtr, straddr, sizeof(straddr) );
-			ip_address ip = straddr;
-			if (ip.is_loopback()) continue;
-			address_vf vf = ip;
-			endpoints.add( vf );
-		} else
-		if (addr->sa_family == AF_INET6) {
-			if (addr==NULL) continue;
-			tmpAddrPtr= &((struct sockaddr_in6*)addr)->sin6_addr;
-			inet_ntop( i->ifa_addr->sa_family, tmpAddrPtr, straddr, sizeof(straddr) );
-			ip_address ip = straddr;
-			if (ip.is_loopback()) continue;
-			address_vf vf = ip;
-			endpoints.add( vf );
-		} else
-		if (i->ifa_name[0]=='p' && i->ifa_name[1]=='a' && i->ifa_name[2]=='n') {
-			mac_address mac = getMacFromIF(i->ifa_name);
-			address_vf vf = mac;
-//			endpoints.add( vf );
-		}
-	}
-}
-
-void discover_endpoints( endpoint_set& endpoints ) {
-	discover_ip_addresses( endpoints );
-	discover_bluetooth( endpoints );
-}
-
-#endif /* ADDRESSDISCOVERY_HPP_ */
Index: source/ariba/communication/networkinfo/AddressInformation.cpp
===================================================================
--- source/ariba/communication/networkinfo/AddressInformation.cpp	(revision 5637)
+++ 	(revision )
@@ -1,90 +1,0 @@
-// [License]
-// The Ariba-Underlay Copyright
-//
-// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
-//
-// Institute of Telematics
-// UniversitÃ€t Karlsruhe (TH)
-// Zirkel 2, 76128 Karlsruhe
-// Germany
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-//
-// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ARIBA PROJECT OR
-// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// The views and conclusions contained in the software and documentation
-// are those of the authors and should not be interpreted as representing
-// official policies, either expressed or implied, of the Institute of
-// Telematics.
-// [License]
-
-#include "AddressInformation.h"
-
-#include <ifaddrs.h>
-
-#include <boost/asio/ip/address.hpp>
-#include <boost/asio/ip/address_v4.hpp>
-
-namespace ariba {
-namespace communication {
-
-using namespace ariba::addressing;
-
-AddressInformation::AddressInformation(){
-}
-
-AddressInformation::~AddressInformation(){
-}
-
-AddressList AddressInformation::getAddresses(const NetworkInterface& interface){
-
-	AddressList retlist;
-
-	// gather transport addresses
-	struct ifaddrs* ifap;
-	getifaddrs( &ifap );
-
-	for( struct ifaddrs* p = ifap; p != NULL; p=p->ifa_next ){
-
-		// no name set? ->continue
-		if( interface.name.compare(string(p->ifa_name)) != 0 ) continue;
-
-		// handle IPv4 entry
-		struct sockaddr* addr = p->ifa_addr;
-		if( addr->sa_family == AF_INET ) {
-			// get address
-			const struct sockaddr_in& ipv4 = (const struct sockaddr_in&)*addr;
-			boost::asio::ip::address_v4::bytes_type bytes;
-			for( int i=0; i<4; i++ )
-				bytes[i] = (ipv4.sin_addr.s_addr >> (24-i*8)) & 0xff;
-
-			// add ipv4 address
-			boost::asio::ip::address boost_addr = boost::asio::ip::address_v4( bytes );
-			retlist.push_back( vcapsule<address_v>( ip_address(boost_addr) ) );
-		}
-	}
-
-	freeifaddrs( ifap );
-
-	return retlist;
-}
-
-}} // namespace ariba, communication
Index: source/ariba/communication/networkinfo/AddressInformation.h
===================================================================
--- source/ariba/communication/networkinfo/AddressInformation.h	(revision 5637)
+++ 	(revision )
@@ -1,66 +1,0 @@
-// [License]
-// The Ariba-Underlay Copyright
-//
-// Copyright (c) 2008-2009, Institute of Telematics, UniversitÃ€t Karlsruhe (TH)
-//
-// Institute of Telematics
-// UniversitÃ€t Karlsruhe (TH)
-// Zirkel 2, 76128 Karlsruhe
-// Germany
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// 1. Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-//
-// THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ARIBA PROJECT OR
-// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// The views and conclusions contained in the software and documentation
-// are those of the authors and should not be interpreted as representing
-// official policies, either expressed or implied, of the Institute of
-// Telematics.
-// [License]
-
-#ifndef __ADDRESS_INFORMATION_H
-#define __ADDRESS_INFORMATION_H
-
-#include <vector>
-
-#include "ariba/communication/networkinfo/NetworkInterface.h"
-#include "ariba/utility/addressing/addressing.hpp"
-
-namespace ariba {
-namespace communication {
-
-using namespace std;
-using namespace ariba::addressing;
-
-/// a list of addresses
-typedef vector<address_v*> AddressList;
-
-class AddressInformation {
-public:
-	AddressInformation();
-	~AddressInformation();
-
-	AddressList getAddresses(const NetworkInterface& interface);
-};
-
-}} // namespace ariba, communication
-
-#endif // __ADDRESS_INFORMATION_H
Index: source/ariba/communication/networkinfo/NetworkInformation.cpp
===================================================================
--- source/ariba/communication/networkinfo/NetworkInformation.cpp	(revision 5637)
+++ source/ariba/communication/networkinfo/NetworkInformation.cpp	(revision 5638)
@@ -38,4 +38,11 @@
 
 #include "NetworkInformation.h"
+#include "ariba/config.h"
+
+#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
+  #include <bluetooth/bluetooth.h>
+  #include <bluetooth/hci.h>
+  #include <bluetooth/hci_lib.h>
+#endif
 
 namespace ariba {
@@ -192,4 +199,57 @@
 	} // for( ; i != iend; i++ )*/
 
+	//
+	// not we try to get bluetooth interfaces
+	//
+
+#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
+
+	int btsock = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
+	if(btsock <  0){
+		logging_error("failed getting bluetooth raw socket");
+		return retlist;
+	}
+
+	struct hci_dev_list_req* btlist = NULL;
+	struct hci_dev_req* btdev = NULL;
+
+	btlist = (hci_dev_list_req*)malloc(HCI_MAX_DEV *
+			sizeof(struct hci_dev_list_req) + sizeof(struct hci_dev_req));
+
+	btlist->dev_num = HCI_MAX_DEV;
+	btdev = btlist->dev_req;
+
+	if(ioctl(btsock, HCIGETDEVLIST, btlist) < 0){
+		logging_error("failed getting requesting bluetooth devices");
+		free(btlist);
+		close(btsock);
+		return retlist;
+	}
+
+	btdev = btlist->dev_req;
+
+	for(int i=0; i<btlist->dev_num; i++, btdev++){
+		struct hci_dev_info di;
+		NetworkInterface interface;
+
+		if(hci_devinfo(btdev->dev_id, &di) < 0) continue;
+		if(hci_test_bit(HCI_RAW, &di.flags)) continue;
+
+		interface.name = string(di.name);
+		interface.index = di.dev_id;
+		interface.mtu = di.sco_mtu;
+		interface.isBroadcast = false;
+		interface.isLoopback = false;
+		interface.isMulticast = false;
+		interface.isUp = hci_test_bit(HCI_UP, &di.flags);
+		interface.isRunning = hci_test_bit(HCI_RUNNING, &di.flags);
+
+		retlist.push_back( interface );
+	}
+
+	free(btlist);
+	close(btsock);
+#endif
+
 	return retlist;
 }
Index: source/ariba/communication/networkinfo/NetworkInterface.h
===================================================================
--- source/ariba/communication/networkinfo/NetworkInterface.h	(revision 5637)
+++ source/ariba/communication/networkinfo/NetworkInterface.h	(revision 5638)
@@ -63,10 +63,23 @@
 	bool 	isBroadcast;
 	bool	isMulticast;
-	int	mtu;
-	int	txQueueLen;
+	int		mtu;
+	int		txQueueLen;
 
 	static NetworkInterface UNDEFINED;
 
-	inline bool operator==(const NetworkInterface& rh ){
+	NetworkInterface& operator=(const NetworkInterface& rh){
+		name 		= rh.name;
+		index 		= rh.index;
+		isRunning 	= rh.isRunning;
+		isUp 		= rh.isUp;
+		isLoopback 	= rh.isLoopback;
+		isBroadcast	= rh.isBroadcast;
+		isMulticast	= rh.isMulticast;
+		mtu 		= rh.mtu;
+		txQueueLen	= rh.txQueueLen;
+		return *this;
+	}
+
+	bool operator==(const NetworkInterface& rh ){
 		// equality means same name
 		return ( name.compare(rh.name) == 0 );
Index: source/ariba/overlay/BaseOverlay.cpp
===================================================================
--- source/ariba/overlay/BaseOverlay.cpp	(revision 5637)
+++ source/ariba/overlay/BaseOverlay.cpp	(revision 5638)
@@ -127,5 +127,5 @@
 		// get descriptor of first hop
 		rld = getDescriptor(rlid);
-		logging_force( rld );
+		logging_info( rld );
 
 		// is first hop a relay path? yes-> try to find real link!
@@ -154,5 +154,5 @@
 		return NodeID::UNSPECIFIED;
 	else {
-		logging_force( "Returning relay node " << relayNode.toString() );
+		logging_info( "Returning relay node " << relayNode.toString() );
 		return relayNode;
 	}
@@ -810,5 +810,5 @@
 		// if link is a relayed link ->convert to direct link
 		if (ld->relay) {
-			logging_force( "Converting to direct link: " << ld );
+			logging_info( "Converting to direct link: " << ld );
 			ld->up = true;
 			ld->relay = false;
@@ -836,5 +836,5 @@
 	LinkDescriptor* ld = getDescriptor(id, true);
 	if ( ld == NULL ) return; // not found? ->ignore!
-	logging_force( "onLinkDown descriptor: " << ld );
+	logging_info( "onLinkDown descriptor: " << ld );
 
 	// inform listeners about link down
@@ -1426,5 +1426,5 @@
 			logging_debug( "received keep-alive on link" );
 			if ( ld != NULL ) {
-				logging_force("Keep-Alive for "<< ld->overlayId);
+				logging_info("Keep-Alive for "<< ld->overlayId);
 				ld->markAlive();
 			}
@@ -1445,5 +1445,5 @@
 				break;
 			}
-			logging_force( "Received direct link convert notification for " << rld );
+			logging_info( "Received direct link convert notification for " << rld );
 
 			// set communcation link id and set it up
@@ -1560,5 +1560,5 @@
 			// missed more than four keep-alive messages (10 sec)? -> drop link
 			if (ld->keepAliveMissed > 4) {
-				logging_force( "Link connection request is stale, closing: " << ld );
+				logging_info( "Link connection request is stale, closing: " << ld );
 				oldlinks.push_back( ld );
 				continue;
@@ -1588,5 +1588,5 @@
 			// missed more than four keep-alive messages (4 sec)? -> drop link
 			if (ld->keepAliveMissed >= 8) {
-				logging_force( "Link is stale, closing: " << ld );
+				logging_info( "Link is stale, closing: " << ld );
 				oldlinks.push_back( ld );
 				continue;
@@ -1602,9 +1602,9 @@
 
 		if (!ld->communicationId.isUnspecified() && it != bootstrapLinks.end() ){
-			logging_force( "Not dropping initiator link: " << ld );
+			logging_info( "Not dropping initiator link: " << ld );
 			continue;
 		}
 */
-		logging_force( "Link timed out. Dropping " << ld );
+		logging_info( "Link timed out. Dropping " << ld );
 		dropLink( ld->overlayId );
 	}
@@ -1618,10 +1618,10 @@
 void BaseOverlay::showLinkState() {
 	int i=0;
-	logging_force("--- link state -------------------------------");
+	logging_info("--- link state -------------------------------");
 	BOOST_FOREACH( LinkDescriptor* ld, links ) {
-		logging_force("link " << i << ": " << ld);
+		logging_info("link " << i << ": " << ld);
 		i++;
 	}
-	logging_force("----------------------------------------------");
+	logging_info("----------------------------------------------");
 }
 
Index: source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp
===================================================================
--- source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp	(revision 5637)
+++ source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp	(revision 5638)
@@ -41,19 +41,19 @@
 #ifdef HAVE_BLUETOOTH_BLUETOOTH_H
 
-	// Attribute descriptors for SDP
-	// base was chosen randomly
-	#define SDP_SPOVNET_BASE 			0x4000
-	#define SDP_ATTR_SPOVNET_NAME		0x0000 + SDP_SPOVNET_BASE
-	#define SDP_ATTR_SPOVNET_INFO1		0x0001 + SDP_SPOVNET_BASE
-	#define SDP_ATTR_SPOVNET_INFO2		0x0002 + SDP_SPOVNET_BASE
-	#define SDP_ATTR_SPOVNET_INFO3		0x0003 + SDP_SPOVNET_BASE
-
-	// The SpoVNet unique identifier, this should be the same for all SpoVNet implementations
-	const uint8_t svc_uuid_int[] = {0x59, 0x29, 0x24, 0x34, 0x69, 0x42, 0x11, 0xde, 0x94,
+// Attribute descriptors for SDP
+// base was chosen randomly
+#define SDP_SPOVNET_BASE 			0x4000
+#define SDP_ATTR_SPOVNET_NAME		0x0000 + SDP_SPOVNET_BASE
+#define SDP_ATTR_SPOVNET_INFO1		0x0001 + SDP_SPOVNET_BASE
+#define SDP_ATTR_SPOVNET_INFO2		0x0002 + SDP_SPOVNET_BASE
+#define SDP_ATTR_SPOVNET_INFO3		0x0003 + SDP_SPOVNET_BASE
+
+// The SpoVNet unique identifier, this should be the same for all SpoVNet implementations
+const uint8_t svc_uuid_int[] = {0x59, 0x29, 0x24, 0x34, 0x69, 0x42, 0x11, 0xde, 0x94,
 		0x3e, 0x00, 0x21, 0x5d, 0xb4, 0xd8, 0x54};
 
-	const char *service_name = "SpoVNet";
-	const char *svc_dsc = "www.ariba-underlay.org";
-	const char *service_prov = "ITM Uni Karlsruhe";
+const char *service_name = "SpoVNet";
+const char *svc_dsc = "www.ariba-underlay.org";
+const char *service_prov = "ITM Uni Karlsruhe";
 
 #endif // HAVE_BLUETOOTH_BLUETOOTH_H
@@ -67,5 +67,4 @@
 	BootstrapModule(_callback), scan_timer_(io_service_) {
 	srand( time(NULL) );
-	found = false;
 #ifdef HAVE_BLUETOOTH_BLUETOOTH_H
 
@@ -141,5 +140,5 @@
 	uuid_t root_uuid, l2cap_uuid, rfcomm_uuid, svc_uuid, svc_class_uuid;
 	sdp_list_t *l2cap_list = 0, *rfcomm_list = 0, *root_list = 0, *proto_list =
-	0, *access_proto_list = 0, *svc_class_list = 0, *profile_list = 0;
+		0, *access_proto_list = 0, *svc_class_list = 0, *profile_list = 0;
 	sdp_data_t *channel = 0;
 	sdp_profile_desc_t profile;
@@ -253,56 +252,65 @@
 
 void BluetoothSdp::bt_scan() {
-	/*
-	 * Scans for other bluetooth devices and starts a SDP search on them.
-	 */
-
-	logging_debug("scanning for peers");
-
-	inquiry_info *ii = NULL;
-	int max_rsp, num_rsp;
-	int dev_id, sock, len, flags;
-	int i;
-
-	bdaddr_t address;
-	uint8_t channel;
-
-	dev_id = hci_get_route(NULL);
-	sock = hci_open_dev(dev_id);
-	if (dev_id < 0 || sock < 0) {
-		logging_error("opening socket for device "
-				<< dev_id << " failed. can not scan for peers: " << strerror(errno));
-		return;
-	}
-
-	len = 8;
-	max_rsp = 255;
-	flags = IREQ_CACHE_FLUSH;
-	ii = (inquiry_info*) malloc(max_rsp * sizeof(inquiry_info));
-
-	num_rsp = hci_inquiry(dev_id, len, max_rsp, NULL, &ii, flags);
-	if (num_rsp < 0)
-		logging_error("hci_inquiry failed with " << num_rsp << ": " << strerror(errno));
-
-	for (i = 0; i < num_rsp; i++) {
-		address = (ii + i)->bdaddr;
-
-		string saddress = ba2string(&address);
-		string sname = ba2name(&address, sock);
-
-		logging_debug("found peer [" << saddress << "] [" << sname << "]");
-		sdp_search( address, sname );
-	}
-
-	free(ii);
-	close(sock);
-
-	if(!found){
-		int nextscan = (rand() % 30) + 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) );
-	}
+
+	//
+	// scan for devices if we have no active rfcomm connections running.
+	// otherwise we would break existing connections due to chipping seq
+	//
+
+	if(!haveConnections()){
+
+		/*
+		 * Scans for other bluetooth devices and starts a SDP search on them.
+		 */
+
+		logging_debug("scanning for peers");
+
+		inquiry_info *ii = NULL;
+		int max_rsp, num_rsp;
+		int dev_id, sock, len, flags;
+		int i;
+
+		bdaddr_t address;
+		uint8_t channel;
+
+		dev_id = hci_get_route(NULL);
+		sock = hci_open_dev(dev_id);
+		if (dev_id < 0 || sock < 0) {
+			logging_error("opening socket for device "
+					<< dev_id << " failed. can not scan for peers: " << strerror(errno));
+			return;
+		}
+
+		len = 8;
+		max_rsp = 255;
+		flags = IREQ_CACHE_FLUSH;
+		ii = (inquiry_info*) malloc(max_rsp * sizeof(inquiry_info));
+
+		num_rsp = hci_inquiry(dev_id, len, max_rsp, NULL, &ii, flags);
+		if (num_rsp < 0)
+			logging_error("hci_inquiry failed with " << num_rsp << ": " << strerror(errno));
+
+		for (i = 0; i < num_rsp; i++) {
+			address = (ii + i)->bdaddr;
+
+			string saddress = ba2string(&address);
+			string sname = ba2name(&address, sock);
+
+			logging_debug("found peer [" << saddress << "] [" << sname << "]");
+			sdp_search( address, sname );
+		}
+
+		free(ii);
+		close(sock);
+
+	} else {
+		logging_debug("have active rfcomm connectinos, not searching");
+	}
+
+	int nextscan = (rand() % 30) + 5;
+	logging_debug("next sdp scan try in " << nextscan << " seconds");
+
+	scan_timer_.expires_from_now( boost::posix_time::seconds(nextscan) );
+	scan_timer_.async_wait( boost::bind(&BluetoothSdp::bt_scan, this) );
 }
 
@@ -372,5 +380,4 @@
 
 				// Callback
-				found = true;
 				callback->onBootstrapServiceFound(name, info1, info2, info3);
 			}
@@ -410,4 +417,34 @@
 }
 
+bool BluetoothSdp::haveConnections(){
+
+	struct hci_conn_list_req* cl = NULL;
+	struct hci_conn_info* ci = NULL;
+
+	int btsock = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
+	if(btsock <  0){
+		logging_error("failed getting bluetooth raw socket");
+		return true; // return true to be safe here and not perform sdp scan
+	}
+
+	cl = (struct hci_conn_list_req*)malloc(10 * sizeof(struct hci_conn_info) + sizeof(struct hci_conn_list_req));
+
+	cl->dev_id = hci_get_route(NULL);;
+	cl->conn_num = 10;
+	ci = cl->conn_info;
+
+	if(ioctl(btsock, HCIGETCONNLIST, (void*)cl)){
+		logging_warn("could not get active rfcomm connections");
+		return true; // return true to be safe here and not perform sdp scan
+	}
+
+	bool haveconn = (cl->conn_num > 0);
+	logging_error("we have " << cl->conn_num << " active connections");
+	free(cl);
+	close(btsock);
+
+	return haveconn;
+}
+
 #endif // HAVE_BLUETOOTH_BLUETOOTH_H
 
Index: source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.h
===================================================================
--- source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.h	(revision 5637)
+++ source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.h	(revision 5638)
@@ -92,4 +92,6 @@
 	sdp_session_t *sdp_session_;
 	uint8_t channel_;
+
+	bool haveConnections();
 #endif // HAVE_BLUETOOTH_BLUETOOTH_H
 
@@ -97,7 +99,4 @@
 	boost::asio::deadline_timer scan_timer_;
 	boost::thread t_;
-
-	bool found;
-
 };
 
Index: source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.h
===================================================================
--- source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.h	(revision 5637)
+++ source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.h	(revision 5638)
@@ -352,7 +352,9 @@
 				if( it != services->end() ){
 
+					/*
 					it->second.setInfo1( msg.getInfo1() );
 					it->second.setInfo2( msg.getInfo2() );
 					it->second.setInfo3( msg.getInfo3() );
+					*/
 					it->second.setLastseen( time(NULL) );
 
Index: source/ariba/utility/logging/Logging.h
===================================================================
--- source/ariba/utility/logging/Logging.h	(revision 5637)
+++ source/ariba/utility/logging/Logging.h	(revision 5638)
@@ -44,5 +44,4 @@
 #include <log4cxx/logger.h>
 #include <log4cxx/basicconfigurator.h>
-#include "ariba/config.h"
 
 
@@ -71,25 +70,10 @@
 	log4cxx::LoggerPtr x::logger(log4cxx::Logger::getLogger(#x));
 
-#ifdef HAVE_MAEMO
-
-  #define logging_trace(x)  {                                                             }
-  #define logging_debug(x)  {                                                             }
-  #define logging_info(x)   {                                                             }
-  #define logging_warn(x)   {colorWarn;  LOG4CXX_WARN(logger,x);  colorDefault;           }
-  #define logging_error(x)  {colorError; LOG4CXX_ERROR(logger,x); colorDefault;           }
-  #define logging_force(x)  {                                                             }
-  #define logging_fatal(x)  {colorError; LOG4CXX_FATAL(logger,x); colorDefault; exit(-1); }
-
-#else
-
-  #define logging_trace(x)  {            LOG4CXX_TRACE(logger,x);                         }
-  #define logging_debug(x)  {colorDebug; LOG4CXX_DEBUG(logger,x); colorDefault;           }
-  #define logging_info(x)   {colorInfo;  LOG4CXX_INFO(logger,x);  colorDefault;           }
-  #define logging_warn(x)   {colorWarn;  LOG4CXX_WARN(logger,x);  colorDefault;           }
-  #define logging_error(x)  {colorError; LOG4CXX_ERROR(logger,x); colorDefault;           }
-  #define logging_force(x)  {colorInfo;  LOG4CXX_INFO(logger,x);  colorDefault;           }
-  #define logging_fatal(x)  {colorError; LOG4CXX_FATAL(logger,x); colorDefault; exit(-1); }
-
-#endif // HAVE_MAEMO
+#define logging_trace(x)  {            LOG4CXX_TRACE(logger,x);                         }
+#define logging_debug(x)  {colorDebug; LOG4CXX_DEBUG(logger,x); colorDefault;           }
+#define logging_info(x)   {colorInfo;  LOG4CXX_INFO(logger,x);  colorDefault;           }
+#define logging_warn(x)   {colorWarn;  LOG4CXX_WARN(logger,x);  colorDefault;           }
+#define logging_error(x)  {colorError; LOG4CXX_ERROR(logger,x); colorDefault;           }
+#define logging_fatal(x)  {colorError; LOG4CXX_FATAL(logger,x); colorDefault; exit(-1); }
 
 #endif //LOGGING_H__
Index: source/ariba/utility/serialization/DataStream.hpp
===================================================================
--- source/ariba/utility/serialization/DataStream.hpp	(revision 5637)
+++ source/ariba/utility/serialization/DataStream.hpp	(revision 5638)
@@ -509,5 +509,6 @@
 				i++;
 			}
-			if (isCharP) *text = strdup(s.c_str()); else *string = s;
+			if (isCharP) *text = strdup(s.c_str());
+			else string->assign(s);
 		}
 		sznMethodEnd()
Index: source/ariba/utility/system/StartupWrapper.cpp
===================================================================
--- source/ariba/utility/system/StartupWrapper.cpp	(revision 5637)
+++ source/ariba/utility/system/StartupWrapper.cpp	(revision 5638)
@@ -38,4 +38,5 @@
 
 #include "StartupWrapper.h"
+#include "ariba/config.h"
 
 namespace ariba {
@@ -131,4 +132,9 @@
 	// DON'T SVN COMMIT YOUR CHANGED LOGGING! THE ABOVE CODE MUST REMAIN AS IS!
 	//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
+
+#ifdef HAVE_MAEMO
+	log4cxx::LoggerPtr logger(log4cxx::Logger::getRootLogger());
+	logger->setLevel(log4cxx::Level::getWarn());
+#endif
 }
 
