Stable version of the xDot library for mbed 5. This version of the library is suitable for deployment scenarios.

Dependents:   Dot-Examples XDOT-Devicewise Dot-Examples-delujoc Dot-Examples_receive ... more

Fork of libxDot-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

examples/src/fota_example.cpp

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

examples/inc/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
    }

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
Committer:
Jenkins@KEILDM1.dc.multitech.prv
Date:
Thu Apr 02 09:36:13 2020 -0500
Revision:
29:fb5769f4a67c
Parent:
20:bc12c888e7dc
xdot-library revision 3.3.5 and mbed-os revision mbed-os-5.15.1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 1 /*
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 2 / _____) _ | |
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 3 ( (____ _____ ____ _| |_ _____ ____| |__
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 4 \____ \| ___ | (_ _) ___ |/ ___) _ \
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 5 _____) ) ____| | | || |_| ____( (___| | | |
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 6 (______/|_____)_|_|_| \__)_____)\____)_| |_|
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 7 (C)2013 Semtech
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 8
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 9 Description: Generic radio driver definition
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 10
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 11 License: Revised BSD License, see LICENSE.TXT file include in the project
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 12
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 13 Maintainer: Miguel Luis and Gregory Cristian
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 14 */
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 15 #ifndef __SXRADIOEVENTS_H__
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 16 #define __SXRADIOEVENTS_H__
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 17
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 18 /*!
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 19 * \brief Radio driver callback functions
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 20 */
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 21 class SxRadioEvents
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 22 {
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 23 public:
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 24 /*!
Jenkins@KEILDM1.dc.multitech.prv 14:f0c24ce93427 25 * \brief Tx Start callback prototype.
Jenkins@KEILDM1.dc.multitech.prv 14:f0c24ce93427 26 */
Jenkins@KEILDM1.dc.multitech.prv 14:f0c24ce93427 27 virtual void TxStart( void ) {}
Jenkins@KEILDM1.dc.multitech.prv 14:f0c24ce93427 28 /*!
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 29 * \brief Tx Done callback prototype.
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 30 */
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 31 virtual void TxDone( void ) {}
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 32 /*!
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 33 * \brief Tx Timeout callback prototype.
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 34 */
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 35 virtual void TxTimeout( void ) {}
Jenkins@KEILDM1.dc.multitech.prv 29:fb5769f4a67c 36
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 37 /*!
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 38 * \brief Rx Done callback prototype.
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 39 *
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 40 * \param [IN] payload Received buffer pointer
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 41 * \param [IN] size Received buffer size
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 42 * \param [IN] rssi RSSI value computed while receiving the frame [dBm]
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 43 * \param [IN] snr Raw SNR value given by the radio hardware
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 44 * FSK : N/A ( set to 0 )
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 45 * LoRa: SNR value is two's complement in 1/4 dB
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 46 */
Jenkins@KEILDM1.dc.multitech.prv 20:bc12c888e7dc 47 virtual void RxDone( uint8_t *payload, uint16_t size, int16_t rssi, int16_t snr ) {}
Jenkins@KEILDM1.dc.multitech.prv 29:fb5769f4a67c 48
Jenkins@KEILDM1.dc.multitech.prv 29:fb5769f4a67c 49 /*!
Jenkins@KEILDM1.dc.multitech.prv 29:fb5769f4a67c 50 * \brief Called if Beacon Window cannot be opened or is missed
Jenkins@KEILDM1.dc.multitech.prv 29:fb5769f4a67c 51 *
Jenkins@KEILDM1.dc.multitech.prv 29:fb5769f4a67c 52 * \param [IN] beaconTime Updated time of beacon for the period
Jenkins@KEILDM1.dc.multitech.prv 29:fb5769f4a67c 53 * \param [IN] no_rx True if called from rx done
Jenkins@KEILDM1.dc.multitech.prv 29:fb5769f4a67c 54 */
Jenkins@KEILDM1.dc.multitech.prv 29:fb5769f4a67c 55 virtual void OnBeaconless( uint32_t beaconTime, bool no_rx = false ) {}
Jenkins@KEILDM1.dc.multitech.prv 29:fb5769f4a67c 56
Jenkins@KEILDM1.dc.multitech.prv 29:fb5769f4a67c 57
Jenkins@KEILDM1.dc.multitech.prv 29:fb5769f4a67c 58
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 59 /*!
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 60 * \brief Rx Timeout callback prototype.
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 61 */
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 62 virtual void RxTimeout( void ) {}
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 63 /*!
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 64 * \brief Rx Error callback prototype.
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 65 */
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 66 virtual void RxError( void ) {}
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 67 /*!
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 68 * \brief FHSS Change Channel callback prototype.
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 69 *
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 70 * \param [IN] currentChannel Index number of the current channel
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 71 */
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 72 virtual void FhssChangeChannel( uint8_t currentChannel ) {}
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 73 /*!
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 74 * \brief CAD Done callback prototype.
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 75 *
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 76 * \param [IN] channelActivityDetected Channel Activity detected during the CAD
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 77 */
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 78 virtual void CadDone( bool channelActivityDetected ) {}
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 79 /*!
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 80 * \brief Mac Event callback prototype.
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 81 */
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 82 virtual void MacEvent( void ) {}
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 83
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 84 virtual void LinkIdle(void) {}
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 85 };
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 86
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 87 #endif // __SXRADIOEVENTS_H__
Jenkins@KEILDM1.dc.multitech.prv 11:be2a6466d680 88