                 if (nMessage > 0)
                     Serial.print(pMessage[0], HEX);
                 Serial.print(F(" length 0x"));
-                Serial.println(nMessage);
+                Serial.println((unsigned) nMessage);
             }
             return;
         }

        */
        case EV_TXSTART:
            // this event tells us that a transmit is about to start.
            Serial.print(F("EV_TXSTART: channel "));
            Serial.println(LMIC.txChnl);
            break;
        default:
            Serial.print(F("Unknown event: "));


// Schedule TX every this many seconds (might become longer due to duty
// cycle limitations).
const unsigned TX_INTERVAL = 5;

// global flag for test mode.
bool g_fTestMode = false;
