Skip to content

Commit 7848a26

Browse files
committed
Fix #482: prepare for v3.1.0
1 parent 39b73a3 commit 7848a26

File tree

3 files changed

+42
-22
lines changed

3 files changed

+42
-22
lines changed

README.md

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The [MCCI `arduino-lorawan`](https://github.com/mcci-catena/arduino-lorawan) lib
1515
This library requires Arduino IDE version 1.6.6 or above, since it
1616
requires C99 mode to be enabled by default.
1717

18-
[![GitHub release](https://img.shields.io/github/release/mcci-catena/arduino-lmic.svg)](https://github.com/mcci-catena/arduino-lmic/releases/latest) [![GitHub commits](https://img.shields.io/github/commits-since/mcci-catena/arduino-lmic/latest.svg)](https://github.com/mcci-catena/arduino-lmic/compare/v2.3.2...master) [![Build Status](https://travis-ci.com/mcci-catena/arduino-lmic.svg?branch=master)](https://travis-ci.com/mcci-catena/arduino-lmic)
18+
[![GitHub release](https://img.shields.io/github/release/mcci-catena/arduino-lmic.svg)](https://github.com/mcci-catena/arduino-lmic/releases/latest) [![GitHub commits](https://img.shields.io/github/commits-since/mcci-catena/arduino-lmic/latest.svg)](https://github.com/mcci-catena/arduino-lmic/compare/v3.1.0...master) [![Build Status](https://travis-ci.com/mcci-catena/arduino-lmic.svg?branch=master)](https://travis-ci.com/mcci-catena/arduino-lmic)
1919

2020
**Contents:**
2121

@@ -169,7 +169,7 @@ However, in the current implementation, the LMIC is tracking the completion of u
169169

170170
#### Working with MCCI Murata-based boards
171171

172-
The Board Support Package V2.5.0 for the MCCI Murata-based boards ([MCCI Catena 4610](https://mcci.io/catena4610), [MCCI Catena 4612](https://mcci.io/catena4612), etc.) has a defect in clock calibration that prevents the compliance script from being used without modification. The update to V2.6.0 is expected to solve this issue.
172+
The Board Support Package V2.5.0 for the MCCI Murata-based boards ([MCCI Catena 4610](https://mcci.io/catena4610), [MCCI Catena 4612](https://mcci.io/catena4612), etc.) has a defect in clock calibration that prevents the compliance script from being used without modification. The update to V2.6.0 is expected to solves this issue.
173173

174174
#### Event-Handling Issues
175175

@@ -437,7 +437,7 @@ low-level SPI transceiver interface.
437437
This library is intended to be used inside the Arduino environment. It
438438
should be architecture-independent. Users have tested this on AVR, ARM, Xtensa-based, and RISC-V based system.
439439

440-
This library an be quite heavy on small systems, especially if the fairly small ATmega
440+
This library can be quite heavy on small systems, especially if the fairly small ATmega
441441
328p (such as in the Arduino Uno) is used. In the default configuration,
442442
the available 32K flash space is nearly filled up (this includes some
443443
debug output overhead, though). By disabling some features in `project_config/lmic_project_config.h`
@@ -453,7 +453,9 @@ The following boards are pre-integrated.
453453
- Adafruit [Feather 32u4 LoRa 900 MHz][1] (SX1276)
454454
- Adafruit [Feather M0 LoRa 900 MHz][2] (SX1276)
455455
- MCCI Catena 4410, 4420, [4450][3], [4460][4] and [4470][5] boards (based on Adafruit Feather boards plus wings) (SX1276)
456-
- MCCI Catena 4551, [4610][6], 4611, [4612][7], 4617, 4618, 4630, and [4801][8] boards (based on the Murata CMWX1ZZABZ-078 module) (SX1276)
456+
- MCCI Catena 4551, [4610][6], 4611, [4612][7], 4617, [4618][7a], 4630, and [4801][8] boards (based on the Murata CMWX1ZZABZ-078 module) (SX1276)
457+
- [TTGo LoRa32 V1][10] (based on the ESP32)
458+
- [Heltec WiFi LoRa 32 V2][11] (based on the ESP32)
457459

458460
[1]: https://www.adafruit.com/products/3078
459461
[2]: https://www.adafruit.com/products/3178
@@ -462,7 +464,10 @@ The following boards are pre-integrated.
462464
[5]: https://store.mcci.com/collections/lorawan-iot-and-the-things-network/products/mcci-catena-4470-modbus-node-for-lorawan-technology
463465
[6]: https://store.mcci.com/collections/lorawan-iot-and-the-things-network/products/mcci-catena-4610-integrated-node-for-lorawan-technology
464466
[7]: https://store.mcci.com/collections/lorawan-iot-and-the-things-network/products/catena-4612-integrated-lorawan-node
467+
[7a]: https://mcci.com/lorawan/products/catena-4618/
465468
[8]: https://store.mcci.com/collections/lorawan-iot-and-the-things-network/products/catena-4801
469+
[10]: https://makeradvisor.com/tools/ttgo-lora32-sx1276-esp32-oled/
470+
[11]: https://heltec.org/project/wifi-lora-32/
466471

467472
> To help you know if you have to worry, we'll call such boards "pre-integrated" and prefix each section with suitable guidance.
468473
@@ -747,6 +752,10 @@ This library provides several examples.
747752
from defaults. This sketch also works with the MCCI Catena family of products
748753
as well as with the Feather 32u4 LoRa.
749754
755+
- [`ttn-otaa-halconfig-us915.ino`](examples/ttn-otaa-halconfig-us915/ttn-otaa-halconfig-us915.ino) is a version of `ttn-otaa.ino` that uses the LMIC automatic configuration system, in the US915 region,
756+
with The Things Network. Remember that you may also have to change `config.h`
757+
from defaults. This sketch works with all the boards listed above under [Pre-Integrated Boards](#pre-integrated-boards).
758+
750759
- [`ttn-otaa-feather-us915-dht22.ino`](examples/ttn-otaa-feather-us915-dht22/ttn-otaa-feather-us915-dht22.ino)
751760
is a further refinement of `ttn-otaa-feather-us915.ino`. It measures and
752761
transmits temperature and relative humidity using a DHT22 sensor. It's only
@@ -762,6 +771,8 @@ This library provides several examples.
762771
for the Adafruit [Feather M0 LoRa](https://www.adafruit.com/product/3178), and for a variety
763772
of other MCCI products.
764773
774+
- [`raw-halconfig.ino](examples/raw-halconfig/raw-halconfig.ino) is like the other `raw` examples, but is most general. It's configured according to the LMIC's auto-configuration mechanism, and adapts according to the selected region.
775+
765776
- [`ttn-abp.ino`](examples/ttn-abp/ttn-abp.ino) shows a basic transmission of a "Hello, world!" message
766777
using the LoRaWAN protocol. This example
767778
uses activation-by-personalization (ABP, preconfiguring a device
@@ -791,6 +802,12 @@ This library provides several examples.
791802
792803
- [`header_test.ino`](examples/header_test/header_test.ino) just tests the header files; it's used for regression testing.
793804
805+
- [`compliance-otaa-halconfig.ino`](examples/compliance-otaa-halconfig/compliance-otaa-halconfig.ino) is a test sketch that is used for LoRaWAN compliance testing.
806+
807+
- [`helium-us9115.ino`](examples\helium-us915\helium-us915.ino) is a complete example for using the LMIC on the Helium network. It's very similar to the OTAA examples, but sets up the prejoin parameters properly for the initial deployment of Helium LoRaWAN support.
808+
809+
- [`ttn-otaa-network-time.ino`](examples/ttn-otaa-network-time/ttn-otaa-network-time.ino) demonstrates use of the network time request. Network time requests are not supported by The Things Network as of the time of writing.
810+
794811
## Timing
795812
796813
The library is
@@ -820,25 +837,16 @@ Fortunately, LoRa is a fairly slow protocol and the timing of the
820837
receive windows is not super critical. To synchronize transmitter and
821838
receiver, a preamble is first transmitted. Using LoRaWAN, this preamble
822839
consists of 8 symbols, of which the receiver needs to see 4 symbols to
823-
lock on. The current implementation tries to enable the receiver for 5
824-
symbol times at 1.5 symbol after the start of the receive window,
825-
meaning that a inaccuracy of plus or minus 2.5 symbol times should be
826-
acceptable.
840+
lock on. The current implementation tries to enable the receiver for 6
841+
symbol times slightly before the start of the receive window.
827842
828843
The HAL bases all timing on the Arduino `micros()` timer, which has a platform-specific
829-
granularity, and is based on the primary microcontroller clock.
830-
831-
At the fastest LoRa setting supported by the SX127x (SF5BW500) a
832-
single preamble symbol takes 64 microseconds, so the receive window timing should
833-
be accurate within 160 microseconds (for LoRaWAN this is SF7BW250, needing accuracy
834-
within 1280μs). This accuracy should also be
835-
feasible with the polling approach used, provided that the LMIC loop is
836-
run often enough.
844+
granularity and accuracy, and is based on the primary microcontroller clock.
837845
838-
If using an internal oscillator (which is 1% - 10%
846+
If using an internal oscillator that is 1% - 2%
839847
accurate, depending on calibration), or if your other `loop()` processing
840848
is time consuming, you may have to use [`LMIC_setClockError()`](#lmic_setclockerror)
841-
to cause the library to leave the radio on longer.
849+
to cause the library to leave the radio on longer. Note that for various reasons, it is not practical to set enormous clock errors. Oscillators that are 4% accurate or worse should be supplemented or disciplined with a better timing source. The LoRaWAN spec, for class B, implicitly assumes 100 ppm accuracy in the clock.
842850
843851
An even more accurate solution could be to use a dedicated timer with an
844852
input capture unit, that can store the timestamp of a change on the DIO0
@@ -849,7 +857,7 @@ a special API, `radio_irq_handler_v2(u1_t dio, ostime_t tEvent)`. This
849857
API allows you to supply a hardware-captured time for extra accuracy.
850858
851859
The practical consequence of inaccurate timing is reduced battery life;
852-
the LMIC must turn on the receiver earlier in order to be sure to capture downlink packets.
860+
the LMIC must turn on the receiver earlier in order to be sure to capture downlink packets. However, this is a second order effect on class A devices; every receive is preceded by a transmit, which takes approximately ten times as much power per millisecond as a receive.
853861
854862
### `LMIC_setClockError()`
855863
@@ -873,6 +881,8 @@ LMIC_setClockError(MAX_CLOCK_ERROR * 20 / 100);
873881
874882
Setting a high clock error causes the RX windows to be opened earlier than it otherwise would be. This causes more power to be consumed. For Class A devices, this extra power is not substantial, but for Class B devices, this can be significant.
875883
884+
For a variety of reasons, the LMIC normally ignores clock errors greater than 4000 ppm (0.4%). The compile-time flag `LMIC_ENABLE_arbitrary_clock_error` can remove this limit. To do this, define it to a non-zero value.
885+
876886
This clock error is not reset by `LMIC_reset()`.
877887
878888
## Downlink data rate
@@ -1182,7 +1192,9 @@ function uflt12f(rawUflt12)
11821192

11831193
## Release History
11841194

1185-
- v3.0.99 (still in pre-release) adds the following changes. (This is not an exhaustive list.) Note that the behavior of the LMIC changes in important ways, as it now enforces the LoRaWAN mandated maximum frame size for a given data rate. For Class A devices, this may cause your device to go silent after join, if you're not able to handle the frame size dictated by the parameters downloaded to the device by the network during join. The library will attempt to find a data rate that will work, but there is no guarantee that the network has provided such a data rate.
1195+
- v3.1.0 officially adopts the changes from v3.0.99. There were dozens of changes; check the GitHub issue logs and change logs. This was a breaking release (due to changes in data layout in the LMIC structure; the structure is accessed by apps).
1196+
1197+
- v3.0.99 (the pre-release for v3.1.0) added the following changes. (This is not an exhaustive list.) Note that the behavior of the LMIC changes in important ways, as it now enforces the LoRaWAN mandated maximum frame size for a given data rate. For Class A devices, this may cause your device to go silent after join, if you're not able to handle the frame size dictated by the parameters downloaded to the device by the network during join. The library will attempt to find a data rate that will work, but there is no guarantee that the network has provided such a data rate.
11861198

11871199
- [#470](https://github.com/mcci-catena/arduino-lmic/pull/470) corrects the name of AU915 region. [#516](https://github.com/mcci-catena/arduino-lmic/pull/516) makes sure that `LMIC_REGION_au921` is defined (but deprecated) for backward compatibility.
11881200
- [#452](https://github.com/mcci-catena/arduino-lmic/pull/452) fixes a bug [#450](https://github.com/mcci-catena/arduino-lmic/issues/450) in `LMIC_clrTxData()` that would cause join hiccups if called while (1) a join was in progress and (2) a regular data packet was waiting to be uplinked after the join completes. Also fixes AS923- and AU915-specific bugs [#446](https://github.com/mcci-catena/arduino-lmic/issues/446), [#447](https://github.com/mcci-catena/arduino-lmic/issues/447), [#448](https://github.com/mcci-catena/arduino-lmic/issues/448). Version is `v3.0.99.5`.
@@ -1245,6 +1257,14 @@ This library started from the IBM V1.5 open-source code.
12451257

12461258
- [`@tanupoo`](https://github.com/tanupoo) of the WIDE Project debugged AS923JP and LBT support.
12471259

1260+
- [`@frazar`](https://github.com/frazar) contributed numerous features, e.g. network time support, CI testing, documentation improvements.
1261+
1262+
- [`@manuelbl`](https://github.com/manuelbl) contributed numerous ESP32-related patches and improvements.
1263+
1264+
- [`@ngraziano`](https://github.com/ngraziano) did extensive testing and contributed numerous ADR-related patches.
1265+
1266+
There are many others, who have contributed code and also participated in discussions, performed testing, reported problems and results. Thanks to all who have participated.
1267+
12481268
## Trademark Acknowledgements
12491269

12501270
LoRa is a registered trademark of Semtech Corporation. LoRaWAN is a registered trademark of the LoRa Alliance.

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=MCCI LoRaWAN LMIC library
2-
version=3.0.99
2+
version=3.1.0
33
author=IBM, Matthis Kooijman, Terry Moore, ChaeHee Won, Frank Rose
44
maintainer=Terry Moore <tmm@mcci.com>
55
sentence=Arduino port of the LMIC (LoraWAN-MAC-in-C) framework provided by IBM.

src/lmic/lmic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ extern "C"{
105105
#define ARDUINO_LMIC_VERSION_CALC(major, minor, patch, local) \
106106
((((major)*UINT32_C(1)) << 24) | (((minor)*UINT32_C(1)) << 16) | (((patch)*UINT32_C(1)) << 8) | (((local)*UINT32_C(1)) << 0))
107107

108-
#define ARDUINO_LMIC_VERSION ARDUINO_LMIC_VERSION_CALC(3, 0, 99, 20) /* v3.0.99.20 */
108+
#define ARDUINO_LMIC_VERSION ARDUINO_LMIC_VERSION_CALC(3, 1, 0, 0) /* v3.1.0.0 */
109109

110110
#define ARDUINO_LMIC_VERSION_GET_MAJOR(v) \
111111
((((v)*UINT32_C(1)) >> 24u) & 0xFFu)

0 commit comments

Comments
 (0)