 
   // default tx power for US: 21 dBm
   LMIC.txpow = 21;
+#elif defined(CFG_au921)
+  // make it easier for test, by pull the parameters up to the top of the
+  // block. Ideally, we'd use the serial port to drive this; or have
+  // a voting protocol where one side is elected the controller and
+  // guides the responder through all the channels, powers, ramps
+  // the transmit power from min to max, and measures the RSSI and SNR.
+  // Even more amazing would be a scheme where the controller could
+  // handle multiple nodes; in that case we'd have a way to do
+  // production test and qualification. However, using an RWC5020A
+  // is a much better use of development time.
+
+  // set fDownlink true to use a downlink channel; false
+  // to use an uplink channel. Generally speaking, uplink
+  // is more interesting, because you can prove that gateways
+  // *should* be able to hear you.
+  const static bool fDownlink = false;
+
+  // the downlink channel to be used.
+  const static uint8_t kDownlinkChannel = 3;
+
+  // the uplink channel to be used.
+  const static uint8_t kUplinkChannel = 8 + 3;
+
+  // this is automatically set to the proper bandwidth in kHz,
+  // based on the selected channel.
+  uint32_t uBandwidth;
+
+  if (! fDownlink)
+	{
+	if (kUplinkChannel < 64)
+		{
+		LMIC.freq = AU921_125kHz_UPFBASE +
+			    kUplinkChannel * AU921_125kHz_UPFSTEP;
+		uBandwidth = 125;
+		}
+	else
+		{
+		LMIC.freq = AU921_500kHz_UPFBASE +
+			    (kUplinkChannel - 64) * AU921_500kHz_UPFSTEP;
+		uBandwidth = 500;
+		}
+	}
+  else
+	{
+	// downlink channel
+	LMIC.freq = AU921_500kHz_DNFBASE +
+		    kDownlinkChannel * AU921_500kHz_DNFSTEP;
+	uBandwidth = 500;
+	}
+
+  // Use a suitable spreading factor
+  if (uBandwidth < 500)
+        LMIC.datarate = AU921_DR_SF7;         // DR4
+  else
+        LMIC.datarate = AU921_DR_SF12CR;      // DR8
+
+  // default tx power for AU: 30 dBm
+  LMIC.txpow = 30;
 #elif defined(CFG_as923)
 // make it easier for test, by pull the parameters up to the top of the
 // block. Ideally, we'd use the serial port to drive this; or have

        else
                LMIC.datarate = AS923_DR_SF7B;        // DR8

        // default tx power for US: 21 dBm
        LMIC.txpow = 16;
#else
# error Unsupported LMIC regional configuration.
#endif

// handle multiple nodes; in that case we'd have a way to do
// production test and qualification. However, using an RWC5020A
// is a much better use of development time.
        const static uint8_t kChannel = 0;
        uint32_t uBandwidth;

        LMIC.freq = AS923_F1 + kChannel * 200000;
