Index: uspace/app/test_serial/test_serial.c
===================================================================
--- uspace/app/test_serial/test_serial.c	(revision f619943a9617951fa5add062030a723ce071249a)
+++ uspace/app/test_serial/test_serial.c	(revision cf8cc3692ffb17058d5881b6bfdde3a4a5d050fd)
@@ -92,12 +92,24 @@
 	}
 	
-	res = ipc_call_sync_1_0(phone, SERIAL_SET_BAUD_RATE, 1200);
+	unsigned int old_baud, old_par, old_stop, old_word_size;
+	
+	res = ipc_call_sync_0_4(phone, SERIAL_GET_COM_PROPS, &old_baud, &old_par, &old_word_size, &old_stop);	
 	if (EOK != res) {
-		printf(NAME ": failed to set baud rate, errno = %d.\n", -res);
+		printf(NAME ": failed to get old communication parameters, errno = %d.\n", -res);
 		devman_hangup_phone(DEVMAN_CLIENT);
 		ipc_hangup(phone);
 		free(buf);
-		return 4;		
+		return 4;
 	}
+	
+	res = ipc_call_sync_4_0(phone, SERIAL_SET_COM_PROPS, 1200, SERIAL_NO_PARITY, 8, 1);	
+	if (EOK != res) {
+		printf(NAME ": failed to set communication parameters, errno = %d.\n", -res);
+		devman_hangup_phone(DEVMAN_CLIENT);
+		ipc_hangup(phone);
+		free(buf);
+		return 4;
+	}
+	
 	
 	int total = 0;
@@ -107,4 +119,5 @@
 		if (0 > read) {
 			printf(NAME ": failed read from device, errno = %d.\n", -read);
+			ipc_call_sync_4_0(phone, SERIAL_SET_COM_PROPS, old_baud, old_par, old_word_size, old_stop);	
 			ipc_hangup(phone);
 			devman_hangup_phone(DEVMAN_CLIENT);
@@ -126,4 +139,6 @@
 	write_dev(phone, the_end, str_size(the_end));
 	
+	// restore original communication settings
+	ipc_call_sync_4_0(phone, SERIAL_SET_COM_PROPS, old_baud, old_par, old_word_size, old_stop);	
 	devman_hangup_phone(DEVMAN_CLIENT);
 	ipc_hangup(phone);
