 };
 
 void lmic_printf(const char *fmt, ...) {
-	if (! Serial.dtr())
-		return;
-
-	char buf[256];
-	va_list ap;
-
-	va_start(ap, fmt);
-	(void) vsnprintf(buf, sizeof(buf) - 1, fmt, ap);
-	va_end(ap);
-
-	// in case we overflowed:
-	buf[sizeof(buf) - 1] = '\0';
-	if (Serial.dtr()) Serial.print(buf);
+        if (! Serial.dtr())
+                return;
+
+        char buf[256];
+        va_list ap;
+
+        va_start(ap, fmt);
+        (void) vsnprintf(buf, sizeof(buf) - 1, fmt, ap);
+        va_end(ap);
+
+        // in case we overflowed:
+        buf[sizeof(buf) - 1] = '\0';
+        if (Serial.dtr()) Serial.print(buf);
 }
 
 osjob_t txjob;

        LMIC.freq = IN866_F1 + kChannel * 200000;
        uBandwidth = 125;

	LMIC.datarate = IN866_DR_SF7;         // DR7
        // default tx power for IN: 30 dBm
        LMIC.txpow = IN866_TX_EIRP_MAX_DBM;
#else

  uint32_t uBandwidth;

  if (! fDownlink)
        {
        if (kUplinkChannel < 64)
                {
                LMIC.freq = US915_125kHz_UPFBASE +
                            kUplinkChannel * US915_125kHz_UPFSTEP;
                uBandwidth = 125;
                }
        else
                {
                LMIC.freq = US915_500kHz_UPFBASE +
                            (kUplinkChannel - 64) * US915_500kHz_UPFSTEP;
                uBandwidth = 500;
                }
        }
  else
        {
        // downlink channel
        LMIC.freq = US915_500kHz_DNFBASE +
                    kDownlinkChannel * US915_500kHz_DNFSTEP;
        uBandwidth = 500;
        }

  // Use a suitable spreading factor
  if (uBandwidth < 500)
