Stable version of the mDot library for mbed 5. This version of the library is suitable for deployment scenarios. See lastest commit message for version of mbed-os library that has been tested against.

Dependents:   mdot_two_way unh-hackathon-example unh-hackathon-example-raw TelitSensorToCloud ... more

Fork of libmDot-dev-mbed5-deprecated by MultiTech

The Dot library provides a LoRaWan certified stack for LoRa communication using MultiTech mDot and xDot devices. The stack is compatible with mbed 5.

The name of the repository can be used to determine which device the stack was compiled for and if it's a development or production-ready build:

A changelog for the Dot library can be found here.

The Dot library version and the version of mbed-os it was compiled against can both be found in the commit message for that revision of the Dot library. Building your application with the same version of mbed-os as what was used to build the Dot library is highly recommended!

The Dot-Examples repository demonstrates how to use the Dot library in a custom application.

The mDot and xDot platform pages have lots of platform specific information and document potential issues, gotchas, etc, and provide instructions for getting started with development. Please take a look at the platform page before starting development as they should answer many questions you will have.

FOTA

Full FOTA support is only available with mDot, xDot does not have the required external flash. xDot can use the FOTA example to dynamically join a multicast session only. After joining the multicast session the received Fragmentation packets could be handed to a host MCU for processing and at completion the firmware can be loaded into the xDot using the bootloader and y-modem. See xDot Developer Guide.

  • Add the following code to allow Fota to use the Dot instance

main.cpp

    // Initialize FOTA singleton
    Fota::getInstance(dot);
  • Add fragmentation handling the the PacketRx event

RadioEvent.h

    virtual void PacketRx(uint8_t port, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr, lora::DownlinkControl ctrl, uint8_t slot, uint8_t retries, uint32_t address, bool dupRx) {
        mDotEvent::PacketRx(port, payload, size, rssi, snr, ctrl, slot, retries, address, dupRx);

#if ACTIVE_EXAMPLE == FOTA_EXAMPLE
        if(port == 200 || port == 201 || port == 202) {
            Fota::getInstance()->processCmd(payload, port, size);
        }
#endif
    }

A definition is needed to enable Fragmentation support on mDot and save fragments to flash. This should not be defined for xDot and will result in a compiler error.

mbed_app.json

{
    "macros": [
        "FOTA=1"
    ]
}

The FOTA implementation has a few differences from the LoRaWAN Protocol

  • Fragmentation Indexing starts at 0
  • McKEKey is 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
  • Start Time is a count-down in seconds to start of session

Revisions of mDot.h

Revision Date Message Actions
69:e22889c7eaa9 2019-08-29 mdot-library revision 3.2.1 and mbed-os revision mbed-os-5.13.4 File  Diff  Annotate
68:5f787643e7d7 2019-08-29 mdot-library revision 3.2.2-19-g285e497 and mbed-os revision mbed-os-5.13.4 File  Diff  Annotate
65:acc0468b9aec 2019-04-18 mdot-library revision 3.2.0 and mbed-os revision mbed-os-5.11.1 File  Diff  Annotate
64:64982192a2af 2018-08-23 mdot-library revision 3.1.0 and mbed-os revision mbed-os-5.7.7 File  Diff  Annotate
60:7985b4783af9 2017-07-27 mdot-library revision 3.0.0 and mbed-os revision mbed-os-5.4.7 File  Diff  Annotate
43:ba29a595814e 2016-09-16 update from git revision 2.0.10-5-g90c25e8 File  Diff  Annotate
31:7fdee197d415 2016-09-08 update from git revision 2.0.6-13-g2591897 File  Diff  Annotate
30:c3150500b324 2016-09-07 update from git revision 2.0.6-11-gaae06a1 File  Diff  Annotate
19:f3a46d2bb9b3 2016-08-19 update from git revision 2.0.3-15-g0042cdf File  Diff  Annotate
17:306ffaa5d79b 2016-08-17 update library to 2.0.2 File  Diff  Annotate
16:b630e18103e5 2016-08-04 update from libmDot-2.0.1-ARMCC.tar.gz File  Diff  Annotate
12:54f9cac9d690 2016-03-10 update to version 1.0.3-1 of mDot library File  Diff  Annotate
11:d8464345e1f1 2016-01-07 build library against mbed rev 104 instead of 111 until RTC issue is fixed File  Diff  Annotate
10:27dafba9fe19 2015-12-02 Adding support for "sleep" mode and RTC_ALARM_OR_INTERRUPT wakeup File  Diff  Annotate
9:ec2fffe31793 2015-11-10 Update libmDot with RTC clock changes to preserve over sleep File  Diff  Annotate
7:683dba5d576f 2015-08-17 update to version 0.0.7 File  Diff  Annotate
6:390fc83d588d 2015-07-16 update from rev 0310fa23bc9c37c0575342961eac26e61d0966f4. NOTE: this version breaks compatibility with older MTS network server versions - use setJoinByteOrder(mDot::MSB) if operating with a network server version earlier than 0.0.5 or AEP 1.0.30 File  Diff  Annotate
5:0bfe6a650513 2015-07-07 update from revision 8f17f909cd6be946ce224094891e211901ac4836 - allow a DigitalOut pointer to be passed in and used as activity LED File  Diff  Annotate
4:94969e981dcc 2015-06-30 update mDot library and mDot.h from git revision c5af21e8ddc6d37b5cd2f375c4b3b50ab50af026 File  Diff  Annotate
0:c62615f15125 2015-06-24 initial commit, mDot header File  Diff  Annotate