Skip to content

Commit 2afe411

Browse files
committed
Doc improvements
1 parent a211b94 commit 2afe411

File tree

1 file changed

+53
-11
lines changed

1 file changed

+53
-11
lines changed

README.md

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,22 @@ It targets devices that are reasonably capabile, consisting of:
4848
The reference target for SAMD21G deployments is [Adafruit Feather M0 LoRa][1].
4949
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.
5050

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.
5252

5353
[0]: https://github.com/mcci-catena/arduino-lmic
5454
[1]: https://www.adafruit.com/products/3178
5555
[2]: https://thethings.nyc/
56-
[3]: http://www.mcci.com
56+
[3]: https://mcci.com
5757
[4]: https://store.mcci.com/collections/lorawan-iot-and-the-things-network/products/catena-4450-lorawan-iot-device
5858
[5]: https://store.mcci.com/collections/lorawan-iot-and-the-things-network/products/catena-4460-sensor-wing-w-bme680
5959
[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
6161
[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
6267

6368
**arduino-lorawan** attempts to solve three problems.
6469

@@ -228,19 +233,47 @@ Clients may register event functions using `RegisterListener`. The event functio
228233

229234
### Send an event to all listeners
230235

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.
232241
233242
### Manipulate the Debug Mask
234243
235-
_To be documented._
244+
_To be documented. This feature is currently only in the header files and not used._
236245
237246
### Output a formatted log message
238247
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._
240249
241250
### Get the configured LoRaWAN region, country code, and network name
242251
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"`.
244277

245278
### Set link-check mode
246279

@@ -297,19 +330,28 @@ The specified function is called whenever a downlink message is received. `nBuff
297330
298331
### Get DevEUI, AppEUI, AppKey
299332
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+
```
338+
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.
301340

302341
### Test provisioning state
303342

304-
_To be documented._
343+
```c++
344+
bool Arduino_LoRaWAN::IsProvisioned(void);
345+
```
346+
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.
305348
306349
## Release History
307350
308351
- v0.6.0 has the following changes.
309352
310353
- [#110](https://github.com/mcci-catena/arduino-lorawan/issues/110) tweak initial power settings for US.
311-
- [#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)
312-
CI improvements
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
313355
- [#88](https://github.com/mcci-catena/arduino-lorawan/issues/88) use new LMIC APIs for SendBuffer
314356
- [#97](https://github.com/mcci-catena/arduino-lorawan/issues/97) add `ARDUINO_LORAWAN_VERSION` macro.
315357
- [#98](https://github.com/mcci-catena/arduino-lorawan/issues/98) check LMIC version at compile time.

0 commit comments

Comments
 (0)