This is only valid for LMIC 1.6 sourcecode. I haven’t looked at the 1.5 version.
In file lmic/lmic.c you find the following function:
static void initJoinLoop (void) {
#if CFG_TxContinuousMode
LMIC.txChnl = 0;
#else
LMIC.txChnl = os_getRndU1() % 6; // Do NOT remove this line
LMIC.txChnl = 0; // Add this line to avoid random choice of TX channel
#endif
LMIC.adrTxPow = 14;
setDrJoin(DRCHG_SET, DR_SF7);
initDefaultChannels(1);
ASSERT((LMIC.opmode & OP_NEXTCHNL)==0);
LMIC.txend = LMIC.bands[BAND_MILLI].avail + rndDelay(8);
}
Don’t try to be too clever and remove the line containing _os_getRndU1()_
. I did it and it did not work any longer. Probably there are other things going on behind the curtain than just creating a simple 1 byte random number.
If you do this modification you should be aware that you may violate the LoRaWAN specification and possibly regulations of your country. I recommend only to do it for testing, not for production.