Index: uspace/drv/vhc/conn.h
===================================================================
--- uspace/drv/vhc/conn.h	(revision 7034be15c0af2249a6ef774fecbf440e2c7a3ef4)
+++ uspace/drv/vhc/conn.h	(revision e27595b02d72a0481e9c16c944a072b87ac5190a)
@@ -42,6 +42,9 @@
 
 void connection_handler_host(ipcarg_t);
-void connection_handler_device(ipcarg_t, virtdev_connection_t *);
+
 usb_hcd_transfer_ops_t vhc_transfer_ops;
+
+void default_connection_handler(device_t *, ipc_callid_t, ipc_call_t *);
+
 
 #endif
Index: uspace/drv/vhc/conndev.c
===================================================================
--- uspace/drv/vhc/conndev.c	(revision 7034be15c0af2249a6ef774fecbf440e2c7a3ef4)
+++ uspace/drv/vhc/conndev.c	(revision e27595b02d72a0481e9c16c944a072b87ac5190a)
@@ -74,47 +74,40 @@
 }
 
-/** Connection handler for communcation with virtual device.
+/** Default handler for IPC methods not handled by DDF.
  *
- * This function also takes care of proper phone hung-up.
- *
- * @param phone_hash Incoming phone hash.
- * @param dev Virtual device handle.
+ * @param dev Device handling the call.
+ * @param icallid Call id.
+ * @param icall Call data.
  */
-void connection_handler_device(ipcarg_t phone_hash, virtdev_connection_t *dev)
+void default_connection_handler(device_t *dev,
+    ipc_callid_t icallid, ipc_call_t *icall)
 {
-	assert(dev != NULL);
-	
-	char devname[DEVICE_NAME_MAXLENGTH + 1];
-	int rc = get_device_name(dev->phone, devname, DEVICE_NAME_MAXLENGTH);
-	
-	dprintf(0, "virtual device connected (phone: %#x, name: %s)",
-	    phone_hash, rc == EOK ? devname : "<unknown>");
-	
-	
-	while (true) {
-		ipc_callid_t callid; 
-		ipc_call_t call; 
-		
-		callid = async_get_call(&call);
-		
-		switch (IPC_GET_METHOD(call)) {
-			case IPC_M_PHONE_HUNGUP:
-				ipc_hangup(dev->phone);
-				ipc_answer_0(callid, EOK);
-				dprintf(0, "phone%#x: device hung-up",
-				    phone_hash);
-				return;
-			
-			case IPC_M_CONNECT_TO_ME:
-				ipc_answer_0(callid, ELIMIT);
-				break;
-			
-			default:
-				dprintf_inval_call(2, call, phone_hash);
-				ipc_answer_0(callid, EINVAL);
-				break;
+	ipcarg_t method = IPC_GET_METHOD(*icall);
+
+	if (method == IPC_M_CONNECT_TO_ME) {
+		int callback = IPC_GET_ARG5(*icall);
+		virtdev_connection_t *dev
+		    = virtdev_add_device(callback);
+		if (!dev) {
+			ipc_answer_0(icallid, EEXISTS);
+			ipc_hangup(callback);
+			return;
 		}
+		ipc_answer_0(icallid, EOK);
+
+		char devname[DEVICE_NAME_MAXLENGTH + 1];
+		int rc = get_device_name(callback, devname, DEVICE_NAME_MAXLENGTH);
+
+		dprintf(0, "virtual device connected (name: %s)",
+		    rc == EOK ? devname : "<unknown>");
+
+		/* FIXME: destroy the device when the client disconnects. */
+
+		return;
 	}
+
+	ipc_answer_0(icallid, EINVAL);
 }
+
 
 /**
Index: uspace/drv/vhc/devices.h
===================================================================
--- uspace/drv/vhc/devices.h	(revision 7034be15c0af2249a6ef774fecbf440e2c7a3ef4)
+++ uspace/drv/vhc/devices.h	(revision e27595b02d72a0481e9c16c944a072b87ac5190a)
@@ -50,4 +50,5 @@
 
 virtdev_connection_t *virtdev_add_device(int);
+virtdev_connection_t *virtdev_get_mine(void);
 void virtdev_destroy_device(virtdev_connection_t *);
 usb_transaction_outcome_t virtdev_send_to_all(transaction_t *);
Index: uspace/drv/vhc/hcd.c
===================================================================
--- uspace/drv/vhc/hcd.c	(revision 7034be15c0af2249a6ef774fecbf440e2c7a3ef4)
+++ uspace/drv/vhc/hcd.c	(revision e27595b02d72a0481e9c16c944a072b87ac5190a)
@@ -52,8 +52,8 @@
 #include "conn.h"
 
+
 static int vhc_count = 0;
 static int vhc_add_device(usb_hc_device_t *dev)
 {
-	printf("%s: new device registered.\n", NAME);
 	/*
 	 * Currently, we know how to simulate only single HC.
@@ -66,4 +66,5 @@
 
 	dev->transfer_ops = &vhc_transfer_ops;
+	dev->generic->ops->default_handler = default_connection_handler;
 
 	/*
@@ -71,4 +72,6 @@
 	 */
 	usb_hcd_add_root_hub(dev);
+
+	printf("%s: virtual USB host controller ready.\n", NAME);
 
 	return EOK;
@@ -84,4 +87,6 @@
 	printf("%s: virtual USB host controller driver.\n", NAME);
 
+	debug_level = 5;
+
 	return usb_hcd_main(&vhc_driver);
 }
