|
2 | 2 |
|
3 | 3 | **User-friendly library for using the Arduino LMIC library with The Things Network and LoRaWAN™ networks.**
|
4 | 4 |
|
5 |
| -[](https://github.com/mcci-catena/arduino-lorawan/releases/latest) [](https://github.com/mcci-catena/arduino-lorawan/compare/v0.5.3...master) [](https://travis-ci.com/mcci-catena/arduino-lorawan) |
| 5 | +[](https://github.com/mcci-catena/arduino-lorawan/releases/latest) [](https://github.com/mcci-catena/arduino-lorawan/compare/v0.6.0...master) [](https://travis-ci.com/mcci-catena/arduino-lorawan) |
6 | 6 |
|
7 | 7 | **Contents**
|
8 | 8 | <!-- TOC depthFrom:2 updateOnSave:true -->
|
@@ -48,17 +48,22 @@ It targets devices that are reasonably capabile, consisting of:
|
48 | 48 | The reference target for SAMD21G deployments is [Adafruit Feather M0 LoRa][1].
|
49 | 49 | In addition to the basic Feather M0 LoRa, other products are supported. The [MCCI][3] [Catena 4450][4], [Catena 4460][5], and [Catena 4470][6] products are upward compatible with the Feather M0 LoRa and therefore also can be used with this library.
|
50 | 50 |
|
51 |
| -The reference target for STM32L0 deployments is the Murata CMWX1ZZABZ-078, as deployed in the MCCI [Catena 4551][7], etc., with the MCCI Arduino [board support package][7]. Note that for proper TCXO control, you must use v2.3.0 or later of the arduino-lmic library. |
| 51 | +The reference target for STM32L0 deployments is the Murata CMWX1ZZABZ-078, as deployed in the MCCI [Catena 4610][7], [Catena 4612][9], [Catena 4801][12], [Catena 4617][10], [Catena 4618][11], [Catena 4630][13] etc., with the MCCI Arduino [board support package][8]. Note that for proper TCXO control, you must use v2.3.0 or later of the arduino-lmic library. |
52 | 52 |
|
53 | 53 | [0]: https://github.com/mcci-catena/arduino-lmic
|
54 | 54 | [1]: https://www.adafruit.com/products/3178
|
55 | 55 | [2]: https://thethings.nyc/
|
56 |
| -[3]: http://www.mcci.com |
| 56 | +[3]: https://mcci.com |
57 | 57 | [4]: https://store.mcci.com/collections/lorawan-iot-and-the-things-network/products/catena-4450-lorawan-iot-device
|
58 | 58 | [5]: https://store.mcci.com/collections/lorawan-iot-and-the-things-network/products/catena-4460-sensor-wing-w-bme680
|
59 | 59 | [6]: https://store.mcci.com/collections/lorawan-iot-and-the-things-network/products/mcci-catena-4470-modbus-node-for-lorawan-technology
|
60 |
| -[7]: https://store.mcci.com/collections/lorawan-iot-and-the-things-network/products/catena-4551-integrated-lorawan-node |
| 60 | +[7]: https://store.mcci.com/products/mcci-catena-4610-integrated-node-for-lorawan-technology |
61 | 61 | [8]: https://github.com/mcci-catena/arduino-boards
|
| 62 | +[9]: https://store.mcci.com/products/catena-4612-integrated-lorawan-node |
| 63 | +[10]: https://store.mcci.com/products/mcci-catena-4617 |
| 64 | +[11]: https://store.mcci.com/products/mcci-catena-4618 |
| 65 | +[12]: https://store.mcci.com/products/catena-4801 |
| 66 | +[13]: https://store.mcci.com/products/mcci-catena-4630 |
62 | 67 |
|
63 | 68 | **arduino-lorawan** attempts to solve three problems.
|
64 | 69 |
|
@@ -228,19 +233,47 @@ Clients may register event functions using `RegisterListener`. The event functio
|
228 | 233 |
|
229 | 234 | ### Send an event to all listeners
|
230 | 235 |
|
231 |
| -_To be documented._ |
| 236 | +```c++ |
| 237 | +void Arduino_LoRaWAN::DispatchEvent(uint32_t eventCode); |
| 238 | +``` |
| 239 | +
|
| 240 | +This routine causes each registered event listener to be called with the specified event code. This is mostly for internal use, and may become `protected` in future releases. |
232 | 241 |
|
233 | 242 | ### Manipulate the Debug Mask
|
234 | 243 |
|
235 |
| -_To be documented._ |
| 244 | +_To be documented. This feature is currently only in the header files and not used._ |
236 | 245 |
|
237 | 246 | ### Output a formatted log message
|
238 | 247 |
|
239 |
| -_To be documented._ |
| 248 | +_To be documented. This feature is currenly only used by the macro `ARDUINO_LORAWAN_PRINTF`, which in turn is only used in one place._ |
240 | 249 |
|
241 | 250 | ### Get the configured LoRaWAN region, country code, and network name
|
242 | 251 |
|
243 |
| -_To be documented._ |
| 252 | +```c++ |
| 253 | +const char *Arduino_LoRaWAN::GetRegionString(char *pBuf, size_t size) const; |
| 254 | +``` |
| 255 | + |
| 256 | +Set the buffer at `*pBuf` to the configured network region. At most `size-1` characters will be copied to the target buffer. |
| 257 | + |
| 258 | +The result is guaranteed to be non-NULL, and is a pointer to a string. If `pBuf` is `nullptr` or `size` is zero, then the result is a constant string `"<<null>>"`. Otherwise, the result is `pBuf`. Since the result might be an immutable string, the result is declared as `const char *`. The result is guaranteed to be a well-formed string. If the buffer is too small to contain the region string, the region string will be truncated to the right as needed. |
| 259 | + |
| 260 | +```c++ |
| 261 | +Arduino_LoRaWAN::Region Arduino_LoRaWAN::GetRegion() const; |
| 262 | +``` |
| 263 | + |
| 264 | +Return the region code. `Arduino_LoRaWAN::Region` contains the following values: `unknown`, `eu868`, `us915`, `cn783`, `eu433`, `au921`, `cn490`, `as923`, `kr921`, and `in866`. |
| 265 | + |
| 266 | +```c++ |
| 267 | +Arduino_LoRaWAN::CountryCode Arduino_LoRaWAN::GetCountryCode() const; |
| 268 | +``` |
| 269 | + |
| 270 | +Return the country code, which might be relevant to the region definiton. The defined values are `none` (in case there are no relevant country-specific variations), and `JP` (which means we must follow Japan listen-before-talk rules). |
| 271 | + |
| 272 | +```c++ |
| 273 | +const char *GetNetworkName() const; |
| 274 | +``` |
| 275 | + |
| 276 | +Return the network name. Current values include `"The Things Network"` and `"machineQ"`. |
244 | 277 |
|
245 | 278 | ### Set link-check mode
|
246 | 279 |
|
@@ -297,25 +330,39 @@ The specified function is called whenever a downlink message is received. `nBuff
|
297 | 330 |
|
298 | 331 | ### Get DevEUI, AppEUI, AppKey
|
299 | 332 |
|
300 |
| -_To be documented._ |
| 333 | +```c++ |
| 334 | +bool Arduino_LoRaWAN::GetDevEUI(uint8_t *pBuf); |
| 335 | +bool Arduino_LoRaWAN::GetAppEUI(uint8_t *pBuf); |
| 336 | +bool Arduino_LoRaWAN::GetAppKey(uint8_t *pBuf); |
| 337 | +``` |
301 | 338 |
|
302 |
| -### Test provisioning state |
| 339 | +These three routines fetch the provisioned DevEUI, AppEUI, and AppKey. `pBuf` points to an 8-byte (DevEUI and AppEUI) or 16-byte (AppKey) buffer. The values are returned in network byte order: DevEUI and AppEUI are returned in little-endian byte order, and AppKey is returned in big-endian byte order. |
303 | 340 |
|
304 |
| -_To be documented._ |
| 341 | +### Test provisioning state |
305 | 342 |
|
306 |
| -## Release History |
| 343 | +```c++ |
| 344 | +bool Arduino_LoRaWAN::IsProvisioned(void); |
| 345 | +``` |
307 | 346 |
|
308 |
| -- HEAD has the following changes. |
| 347 | +Return `true` if the LoRaWAN stack seems to be properly provisioned (provided with a valid DevEui, AppEUI and AppKey for OTAA; or provided with valid DevAddr, AppSKey and NwkSKey for ABP). Returns `false` otherwise. |
309 | 348 |
|
310 |
| - - [#96](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/96) properly restores the NetID from a saved session. |
311 |
| - - [#93](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/93) adds EV_TXCANCELED support. |
312 |
| - - [#92](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/92), [#84](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/84), [#85](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/85), [#87](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/87) handles transmit completion status correctly. |
313 |
| - - [#91](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/91) removes a redundant call to `UpdateFCntDown()`. |
314 |
| - - [#89](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/89) adds new LMIC event codes added as part of the certification push. |
315 |
| - - [#5](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/5) enables link-check-mode by default. |
316 |
| - - [#83](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/83) add `SetLinkCheckMode() method. |
317 |
| - - [#81](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/81) allows uplinks to arbitrary ports. |
| 349 | +## Release History |
318 | 350 |
|
| 351 | +- v0.6.0 has the following changes. |
| 352 | +
|
| 353 | + - [#110](https://github.com/mcci-catena/arduino-lorawan/issues/110) tweak initial power settings for US. |
| 354 | + - [#106](https://github.com/mcci-catena/arduino-lorawan/issues/106), [#107](https://github.com/mcci-catena/arduino-lorawan/issues/107), [#108](https://github.com/mcci-catena/arduino-lorawan/issues/108), [#104](https://github.com/mcci-catena/arduino-lorawan/issues/104) CI improvements |
| 355 | + - [#88](https://github.com/mcci-catena/arduino-lorawan/issues/88) use new LMIC APIs for SendBuffer |
| 356 | + - [#97](https://github.com/mcci-catena/arduino-lorawan/issues/97) add `ARDUINO_LORAWAN_VERSION` macro. |
| 357 | + - [#98](https://github.com/mcci-catena/arduino-lorawan/issues/98) check LMIC version at compile time. |
| 358 | + - [#96](https://github.com/mcci-catena/arduino-lorawan/issues/96) properly restores the NetID from a saved session. |
| 359 | + - [#93](https://github.com/mcci-catena/arduino-lorawan/issues/93) adds EV_TXCANCELED support. |
| 360 | + - [#92](https://github.com/mcci-catena/arduino-lorawan/issues/92), [#84](https://github.com/mcci-catena/arduino-lorawan/issues/84), [#85](https://github.com/mcci-catena/arduino-lorawan/issues/85), [#87](https://github.com/mcci-catena/arduino-lorawan/issues/87) handles transmit completion status correctly. |
| 361 | + - [#91](https://github.com/mcci-catena/arduino-lorawan/issues/91) removes a redundant call to `UpdateFCntDown()`. |
| 362 | + - [#89](https://github.com/mcci-catena/arduino-lorawan/issues/89) adds new LMIC event codes added as part of the certification push. |
| 363 | + - [#5](https://github.com/mcci-catena/arduino-lorawan/issues/5) enables link-check-mode by default. |
| 364 | + - [#83](https://github.com/mcci-catena/arduino-lorawan/issues/83) add `SetLinkCheckMode() method. |
| 365 | + - [#81](https://github.com/mcci-catena/arduino-lorawan/issues/81) allows uplinks to arbitrary ports. |
319 | 366 |
|
320 | 367 | - v0.5.3 is a patch release. It fixes a platformio compile warning, and also fixes another missing return for `Arduino_LoRaWAN::begin()` (this time in an overload in the header file.)
|
321 | 368 |
|
|
0 commit comments