Senet-ized LMIC for MOTE_L152RC
Fork of lmic_MOTE_L152RC by
Revision 13:097c74da6ffe, committed 2016-08-11
- Comitter:
- dkjendal
- Date:
- Thu Aug 11 15:45:21 2016 +0000
- Parent:
- 12:be4139e16c6f
- Commit message:
- Fix ADR channel mask handling
Changed in this revision
config.h | Show annotated file Show diff for this revision Revisions of this file |
lmic.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/config.h Tue Mar 08 08:19:44 2016 -0500 +++ b/config.h Thu Aug 11 15:45:21 2016 +0000 @@ -8,4 +8,5 @@ // No tx confirm retries #define CFG_TXCONF_NO_RETRIES -//#define CHNL_HYBRID 0 /* 0-7 to select block of 8 channels used */ +//define CHNL_HYBRID 0 /* 0-7 to select block of 8 channels used */ +//define ONLY_HYBRID false
--- a/lmic.cpp Tue Mar 08 08:19:44 2016 -0500 +++ b/lmic.cpp Thu Aug 11 15:45:21 2016 +0000 @@ -788,6 +788,7 @@ LMIC.channelMap[u] = en125; LMIC.channelMap[64/16] = chmap; } else { + chpage >>= 4; //DLK::chpage is only the top nibble... before this, only works for chpage=0,6,7 if( chpage >= (72+MAX_XCHANNELS+15)/16 ) return 0; LMIC.channelMap[chpage] = chmap; @@ -1222,6 +1223,9 @@ LMIC.upRepeat = uprpt; setDrTxpow(DRCHG_NWKCMD, dr, pow2dBm(p1)); } + debug("MCMD_LADR_REQ:%02X%02X%02X%02X - dr:%u pw:%u - %04X%04X%04X%04X%04X\r\n", + opts[oidx+1-5],opts[oidx+2-5],opts[oidx+3-5],opts[oidx+4-5], + dr,pow2dBm(p1),LMIC.channelMap[0],LMIC.channelMap[1],LMIC.channelMap[2],LMIC.channelMap[3],LMIC.channelMap[4]); LMIC.adrChanged = 1; // Trigger an ACK to NWK continue; }