1# Changelog 2 3All notable changes to this project will be documented in this file. 4 5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8## LoRaWAN pre-certification results 9 10Please refer to [Releases pre-certification-results](https://github.com/Lora-net/LoRaMac-node/wiki/releases-pre-certification-results) document for further information. 11 12## [Unreleased] 13 14## [4.5.2] - 2021-05-28 15 16### General 17 18- Release based on "LoRaWAN specification 1.0.4" and "LoRaWAN Regional Parameters 2-1.0.1" 19- GitHub reported issues corrections. 20 21### Known limitations 22 23- SAMR34 platform does not support NVM storage. This is a requirement for LoRaWAN versions greater or equal to 1.0.4. 24 No work on this subject is forseen by the maintainers. Implementation proposals are welcome. 25 26### Added 27 28- Added possibility to override periodic-uplink-lpp example `LORAWAN_DEFAULT_CLASS` 29- Added I2C driver support for B-L072Z-LRWAN1 and Nucleo platforms to the build system 30- Added battery voltage and MCU temperature reading functions implementation for Nucleo platforms 31- Added a default value for `Request->ReqReturn.DutyCycleWaitTime` to ensure that a valid value is always returned 32- Added SX126x `REG_RX_GAIN` and `REG_TX_MODULATION` to the radio registers retention list 33- Added SX126x missing registers definitions 34- Added radio image calibration enforcement after radio initialization and radio sleep cold start. 35- Added possibility to query minimal Tx data rate 36 37### Changed 38 39- Updated ADC driver based on en.en-st-stm32cubeide examples 40- Changed improved the way `LmHandler` handles the packages transmissions 41- Changed certification `OnTxPeriodicityChanged` callback implementation in order to directly apply the requested change 42- Changed the `LmHandler` initialization to apply user default data rate 43- Changed SX1272 and SX1276 FSK FIFO threshold from 15 to 31 in order to give more time for the MCU to make other processing tasks 44- Changed the way `IrqFired` global variable is handled by `RadioIrqProcess` 45- Changed the place of call to `TimerStop( &RxTimeoutTimer )` on `RadioIrqProcess` implementation 46- Changed utilities.h `SUCCESS`/`FAIL` definition by an enumeration `LMN_STATUS_OK`/`LMN_STATUS_ERROR` 47 48### Fixed 49 50- Fixed Null pointer exception when CN470 region was selected 51- Fixed `src/system/gps.c` HasFix variable type from `double` to `bool` 52- Fixed Class C downlink handling 53- Fixed I2C driver for L476 54- Fixed re-transmissions handling when ClassB or ClassC downlink is received 55- Fixed certification `FPort224DisableReq` command NVM handling 56- Fixed Class B & C confirmed downlink acknowledge management when `CLASS_B_C_RESP_TIMEOUT` expires 57- Fixed an issue when receiving downlinks in class C window during a class A procedure 58- Fixed SX126x and LR1110 driver IrqFired variable management 59- Fixed `LmhpCompliance.c` `periodicity` array size computation 60- Fixed join back-off by not storing band usage on the NVM memory. 61- Fixed `LoRaMacMibGetRequestConfirm` `MIB_SE_PIN` handling 62- Fixed ping-slot frequency to take in account the `AS923_FREQ_OFFSET_HZ` parameter 63- Fixed fragmentation loop variable type in order to allow more than 255 fragments 64- Fixed `RtcMs2Tick` conversion on SAMR34 65- Fixed compiling issue when RU864 region is selected 66- Fixed `MLME_SCHEDULE_UPLINK` handling. 67 68### Removed 69 70- Removed STM32 platforms system wake up time calibration 71 72## [4.5.1] - 2021-01-18 73 74### General 75 76- Release based on "LoRaWAN specification 1.0.4" and "LoRaWAN Regional Parameters 2-1.0.1" 77- GitHub reported issues corrections. 78 79### Fixed 80 81- Fixed compiling issues 82 83## [4.4.7] - 2021-01-18 84 85### General 86 87- Release based on "LoRaWAN specification 1.0.3" and "LoRaWAN Regional Parameters v1.0.3revA" 88- **Release 4.4.7 is an hotfix of 4.4.6 and is the last one supporting "LoRaWAN specification 1.0.3"** 89 90### Changed 91 92- Changed examples GitHub version to 4.4.7 93 94### Fixed 95 96- Fixed compiling issues when KR920 or RU864 regions are selected 97- Fixed compiling issues for `fuota-test-01` example 98 99## [4.5.0] - 2020-12-18 100 101### General 102 103- Release based on "LoRaWAN specification 1.0.4" and "LoRaWAN Regional Parameters 2-1.0.1" 104- GitHub reported issues corrections. Please refer to [Release Version 4.5.0](https://github.com/Lora-net/LoRaMac-node/milestone/5) 105 106### Added 107 108- Added implementation of LoRaWAN 1.0.4 changes 109- Added implementation for new Certification protocol specification 110- Added GitHub repository and firmware examples version definitions 111 112## [4.4.6] - 2020-12-18 113 114### General 115 116- Release based on "LoRaWAN specification 1.0.3" and "LoRaWAN Regional Parameters v1.0.3revA" 117- GitHub reported issues corrections. Please refer to [Release Version 4.4.6](https://github.com/Lora-net/LoRaMac-node/milestone/8) 118- **Release 4.4.6 is the last one supporting "LoRaWAN specification 1.0.3"** 119 120### Changed 121 122- Refactored MAC layer and examples Non Volatile Memory data handling 123- Changed `NewChannelReq` amd `DlChannelReq` handling to ignore command for `AU915`, `CN470` and `US915` regions 124- Updated behavior of `SX126xSetLoRaSymbNumTimeout` to round up the timeout to the nearest possible number of symbol. 125- Changed radio drivers floating point to integer computations 126- Improved `GetNextLowerTxDr` function implementation. 127- Changed SX1272 and SX1276 FSK FIFO handling by using `FifoLevel` IRQ instead of `FifoEmpty` IRQ 128 **WARNING** *DIO1 IRQ MCU pin detection has changed from `RISING` to `RISING_FALLING` edge.* 129- Changed IMST boards default power source to `USB_POWER` 130 131### Fixed 132 133- Fixed certification test application handling 134- Fixed `ping-pong` and `rx-sensi` examples to use the right `FSK_BANDWIDTH` and `FSK_AFC_BANDWIDTH` parameters 135- Fixed one byte transmissions over I2C 136- Fixed `RegionIN865RxParamSetupReq` `DrOffset` verification 137- Fixed STM platforms IRQ handlers when using a C++ compiler 138- Fixed an issue where the Join back off algorithm wasn't being applied when the duty-cycle enforcement was OFF 139- Fixed `AU915_MAX_RX1_DR_OFFSET` value to 5 instead of 6 140 141### Removed 142 143- Removed ClassA, ClassB and ClassC examples. 144 145## [4.5.0-rc.1] - 2020-11-24 146 147### General 148 149- Release based on "LoRaWAN specification 1.0.4" and "LoRaWAN Regional Parameters 2-1.0.1" 150- GitHub reported issues corrections. Please refer to [Release Version 4.5.0](https://github.com/Lora-net/LoRaMac-node/milestone/5) 151 152### Added 153 154- Added implementation of LoRaWAN 1.0.4 changes 155- Added implementation for new Certification protocol specification 156- Added GitHub repository and firmware examples version definitions 157 158### Changed 159 160- Changed IMST boards default power source to USB_POWER 161 162### Fixed 163 164- Fixed an issue where the Join back off algorithm wasn't being applied when the duty-cycle enforcement was OFF. 165- Fixed `AU915_MAX_RX1_DR_OFFSET` value to 5 instead of 6 166 167### Removed 168 169- Removed NvmCtxCallback calls as they should only be done when a modification happens. 170- Removed ClassA, ClassB and ClassC examples. 171 172## [4.4.5] - 2020-10-14 173 174### General 175 176- Release based on "LoRaWAN specification 1.0.3" and "LoRaWAN Regional Parameters v1.0.3revA" 177- GitHub reported issues corrections. Please refer to [Release Version 4.4.5](https://github.com/Lora-net/LoRaMac-node/milestone/7) 178 179### Added 180 181- Added to `FRAGMENTATION_FRAG_SESSION_SETUP_REQ` checks which verify `FragNb` and `FragSize` validity. 182- Added missing call to `SX126xSetOperatingMode` on `SX126xSetTxContinuousWave` and `SX126xSetTxInfinitePreamble` functions 183- Added new specific board API to initialize the RF switch (`SX126xIoRfSwitchInit`) 184- Add to AS923 and KR920 regions a definition for the Rx bandwidth to be used while executing the LBT algorithm 185- Added support for other AS923 channel sub plan groups. 186- Added FPort filtering to loramac handler packages. 187- Added missing NVM update notifications 188 189### Changed 190 191- Refactored function `RegionXXInitDefaults`. Fixes an issue on US based bands where the channels mask was not being reset. 192- Changed hard coded `JoinAccept` max payload size (33) by `LORAMAC_JOIN_ACCEPT_FRAME_MAX_SIZE` definition. 193- Moved radio operating mode management to specific board implementation 194- Changed radio `IsChannelFree API` in order to provide reception bandwidth 195- AS923 default downlink dwell time setting changed to disabled 196- Back port 1.0.4 region implementation improvements 197- Changed `RegionCommonComputeSymbolTimeLoRa`, `RegionCommonComputeSymbolTimeFsk` and `RegionCommonComputeRxWindowParameters` 198 API implementations to use integer divisions instead of double division. 199- Changed DeriveSessionKey10x and DeriveSessionKey11x functions API (Removed pointer based variable usage) 200 201### Fixed 202 203- Fixed `SX126xSetLoRaSymbNumTimeout` to call the workaround only if the number of symbols is equal to or higher than 64. 204- Fixed IAR C++ compiler warnings 205- Fixed missing `{` after `extern "C"` in `cmac.h` file 206- Fixed `FragSessionStatusAns` message construction for `Received&index` field 207- Fixed `LoRaMacCryptoHandleJoinAccept` function `DevNonce`, `RJCount0` and `RJCount1` handling. 208- Fixed nonce variable declaration 209- Fixed `LoRaMacCrypto.c` conditional pre-processing. 210- Fixed missing `Rx1Frequency` reset for dynamic channel plans 211- Applied Japan ARIB restrictions to the `AS923_1_JP` sub plan 212- Applied Regional Parameters 1.0.3.revA ERRATA note concerning the ClassB beacon format 213- Fixed SAMR34 compiling issue when `USE_RADIO_DEBUG` directive is defined 214- Fixed `SX126xClearIrqStatus` call to only clear read flags 215- Fixed GFSK bandwidth handling for SX126x and LR1110 radios. 216- Fixed version handling for MC root keys derivation 217- Fixed Class B initialization. 218- Fixed duty-cycle implementation 219 220## [4.4.4] - 2020-05-26 221 222### General 223 224- Release based on "LoRaWAN specification 1.0.3" and "LoRaWAN Regional Parameters v1.0.3revA" 225- GitHub reported issues corrections. Please refer to [Release Version 4.4.4](https://github.com/Lora-net/LoRaMac-node/milestone/6) 226 227### Added 228 229- Added the possibility to setup multicast channels locally 230- Added new `SecureElementProcessJoinAccept` API to the `secure-element.h` 231- Added possibility to select the secure-element to be used as well as to select if it is pre-provisioned or not 232- Added support for LR1110 radio 233- Added support for LR1110 crypto-engine to be used as secure-element 234- Added support for ATECC608A-TNGLORA secure-element 235- Added `LoRaMacDeInitialization` API to ease dynamic region change 236- Added possibility to query implemented versions of the LoRaWAN MAC layer and Regional Parameters specifications 237- Added `MOTE_MAC_TX_PARAM_SETUP_ANS` as sticky MAC command 238- Added a filter to handle multicast downlinks exceptions 239- Added `CHANGELOG.md` file 240 241### Changed 242 243- Updated examples to use OTAA activation method by default 244- Updated `LmhpFragmentation` implementation 245- Updated Radio APIs to handle 32-bit register addresses 246- Changed SX126x driver to only process a received packet when there is no CRC error 247- Moved `Commissioning.h` files to a single one located under `src/apps/LoRaMac/common` directory 248- Updated `Radio.TimeOnAir` API in order to be independent of the current hardware settings 249- Moved keys definition and management to the secure-element implementation 250- Moved device identity to secure-element `se-identity.h` file 251- Changed support of SAML21 platform by SAMR34 platform 252- Changed the `MlmeRequest` and `McpsRequest` APIs to report back when the next transmission is possible 253- Changed `ResetMacParameters` to perform a complete re-initialization of the regional layer after processing the join accept 254- Updated the implementation to verify the MAC commands size 255- Changed the way the duty-cycle management is handled 256 257### Removed 258 259- Removed the LoRaWAN keys display on serial terminal 260- Removed `GEN_APP_KEY` support as it is equivalent to LoRaWAN 1.1.x `APP_KEY` 261- Removed tables definition for repeater support. LoRa-Alliance will provide details on these tables usage in future versions 262- Removed Changelog chapter from `readme.md` file 263 264### Fixed 265 266- Fixed `SX126xGetRandom` API implementation 267- Fixed SX126x driver missing call to `RadioStandby` in LoRa modem case inside `RadioSetRxConfig` API 268- Fixed SX126x driver `LoRaSymbNumTimeout` handling 269- Fixed soft-se/cmac for misaligned 32-bit access 270- Fixed ping-pong and rx-sensi projects for packets with sizes bigger than 64 bytes handling 271- Fixed missing switch case `PHY_BEACON_CHANNEL_FREQ` for *AU915* region 272- Fixed default data rates for Class B beacon and ping-slots for *AU915* region 273- Fixed join request limitation due to duty cycle restrictions 274- Fixed `SRV_MAC_DEVICE_TIME_ANS`, `SRV_MAC_PING_SLOT_INFO_ANS` and `SRV_MAC_BEACON_TIMING_ANS` processing to be executed only if corresponding MLME request is queued 275- Fixed issue where the stack could get stuck in MCPS busy state after MLME Device Time Request 276- Fixed duty-cycle enforcement by disabling it for *IN865* region 277- Fixed potential issue where the `FCntUp` counter could sometimes be incremented by 2 instead of 1 278- Fixed wrong beacon time-on-air calculation 279 280### Security 281 282- Security breach found by Tencent Blade Team please refer to [security advisory - CVE-2020-11068](https://github.com/Lora-net/LoRaMac-node/security/advisories/GHSA-559p-6xgm-fpv9) 283 284## [4.4.3] - 2019-12-17 285 286### General 287 288- Release based on "LoRaWAN specification 1.0.3" and "LoRaWAN Regional Parameters v1.0.3revA" 289- GitHub reported issues corrections. Please refer to [Release Version 4.4.3](https://github.com/Lora-net/LoRaMac-node/milestone/4) 290 291## [4.4.2] - 2019-07-19 292 293### General 294 295- Release based on "LoRaWAN specification 1.0.3" and "LoRaWAN Regional Parameters v1.0.3revA" 296- GitHub reported issues corrections. Please refer to [Release Version 4.4.2](https://github.com/Lora-net/LoRaMac-node/milestone/2) 297 298### Added 299 300- Added new refactored application examples 301- Added LoRa-Alliance defined application layer protocols support. Only FUOTA test scenario 01 required features are currently implemented 302 - "Clock Synchronization" package 303 - "Fragmented data block transport" package 304 - "Remote multicast setup" package 305- Added a NVM context management module. (Disabled by default) 306- Added secure-element support 307- Added B-L072Z-LRWAN1 platform support 308- Added NucleoL476 platform support 309- Added NucleoL476 platform support 310- Added IMST new platforms 311- Added *RU864* region support 312- Added ClassB support 313- Added a callback to notify the upper layer to call `LoRaMacProcess` function 314- Added support for RxC windows (ClassC) required by the application layer protocols 315 316### Changed 317 318- Examples application refactoring plus the addition of the application status display on the serial port. (921600-8-N-1) 319- Refactored `timer.c/h`, `rtc-driver.c/h` and added a `systime.c/h` module 320- Functions in ISR context have been moved to main context 321- Changed `BoardDisableIrq` and `BoardEnableIrq` functions by `CRITICAL_SECTION_BEGIN` and `CRITICAL_SECTION_END` 322 respectively 323- Heavily refactored the `LoRaMac.c` and `LoRaMac.h` implementation 324- Changed multicast channels handling according to the application layer protocols 325 326### Removed 327 328- Removed SensorNode platform support 329- Removed MoteII platform support 330- Removed LoRaMote platform support 331- Removed *US915-Hybrid* region support 332 333## Fixed 334 335- Applied SX1272 and SX1276 radios errata note 3.1 to the radio drivers implementation 336- Fixed `printf` and `scanf` functions when GCC is used as compiler 337 338## [4.4.1] - 2018-03-07 339 340### General 341 342- Release based on "LoRaWAN specification 1.0.2" and "LoRaWAN Regional Parameters v1.0.2rB" 343- GitHub reported issues corrections. Please refer to [Release Version 4.4.1](https://github.com/Lora-net/LoRaMac-node/milestone/1) 344 345### Added 346 347- Added SX126x radio support 348- Added NucleoL073 and NucleoL152 board platforms support 349- Added Microchip/Atmel SAML21 Xplained Pro hardware platform support 350- Added CMAKE build system support 351 352### Removed 353 354- Removed CoIDE projects support 355- Removed Keil projects support 356 357## [4.4.0] - 2017-09-08 358 359### General 360 361- Release based on "LoRaWAN specification 1.0.2" and "LoRaWAN Regional Parameters v1.0.2rB" 362- GitHub reported issues corrections 363 364### Added 365 366- Added SX126x radio support 367- Added NucleoL073 and NucleoL152 board platforms support 368- Added Microchip/Atmel SAML21 Xplained Pro hardware platform support 369- Added CMAKE build system support 370- Added the support for all "LoRaWAN Regional Parameters v1.0.2rB" document defined regions 371 372### Changed 373 374- Changed radio driver to perform the LBT carrier sense continuously for a given period of time 375- Changed implementation to support 1.0.2 specification additions 376 377## [4.3.2] - 2017-04-19 378 379### General 380 381- Release based on "LoRaWAN specification 1.0.2" 382- GitHub reported issues corrections 383 384### Added 385 386- Added an algorithm to automatically compute the Rx windows parameters. (Window `symbolTimeout` and `Offset` from 387 downlink expected time) 388- Added a workaround to reset the radio in case a `TxTimeout` occurs 389- Added newly defined `TxCw`(Tx Continuous Wave) certification protocol command 390 391### Changed 392 393- Changed radio driver to perform the LBT carrier sense continuously for a given period of time 394- Changed implementation to support 1.0.2 specification additions 395- Changed FSK modem handling to use the provided `symbolTimeout` (1 symbol equals 1 byte) when in `RxSingle` mode 396- Changed `GpioMcuInit` function to first configure the output pin state before activating the pin 397- Changed the `AdrAckCounter` handling as expected by the test houses 398- Relocate parameter settings from `ResetMacParameters` to the initialization 399- Changed MAC layer indications handling 400 401### Removed 402 403- Removed useless `LoRaMacPayload` buffer 404 405### Fixed 406 407- Fixed an overflow issue that could happen with `NmeaStringSize` variable 408- Fixed an issue where the node stopped transmitting 409 410## [4.3.1] - 2017-02-27 411 412### General 413 414- Release based on "LoRaWAN specification 1.0.1" 415- GitHub reported issues corrections 416 417### Added 418 419- Added MoteII platform based on the IMST module iM881A (STM32L051C8) 420- Added NAMote72 platform 421- Added TxCw (Tx continuous wave) LoRaWAN compliance protocol command 422- Added TxContinuousWave support to the radio drivers 423- Added region CN470 support 424 425### Changed 426 427- Updated the MAC layer in order to be LoRaWAN version 1.0.1 compliant (Mainly US915 bug fixes) 428- Updated SensorNode projects according to the new MCU reference STM32L151CBU6. Bigger memories 429- Updated ST HAL drivers 430 - STM32L1xx_HAL-Driver : V1.2.0 431 - STM32L0xx_HAL_Driver : V1.7.0 432 433### Removed 434 435- Removed api-v3 support from the project 436 437### Fixed 438 439- Fixed compliance test protocol command 0x06 behavior 440- Fixed US band in order to pass the LoRaWAN certification 441 442## [4.3.0] - 2016-06-22 443 444### General 445 446- Release based on "LoRaWAN specification 1.0.1" 447- GitHub reported issues corrections 448 449### Added 450 451- Added radio `RX_TIMEOUT` irq clear into the irq handler 452- Added retransmission back-off 453- Added debug pin support to LoRaMote platform 454- Added a function to verify the RX frequency of window 2 for US band 455 456### Changed 457 458- Applied to all application files the certification protocol change for LoRaWAN 1.0.1 compliance tests 459 **REMARK**: api-v3 application files aren't updated 460- Update of the STM32L0 HAL to version 1.6.0 461- Consolidated the line endings across all project files 462 Windows line endings has been choose for almost every file 463- Updated maximum payload size for US band 464- Update data rate offset table for US band 465- Make MAC commands sticky 466- Updated and improved MPL3115 device driver 467- RTC driver major update 468 469### Removed 470 471- Removed the end less loop from `HAL_UART_ErrorCallback` 472- Remove the `TxPower` limitation for US band on `LoRaMacMibSetRequestConfirm` function. The power will be limited 473 anyway when the `SendFrameOnChannel` functions is called 474 475### Fixed 476 477- Issue(#81): Bug fix in function `LoRaMacMlmeRequest` case `MLME_JOIN`. Function will return `LORAMAC_STATUS_BUSY` in 478 case the MAC is in status `MAC_TX_DELAYED` 479- Issue(#83): Bug fix in parameter validation 480- Issue(#84): Fix issue of `CalibrateTimer` function 481- Applied pull request #87 482- Issue(#88): Bug fix in function `PrepareFrame` where repeated MAC commands were not handled correctly 483- Fixed `OnRadioRxDone` Node now drops frames on port 0 with fOpts > 0 484- Fixed `OnRadioRxDone` Node now receives frames with fOpts > 0 when no payload is present 485 486## [4.2.0] - 2016-05-13 487 488### General 489 490- Release based on "LoRaWAN specification 1.0.0" 491- GitHub reported issues corrections 492 493### Added 494 495- Added a definition for the LoRaWAN device address. Add an IEEE_OUI for the LoRaWAN device EUI 496- Added a definition for the default data rate 497- Introduce individual MIN and MAX datarates for RX and TX 498- Added the possibility to set and get the `ChannelsDefaultDatarate` 499- Introduce a new status `MAC_RX_ABORT`. Reset `MAC_TX_RUNNING` only in `OnMacStateCheckTimerEvent` 500 501### Changed 502 503- Update STM32L1xx_HAL_Driver version to 1.5. Update related drivers and implementations accordingly 504 **REMARK**: This change implies that the time base had to be changed from microseconds to milliseconds 505- Optimize radio drivers regarding FSK PER 506- Increase RTC tick frequency for higher resolution 507- Update the radio wake up time 508- Update channel mask handling for US915 hybrid mode to support any block in the channel mask 509- Optimization of the RX symbol timeout 510- Replace definition `LORAMAC_DEFAULT_DATARATE` by `ChannelsDefaultDatarate` in `LoRaMacChannelAdd` 511- Accept MAC information of duplicated, confirmed downlinks 512 513### Fixed 514 515- Fixed the frequency check condition for // ERRATA 2.1 - Sensitivity Optimization with a 500 kHz Bandwidth 516- Fixed an issue when calling `SX127xInit` function more than once 517- Issue(#66) correction of functions `SX1276SetOpMode` and `SX1272SetOpMode` 518- Issue(#68): Fix for low level RF switch control 519- Issue(#56) correction 520- Issue(#63) correct the maximum payload length in RX mode 521- Fixed Tx power setting loss for repeated join requests on US band 522- Issue(#59): Add the possibility to set the uplink and downlink counter 523- Issue(#72): Fix of possible array overrun in `LoRaMacChannelRemove` 524- Issue(#74): Drop frames with a downlink counter difference greater or equal to `MAX_FCNT_GAP` 525 526## [4.1.0] - 2016-03-10 527 528### General 529 530- Release based on "LoRaWAN specification 1.0.0" 531- GitHub reported issues corrections 532- This version has passed all mandatory LoRa-Alliance compliance tests 533 *One of the optional tests is unsuccessful (FSK downlinks PER on Rx1 and Rx2 windows) and is currently under investigation* 534 535### Added 536 537- Add missing documentation about `MIB_REPEATER_SUPPORT`. (Issue #42) 538- Add a new `LoRaMacState` to allow adding channels during TX procedure. (Issue #43) 539- Add a new function `PrepareRxDoneAbort` to prepare a break-out of `OnRadioRxDone` in case of an error 540 541### Changed 542 543- Application state machine. Relocate setting sleep state and update the duty cycle in compliance test mode 544- Changed `TimerHwDelayMs` function to be re-entrant 545- Rename attribute `nbRetries` to `NbTrials` in structure `McpsReqConfirmed_t`. (Issue #37) 546- Updated implementation of `SetNextChannel`. Added enabling default channels in case of join request. (Issue #39) 547- Relocate the activation of `LoRaMacFlags.Bits.McpsInd` in `OnRadioRxDone` 548- Reset status of `NodeAckRequested` if we received an ACK or in case of timeout 549- Improved and corrected `AdrNextDr` function 550 551### Removed 552 553- Removed support for Raisonance Ride7 IDE (Reduces the amount of work to be done at each new release) 554- Removed the Bleeper-72 and Bleeper-76 platforms support as these are now deprecated 555- Removed additional EU868 channels from the LoRaWAN implementation files. GitHub (Issue #49) 556 The creation of these additional channels has been moved to the application example 557 558### Fixed 559 560- Fixed `TimerIrqHandler`. Now, it is possible to insert timers in callback 561- Fixed FSK modem packets bigger than 64 bytes handling (Issue #36) 562- Fixed default channels activation in case all others are disabled. (Issue #39) 563- Fixed default channel setting in case none is enabled 564- Fixed `SRV_MAC_NEW_CHANNEL_REQ` MAC command by adding a fix to the `macIndex` variable on US915 band 565- Start the MacStateCheckTimer in OnRxDone and related error cases with a short interval to handle events promptly. (Issue #44) 566 567## [4.0.0] - 2015-12-18 568 569### General 570 571- Release based on "LoRaWAN specification 1.0.0" 572- GitHub reported issues corrections 573 574### Added 575 576- LoRaWAN certification protocol implementation 577 578### Changed 579 580- STACKFORCE new API integration 581- Reverse the EUIs arrays in the MAC layer 582 583## [3.4.1] - 2015-11-06 584 585### General 586 587- Release based on "LoRaWAN specification 1.0.0" 588- GitHub reported issues corrections 589 590### Fixed 591 592- Fixed downlink counter roll over management when several downlinks were missed 593- Fixed the Radio maximum payload length management. Radio was filtering received frames with a length bigger than the transmitted one 594- Applied Pull request #22 solution proposition 595 596## [3.4.0] - 2015-10-30 597 598### General 599 600- Release based on "LoRaWAN specification 1.0.0" 601- GitHub reported issues corrections 602 603### Added 604 605- Added TimerStop function calls to each timer event callback 606- Added some missing variables casts. Helps on code portability 607- Added const variable attribute when necessary to functions prototypes 608- Added `LORAMAC_MIN_RX1_DR_OFFSET` and `LORAMAC_MAX_RX1_DR_OFFSET` definitions to `LoRaMac-board.h`. Can be different 609 upon used PHY layer 610- Added the limitation of output power according to the number of enabled channels for US915 band 611- Added the limitation of the applicative payload length according to the data rate. Does not yet take in account the 612 MAC commands buffer. (Issue #15) 613 614### Changed 615 616- Changed all applications in order to have preprocessing definitions on top of the files and added relevant comments 617- Applications LED control is no more done into the timer callback functions but instead on the main while loop 618- Changed types names for `stdint.h` names. Helps on code portability 619- Renamed `rand` and `srand` to `rand1` and `srand1`. Helps on code portability 620- Moved `ID1`, `ID2` and `ID3` definition from `board.h` to `board.c`, `usb-cdc-board.c` and `usb-dfu-board.c` 621- Renamed `BoardMeasureBatterieLevel` to `BoardGetBatteryLevel` 622- Added `SetMaxPayloadLength` API function to SX1272 and SX1276 radio drivers 623- Changed the name of Radio API Status function to `GetStatus` 624- Changed AES/CMAC types names for `stdint.h` names. Helps on code portability (Issue #20) 625- Moved `__ffs` function from `utilities.h` to `spi-board.c`. This function is only used there 626- Added support for the US915 band (Normal mode and hybrid mode. Hybrid mode is a temporary configuration up until servers support it automatically) (Issue #16) 627- Replaced the usage of `__IO` attribute by `volatile` 628- Renamed `LoRaMacEvent_t` into `LoRaMacCallbacks_t` and added a function pointer for getting battery level status 629- Renamed `LoRaMacSetDutyCycleOn` into `LoRaMacSetTestDutyCycleOn` 630- Renamed `LoRaMacSetMicTest` into `LoRaMacTestSetMic` 631- Increased the PHY buffer size to 250 632- `LoRaMacEventInfo.TxDatarate` now returns LoRaWAN data rate (DR0 -> DR7) instead of (SF12 -> DF7) 633- `LoRaMac-board.h` now implements the settings for the PHY layers specified by LoRaWAN 1.0 specification. (EU433, CN780, EU868, US915) (Issue #19) 634 635### Removed 636 637- Removed `NULL` definition from `board.h` 638- Removed the definition of `RAND_SEED`. It has been replaced by a function named `BoardGetRandomSeed` 639- Removed `fputc` function redefinition from `Utilities.c` 640- Removed the usage of `PACKED` attribute for data structures 641- Removed `IsChannelFree` check on `LoRaMacSetNextChannel` function. LoRaWAN is an ALHOA protocol. (Pull request #8) 642 643### Fixed 644 645- Fixed timings comments. Timing values are most of the time us based 646- Fixed and simplified the downlink sequence counter management 647- Fixed channel mask management for EU868 band 648- Fixed `LoRaMacPrepareFrame` function behavior when no applicative payload is present 649- Fixed `MacCommandBufferIndex` management. (Issue #18) 650 651## [3.3.0] - 2015-08-07 652 653### General 654 655- Release based on "LoRaWAN specification 1.0.0" 656- GitHub reported issues corrections 657 658### Added 659 660- Added the support for LoRaWAN Class C devices 661- Added the possibility to change the channel mask and number of repetitions trough SRV_MAC_LINK_ADR_REQ command when ADR is disabled 662 663### Changed 664 665- Increased FSK SyncWord timeout value in order to listen for longer time if a down link is available or not. Makes FSK downlink more reliable 666- Increased the UART USB FIFO buffer size in order to handle bigger chunks of data 667- Renamed data rates as per LoRaWAN specification 668- Changed confirmed messages function to use default datarate when ADR control is off 669- After a Join accept the node falls back to the default datarate. Enables the user to Join a network using a different datarate from its own default one 670- Moved the MAC commands processing to the right places. FOpts field before the Payload and Port 0 just after the decryption. (Pull request #9) 671 672### Fixed 673 674- Implemented the radios errata note workarounds. SX1276 errata 2.3 "Receiver Spurious Reception of a LoRa Signal" is not yet implemented 675- Fixed handling of the MAC commands which was done incorrectly the condition to verify the length of the buffer has changed from `<` to `<=` 676- Fixed `Rx1DrOffset` management. In previous version DR1 was missing for all offsets 677- Fixed default FSK channel frequency 678- Fixed a firmware freeze when one of the following situations arrived in `OnRxDone` callback: bad address, bad MIC, bad frame. (Pull request #10) 679- Fixed weird conditions to check data rate on MAC command `SRV_MAC_NEW_CHANNEL_REQ` (Pull request #7) 680- Fixed join accept message handling to be ignored if already joined (Pull request #6) 681- Fixed channel index verification should use OR on `SRV_MAC_NEW_CHANNEL_REQ` command (Pull request #5) 682- Fixed the CFList management on JoinAccept. The `for` loop indexes were wrong. (Pull request #4) 683- Fixed AES key size (Pull request #3) 684 685## [3.2.0] - 2015-04-30 686 687### General 688 689- Release based on "LoRaWAN specification 1.0.0" 690- GitHub reported issues corrections 691 692### Added 693 694- Added the support of packed structures when using IAR tool chain 695- Added a function to get the time in us 696- Added a typedef for time variables (TimerTime_t) 697- Added a function that returns if the GPS has a fix or not 698- Added missing MAC commands and updated others when necessary 699 - Corrected the Port 0 MAC commands decryption 700 - Changed the way the upper layer is notified. Now it is only notified 701 when all the operations are finished 702 703 When a ClassA Tx cycle starts a timer is launched to check every second if everything is finished 704 705 - Added a new parameter to `LoRaMacEventFlags` structure that indicates on which Rx window the data has been received 706 - Added a new parameter to `LoRaMacEventFlags` structure that indicates if there is applicative data on the received payload 707 - Corrected ADR MAC command behavior 708 - DutyCycle enforcement implementation (EU868 PHY only) 709 710 **REMARK 1** *The regulatory duty cycle enforcement is enabled by default which means that for lower data rates the 711 node may not transmit a new frame as quickly as requested 712 The formula used to compute the node idle time is* 713 714 Toff = TimeOnAir / DutyCycle - TxTimeOnAir 715 716 *Example:* 717 *A device just transmitted a 0.5 s long frame on one default channel 718 This channel is in a sub-band allowing 1% duty-cycle. Therefore this whole sub-band (868 MHz - 868.6 MHz) will be 719 unavailable for 49.5 s.* 720 721 **REMARK 2** *The duty cycle enforcement can be disabled for test purposes by calling the `LoRaMacSetDutyCycleOn` 722 function with false parameter.* 723 - Implemented aggregated duty cycle management 724 - Added a function to create new channels 725 - Implemented the missing features on the JoinAccept MAC command 726 - Updated LoRaMacJoinDecrypt function to handle the CFList field 727- Added the possibility to chose to use either public or private networks 728 729### Changed 730 731- Cosmetic updates 732- Changed the TimeOnAir radio function to return a uint32_t value instead of a double. The value is in us 733- Changed the GetPosition functions to return a latitude and longitude of 0 and altitude of 65535 when no GPS fix 734- Due to duty cycle management the applicative API has changed 735 All applications must be updated accordingly 736 737### Removed 738 739- Removed support for previous LoRaMac/LoRaWAN specifications 740 741### Fixed 742 743- Fixed the 250 kHz bandwidth choice for the FSK modem 744 745## [3.1.0] - 2015-01-30 746 747### General 748 749- Release based on "LoRaMac specification R3.0.0" 750- GitHub reported issues corrections 751 752### Added 753 754- Started to add support for CooCox CoIDE Integrated Development Environment 755 Currently only LoRaMote and SensorNode platform projects are available 756- Added the support of different tool chains for the `HardFault_Handler` function 757- Added an invalid bandwidth to the Bandwidths table in order to avoid an error 758 when selecting 250 kHz bandwidth when using FSK modem 759- Added another timer in order increment the tick counter without blocking the normal timer count 760- Added the possibility to switch between low power timers and normal timers on the fly 761- Added an I2C EEPROM driver 762- Added the possibility to analyze an hard fault interrupt 763- Added the possibility to configure almost all the MAC parameters 764- Added the functions to read the Up and Down Link sequence counters 765 766### Changed 767 768- Updated GCC compiler linker scripts 769- Changed the RSSI values type from int8_t to int16_t. We can have RSSI values below -128 dBm 770- Updated radio API to support FHSS and CAD handling 771- Changed all structures declarations to be packed 772- Automatically activate the channel once it is created 773 774### Fixed 775 776- Fixed Radio drivers I&Q signals inversion to be possible in Rx and in Tx 777 Added some missing radio state machine initialization 778- Fixed SNR computation on RxDone interrupt 779- Fixed in `SetRxConfig` function the FSK modem preamble register name 780- Fixed RTC alarm setup which could be set to an invalid date 781- Fixed I2C driver by correcting the 2 bytes internal address management 782 Corrected buffer read function when more that 1 byte was to be read 783 Added a function to wait for the I2C bus to become IDLE 784- Fixed and improved USB Virtual COM Port management files 785 Corrected the USB CDC and USB UART drivers 786- Fixed RxWindow2 data rate management 787- Fixed `SrvAckRequested` variable was never reset 788- Fixed tstIndoor applications for LoRaMac R3.0 support 789- Fixed the `LoRaMacSetNextChannel` function 790- Fixed the port 0 MAC command decoding 791- Fixed the Acknowledgment retries management when only 1 trial is needed 792 Before the device was issuing at least 2 trials 793- Fixed server mac new channel req answer 794- Fixed `SRV_MAC_RX2_SETUP_REQ` frequency handling 795 Added a x100 multiplication 796- Fixed `SRV_MAC_NEW_CHANNEL_REQ` 797 Removed the DutyCycle parameter decoding 798- Fixed `NbRepTimeoutTimer` initial value. `RxWindow2Delay` already contains `RxWindow1Delay` in it 799 800## [3.0.0] - 2014-07-18 801 802### General 803 804- Release based on "LoRaMac specification R3.0.0" 805- GitHub reported issues corrections 806 807### Added 808 809- Added to Radio API the possibility to select the modem 810 811### Changed 812 813- Changed radio callbacks events to timeout when it is a timeout event and error when it is a CRC error 814- Radio API updated 815- Updated ping-pong applications 816- Updated tx-cw applications 817- Updated LoRaMac applications in order to handle LoRaMac returned functions calls status 818- Updated LoRaMac applications to toggle LED2 each time there is an application payload down link 819- Updated tstIndoor application to handle correctly more than 6 channels 820- Changed the MPL3115 altitude variable from unsigned to signed value 821- Changed the usage of pow(2, n) by defining POW2 functions Saves ~2 KBytes of code 822- MAC commands implemented 823 - LinkCheckReq **YES** 824 - LinkCheckAns **YES** 825 - LinkADRReq **YES** 826 - LinkADRAns **YES** 827 - DutyCycleReq **YES** 828 - DutyCycleAns **YES** 829 - Rx2SetupReq **YES** 830 - Rx2SetupAns **YES** 831 - DevStatusReq **YES** 832 - DevStatusAns **YES** 833 - JoinReq **YES** 834 - JoinAccept **YES** 835 - NewChannelReq **YES** 836 - NewChannelAns **YES** 837- Features implemented 838 - Possibility to shut-down the device **YES** (Possible by issuing DutyCycleReq MAC command) 839 - Duty cycle management enforcement **NO** 840 - Acknowledgments retries **YES** 841 - Unconfirmed messages retries **YES** 842 843### Fixed 844 845- Fixed RSSI reading formulas as well as changed the RSSI and SNR values from double to int8_t type 846- Fixed an issue potentially arriving when LOW_POWER_MODE_ENABLE wasn't defined 847 A timer interrupt could be generated while the TimerList could already be emptied 848 849## [2.3.0-RC2] - 2014-07-10 850 851### General 852 853- Release based on "LoRaMac specification R2.2.1" 854- GitHub reported issues corrections 855 856### Fixed 857 858- Fixed all radios antenna switch low power mode handling 859- Fixed SX1276 antenna switch control 860 861## [2.3.0-RC1] - 2014-06-06 862 863### General 864 865- GitHub reported issues corrections 866 867### Added 868 869- Added the support for SX1276 radio 870- Added Bleeper-76 and SensorNode platforms support 871- Added to the radio drivers a function that generates a random value from RSSI readings 872- Added a project to transmit a continuous wave and a project to measure the the radio sensitivity 873- Added a bootloader project for the LoRaMote and SensorNode platforms 874- Added a function to the timer driver that checks if a timer is already in the list or not 875- Added the UART Overrun bit exception handling to the UART driver 876 877### Changed 878 879- Radio driver RxDone callback function API has changed (size parameter is no more a pointer) 880 - Previous function prototype: 881 `void ( *RxDone )( uint8_t *payload, uint16_t *size, double rssi, double snr, uint8_t rawSnr );` 882 - New function prototype: 883 `void ( *RxDone )( uint8_t *payload, uint16_t size, double rssi, double snr, uint8_t rawSnr );` 884- The LoRaMac application for Bleeper platforms now sends the Selector and LED status plus the sensors values 885 - The application payload for the Bleeper platforms is as follows: 886 LoRaMac port 1: 887 888 { 0xX0/0xX1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } 889 ---------- ---------- ---------- ---------- ---- 890 | | | | | 891 SELECTOR/LED PRESSURE TEMPERATURE ALTITUDE BATTERY 892 MSB nibble = SELECTOR (barometric) 893 LSB bit = LED 894- Redefined `rand()` and `srand()` standard C functions. These functions are redefined in order to get the same behavior across different compiler tool chains implementations 895- GPS driver improvements. Made independent of the board platform 896- Simplified the RTC management 897- MAC commands implemented 898 - LinkCheckReq **YES** 899 - LinkCheckAns **YES** 900 - LinkADRReq **YES** 901 - LinkADRAns **YES** 902 - DutyCycleReq **YES** (LoRaMac specification R2.2.1) 903 - DutyCycleAns **YES** (LoRaMac specification R2.2.1) 904 - Rx2SetupReq **YES** (LoRaMac specification R2.2.1) 905 - Rx2SetupAns **YES** (LoRaMac specification R2.2.1) 906 - DevStatusReq **YES** 907 - DevStatusAns **YES** 908 - JoinReq **YES** 909 - JoinAccept **YES** (LoRaMac specification R2.2.1) 910 - NewChannelReq **YES** (LoRaMac specification R2.2.1) 911 - NewChannelAns **YES** (LoRaMac specification R2.2.1) 912- Features implemented 913 - Possibility to shut-down the device **YES** (Possible by issuing DutyCycleReq MAC command) 914 - Duty cycle management enforcement **NO** 915 - Acknowledgments retries **WORK IN PROGRESS** (Not fully debugged. Disabled by default) 916 - Unconfirmed messages retries **WORK IN PROGRESS** (LoRaMac specification R2.2.1) 917- Due to new specification the `LoRaMacInitNwkIds` LoRaMac API function had to be modified 918 - Previous function prototype: 919 `void LoRaMacInitNwkIds( uint32_t devAddr, uint8_t *nwkSKey, uint8_t *appSKey );` 920 - New function prototype: 921 `void LoRaMacInitNwkIds( uint32_t netID, uint32_t devAddr, uint8_t *nwkSKey, uint8_t *appSKey );` 922- Changed the LoRaMac channels management 923- LoRaMac channels definition has been moved to `LoRaMac-board.h` file located in each specific board directory 924 925### Removed 926 927- Removed dependency of spi-board files to the `__builtin_ffs` function 928 This function is only available on GNU compiler tool suite 929 Removed --gnu compiler option from Keil projects 930 Added own `__ffs` function implementation to `utilities.h` file 931- Removed obsolete class1 devices support 932 933### Fixed 934 935- Fixed Radio continuous reception mode 936 937## [2.2.0] - 2014-04-07 938 939### General 940 941- GitHub reported issues corrections 942 943### Added 944 945- Added IMST SK-iM880A starter kit board support to the project 946 - The application payload for the SK-iM880A platform is as follows: 947 LoRaMac port 3: 948 949 { 0x00/0x01, 0x00, 0x00, 0x00 } 950 ---------- ----- ---------- 951 | | | 952 LED POTI VDD 953 954### Changed 955 956- Ping-Pong applications have been split per supported board 957- Made fifo functions coding style coherent with the project 958- UART driver is now independent of the used MCU 959 960### Fixed 961 962- Fixed the SX1272 output power management 963 - Added a variable to store the current Radio channel 964 - Added missing FSK bit definition 965 966## [2.1.0] - 2014-03-28 967 968### General 969 970- GitHub reported issues corrections 971 972### Added 973 974- Added to the radio driver the possibility to choose the preamble length and rxSingle symbol timeout in reception 975- Added Hex coder selector driver for the Bleeper board 976- Added acknowledgments retries management 977 - Split the `LoRaMacSendOnChannel` function in `LoRaMacPrepareFrame` and `LoRaMacSendFrameOnChannel` 978 `LoRaMacSendOnChannel` now calls the 2 newly defined functions 979 **WARNING**: By default the acknowledgment retries specific code isn't enabled 980 The current http://iot.semtech.com server version doesn't support it 981- Added `LORAMAC_EVENT_INFO_STATUS_MAC_ERROR` event info status 982 983### Changed 984 985- The timers and RTC management has been rewritten 986- Improved the UART and UP501 GPS drivers 987- Changed copyright Unicode character to (C) in all source files 988- MAC commands implemented 989 - LinkCheckReq **YES** 990 - LinkCheckAns **YES** 991 - LinkADRReq **YES** 992 - LinkADRAns **YES** 993 - DevStatusReq **YES** 994 - DevStatusAns **YES** 995 - JoinReq **YES** 996 - JoinAccept **YES** 997 998### Fixed 999 1000- Fixed GPIO pin names management 1001- Fixed the antenna switch management in the SX1272 driver 1002- Fixed issues on JoinRequest and JoinAccept MAC commands 1003 1004## [2.0.0] - 2014-02-21 1005 1006### General 1007 1008- GitHub reported issues corrections 1009 1010### Added 1011 1012- Added new MAC layer application API implementation 1013- Added sensors drivers implementation 1014 1015### Changed 1016 1017- The LoRaMac applications now sends the LED status plus the sensors values 1018 For the LoRaMote platform the application also sends the GPS coordinates 1019 - The application payload for the Bleeper platform is as follows: 1020 LoRaMac port 1: 1021 1022 { 0x00/0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } 1023 ---------- ---------- ---------- ---------- ---- 1024 | | | | | 1025 LED PRESSURE TEMPERATURE ALTITUDE BATTERY 1026 (barometric) 1027 1028 - The application payload for the LoRaMote platform is as follows: 1029 LoRaMac port 2: 1030 1031 { 0x00/0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } 1032 ---------- ---------- ---------- ---------- ---- ---------------- ---------------- ---------- 1033 | | | | | | | | 1034 LED PRESSURE TEMPERATURE ALTITUDE BATTERY LATITUDE LONGITUDE ALTITUDE 1035 (barometric) (gps) 1036- Changed applications examples according to the new MAC layer API 1037- MAC commands implemented 1038 - LinkCheckReq **YES** 1039 - LinkCheckAns **YES** 1040 - LinkADRReq **YES** 1041 - LinkADRAns **YES** 1042 - DevStatusReq **YES** 1043 - DevStatusAns **YES** 1044 - JoinReq **YES (Not tested)** 1045 - JoinAccept **YES (Not tested)** 1046 1047### Known bugs 1048 1049- Still some issues with RTC/Timer. Will be solved in a future version 1050 1051## [1.1.0] - 2014-01-24 1052 1053### General 1054 1055- GitHub reported issues corrections 1056 1057### Added 1058 1059- Implemented an application LED control 1060 - If the server sends on port 1 an application payload of one byte with the following contents: 1061 1062 0: LED off 1063 1: LED on 1064 - The node transmits periodically on port 1 the LED status on 1st byte and the message "Hello World!!!!" 1065 the array looks lik 1066 1067 { 0, 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '!', '!', '!', '!' } 1068 1069### Changed 1070 1071- MAC commands implemented 1072 - LinkCheckReq **NO** 1073 - LinkCheckAns **NO** 1074 - LinkADRReq **YES** 1075 - LinkADRAns **YES** 1076 - DevStatusReq **YES** 1077 - DevStatusAns **YES** 1078 1079### Known bugs 1080 1081- There is an issue when launching an asynchronous Timer. Will be solved in a future version 1082 1083## [1.1.0-RC1] - 2014-01-20 1084 1085### Added 1086 1087- Added Doc directory. The directory contains: 1088 - LoRa MAC specification 1089 - Bleeper board schematic 1090 1091### Changed 1092 1093- Changed LoRaMac according to Release1 of the specification. Main changes are: 1094 - MAC API changed 1095 - Frame format 1096 - ClassA first ADR implementation 1097 - MAC commands implemented 1098 - LinkCheckReq **NO** 1099 - LinkCheckAns **NO** 1100 - LinkADRReq **YES** 1101 - LinkADRAns **NO** 1102 - DevStatusReq **NO** 1103 - DevStatusAns **NO** 1104- Timers and RTC rewriting. Known bugs are: 1105 - The Radio wakeup time is taken in account for all timings 1106 - When opening the second reception window the microcontroller sometimes doesn't enter in low power mode 1107 1108## [1.0.0] - 2013-11-28 1109 1110### General 1111 1112- Initial version of the LoRa MAC node firmware implementation 1113