Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of lmic_MOTE_L152RC_2 by
Revision 17:f90b064f6107, committed 2017-01-20
- Comitter:
- shaunkrnelson
- Date:
- Fri Jan 20 20:11:27 2017 +0000
- Parent:
- 16:d5c50bdab1f1
- Commit message:
- DisablING confirmed retries in config.h with CUSTOM_TXCONF_ATTEMPTS=0
Changed in this revision
--- a/config.h Tue Nov 01 13:20:56 2016 -0400 +++ b/config.h Fri Jan 20 20:11:27 2017 +0000 @@ -6,7 +6,7 @@ #define CFG_noassert // No tx confirm retries -#define CFG_TXCONF_NO_RETRIES +#define CUSTOM_TXCONF_ATTEMPTS 0 //#define CHNL_HYBRID 0 /* 0-7 to select block of 8 channels used */ //define ONLY_HYBRID false
--- a/lmic.cpp Tue Nov 01 13:20:56 2016 -0400 +++ b/lmic.cpp Fri Jan 20 20:11:27 2017 +0000 @@ -11,7 +11,8 @@ //! \file #include "lmic.h" -#include "debug.h" // tmp wbr +#include "debug.h" +#include "config.h" #define JOIN_REQ_DEBUG #define JA_DEBUG @@ -49,6 +50,13 @@ DEFINE_LMIC; DECL_ON_LMIC_EVENT; +// confirmed uplink retransmission count override +#ifdef CUSTOM_TXCONF_ATTEMPTS +#define _TXCONF_ATTEMPTS CUSTOM_TXCONF_ATTEMPTS +#else +#define _TXCONF_ATTEMPTS TXCONF_ATTEMPTS +#endif + // Fwd decls. static void engineUpdate(void); @@ -350,17 +358,11 @@ // - indexed by retry count // - return steps to lower DR static const u1_t DRADJUST[2+TXCONF_ATTEMPTS] = { -#ifndef CFG_TXCONF_NO_RETRIES + // normal frames - 1st try / no retry - 0,0,0 + 0, // confirmed frames - //0,0,1,0,1,0,1,0,0 -#else - // normal frames - 1st try / no retry - 0,0,0 - // confirmed frames - //0,0,1,0,1,0,1,0,0 -#endif + 0,0,1,0,1,0,1,0,0 }; @@ -1903,7 +1905,7 @@ if( LMIC.dataLen == 0 ) { norx: if( LMIC.txCnt != 0 ) { - if( LMIC.txCnt < TXCONF_ATTEMPTS ) { + if( (_TXCONF_ATTEMPTS > 0) && (LMIC.txCnt < _TXCONF_ATTEMPTS )) { LMIC.txCnt += 1; setDrTxpow(DRCHG_NOACK, lowerDR(LMIC.datarate, DRADJUST[LMIC.txCnt]), KEEP_TXPOW); // Schedule another retransmission
--- a/lmic.h Tue Nov 01 13:20:56 2016 -0400 +++ b/lmic.h Fri Jan 20 20:11:27 2017 +0000 @@ -25,11 +25,8 @@ #define LMIC_VERSION_BUILD 1431528305 enum { MAX_FRAME_LEN = 64 }; //!< Library cap on max frame length -#ifdef CFG_TXCONF_NO_RETRIES -enum { TXCONF_ATTEMPTS = 1 }; //!< Transmit attempts for confirmed frames -#else + enum { TXCONF_ATTEMPTS = 8 }; //!< Transmit attempts for confirmed frames -#endif enum { MAX_MISSED_BCNS = 20 }; // threshold for triggering rejoin requests enum { MAX_RXSYMS = 100 }; // stop tracking beacon beyond this