                 break;
 
             case EV_JOINED:
-                Serial.print(F(": ch "));
-                Serial.println(unsigned(e.txChnl));
+                printTxChnl(e.txChnl);
+                printNl();
                 do  {
                     u4_t netid = 0;
                     devaddr_t devaddr = 0;

            case EV_TXSTART:
                // this event tells us that a transmit is about to start.
                // but printing here is bad for timing.
                Serial.print(F(": ch "));
                Serial.print(unsigned(e.txChnl));
                printRps(e.rps);
                Serial.print(F(", datarate ")); Serial.print(unsigned(e.datarate));
                printOpmode(e.opmode);
                printTxend(e.txend);
                break;

            case EV_RXSTART:
                Serial.print(F(": freq="));
                printFreq(e.freq);
                printRps(e.rps);
                Serial.print(F(", datarate ")); Serial.print(unsigned(e.datarate));
                printOpmode(e.opmode);
                printTxend(e.txend);
                Serial.print(F(", delta ms ")); Serial.print(osticks2ms(e.time - e.txend));
                break;

            case EV_JOIN_TXCOMPLETE:
                Serial.print(F(": saveIrqFlags 0x"));
                Serial.print(unsigned(e.saveIrqFlags), HEX);
                break;

            default:
                break;
        }
    }
    Serial.println("");
}

/*

    // Start job (sending automatically starts OTAA too)
    do_send(&sendjob);
}

void setup_printSignOnDashes(void)
    {
    Serial.print(F("------------------------------------"));
    }
void setup_printSignOnDashLine()
    {
    setup_printSignOnDashes();
    setup_printSignOnDashes();
    printNl();
    }

static constexpr const char *filebasename2(const char *s, const char *p) {
    return p[0] == '\0'                     ? s                             :
           (p[0] == '/' || p[0] == '\\')    ? filebasename2(p + 1, p + 1)   :
                                              filebasename2(s, p + 1)       ;
}

static constexpr const char *filebasename(const char *s)
    {
    return filebasename2(s, s);
    }

void printVersionFragment(char sep, uint8_t v) {
    if (sep != 0) {
        Serial.print(sep);
    }
    Serial.print(unsigned(v));
}

void printVersion(uint32_t v) {
    printVersionFragment(0, uint8_t(v >> 24u));
    printVersionFragment('.', uint8_t(v >> 16u));
    printVersionFragment('.', uint8_t(v >> 8u));
    if (uint8_t(v) != 0) {
        printVersionFragment('.', uint8_t(v));
    }
}

void setup_printSignOn()
    {
    printNl();

    setup_printSignOnDashLine();

    Serial.println(filebasename(__FILE__));
    Serial.print(F("LMIC version "));
    printVersion(ARDUINO_LMIC_VERSION);
    Serial.print(F(" configured for region "));
    Serial.print(CFG_region);
    Serial.println(F("."));
    Serial.println(F("Remember to select 'Line Ending: Newline' at the bottom of the monitor window."));

    setup_printSignOnDashLine();
    printNl();
    }

void setupForNetwork(bool preJoin) {
#if defined(CFG_us915)
