# Can LMIC 1.6 be set up to use a single channel and SF?

**URL:** <https://www.thethingsnetwork.org/forum/t/can-lmic-1-6-be-set-up-to-use-a-single-channel-and-sf/5207>\
**Category:** End Devices (Nodes)\
**Created:** [February 4, 2017, 10:43am UTC](https://www.thethingsnetwork.org/forum/t/can-lmic-1-6-be-set-up-to-use-a-single-channel-and-sf/5207 "2017-02-04T10:43:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![wklenk](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/wklenk/32/44682_2.png) [@wklenk](https://www.thethingsnetwork.org/forum/u/wklenk)\
**Post date:** [February 5, 2017, 5:27pm UTC](https://www.thethingsnetwork.org/forum/t/can-lmic-1-6-be-set-up-to-use-a-single-channel-and-sf/5207/2 "2017-02-05T17:27:27Z")

</div>

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.

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/can-lmic-1-6-be-set-up-to-use-a-single-channel-and-sf/5207)._
