--- megatec.c.orig	2010-10-13 16:44:36.000000000 +0400
+++ megatec.c	2010-10-13 16:36:46.000000000 +0400
@@ -517,20 +517,6 @@
 	QueryValues_t status;
 	UPSInfo_t info;
 
-	/*
-	 * Some models apparently time-out with the default send pace, so we must
-	 * allow the user to override it if needed be. The configuration parameter
-	 * is specified in milliseconds for the user's benefit.
-	 */
-	if (getval("sendpace")) {
-		upsdebugx(2, "Default command send pace is %d usec.", send_pace);
-		upsdebugx(2, "Parameter [sendpace]: [%s]", getval("sendpace"));
-
-		/* Having 1 second as the upper-bound is an arbitrary choice... */
-		send_pace = CLAMP(atoi(getval("sendpace")), 1, 1000) * 1000;
-
-		upslogx(LOG_NOTICE, "Command send pace changed to %d usec.", send_pace);
-	}
 
 	/*
 	 * UPS detection sequence.
@@ -999,6 +985,21 @@
 	upsfd = ser_open(device_path);
 	ser_set_speed(upsfd, device_path, B2400);
 
+	/*
+	 * Some models apparently time-out with the default send pace, so we must
+	 * allow the user to override it if needed be. The configuration parameter
+	 * is specified in milliseconds for the user's benefit.
+	 */
+	if (getval("sendpace")) {
+		upsdebugx(2, "Default command send pace is %d usec.", send_pace);
+		upsdebugx(2, "Parameter [sendpace]: [%s]", getval("sendpace"));
+
+		/* Having 1 second as the upper-bound is an arbitrary choice... */
+		send_pace = CLAMP(atoi(getval("sendpace")), 1, 1000) * 1000;
+
+		upslogx(LOG_NOTICE, "Command send pace changed to %d usec.", send_pace);
+	}
+
 	if (getval("dtr")) {
 		upsdebugx(2, "Parameter [dtr]: [%s]", getval("dtr"));
 
