A multifunctional and modular Firmware for Multitech's mDot based on ARM mBed provides a widerange of functionality for several Sensors such as MAX44009, BME280, MPU9250, SI1143 and uBlox. It allows you to quickly build a Sensornode that measures specific data with its sensors and sends it via LoRaWAN.

Dependencies:   mDot_LoRa_Sensornode_Flowmeter_impl mbed-rtos mbed

LoRa-Sensornode Firmware for Multitech mDot

A multifunctional and modular Firmware for Multitech's mDot which provides a widerange of functionality for several Sensors. It allows you to quickly build a Sensornode that measures specific data with its sensors and sends it via LoRaWAN.

/media/uploads/mitea1/logo-lora-600x370.png /media/uploads/mitea1/mt_mdot_family_642px.png

Supported Sensors

Idea

The Firmware has some predefined Application Modes running different Tasks(Measurements). Each mode can be used in a different Scenario. Application_Modes define which sensors are used, how often they aquire data and how often the data has to be sent via LoRa. Lets say you just want to measure the Light then you choose an Application_Mode (or define one) that only runs TaskLight for light measurement. As a standard all measurements are taken every second and sent via LoRa but you can change that interval depending on your usage Scenario

Committer:
mitea1
Date:
Fri Nov 02 17:01:02 2018 +0000
Revision:
10:4051c38bf73f
Parent:
0:f2815503561f
wtf

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mitea1 0:f2815503561f 1 /**
mitea1 0:f2815503561f 2 * @file uBloxConfig.h
mitea1 0:f2815503561f 3 *
mitea1 0:f2815503561f 4 * @author Adrian
mitea1 0:f2815503561f 5 * @date 30.05.2016
mitea1 0:f2815503561f 6 *
mitea1 0:f2815503561f 7 */
mitea1 0:f2815503561f 8 #include <string>
mitea1 0:f2815503561f 9 #include <map>
mitea1 0:f2815503561f 10 #include <vector>
mitea1 0:f2815503561f 11 #include <stdint.h>
mitea1 0:f2815503561f 12 #ifndef UBLOXCONFIG_H_
mitea1 0:f2815503561f 13 #define UBLOXCONFIG_H_
mitea1 0:f2815503561f 14
mitea1 0:f2815503561f 15
mitea1 0:f2815503561f 16 #define UBLOX_DISABLE_ALL_STRING "DISABLE ALL STRINGS"
mitea1 0:f2815503561f 17 #define UBLOX_ENABLE_POSLLH_STRING "ENABLE POSLLH STRING"
mitea1 0:f2815503561f 18 #define UBLOX_GNSS_ON "GNSS ON"
mitea1 0:f2815503561f 19 #define UBLOX_GNSS_OFF "GNSS OFF"
mitea1 0:f2815503561f 20 #define UBLOX_CONTINUOUS_MODE "CONTINUOUS MODE"
mitea1 0:f2815503561f 21 #define UBLOX_POWER_SAVE_MODE "POWER SAVE MODE"
mitea1 0:f2815503561f 22 #define UBLOX_ECO_MODE "POWER SAVE MODE"
mitea1 0:f2815503561f 23
mitea1 0:f2815503561f 24 /**
mitea1 0:f2815503561f 25 * uBlox Modes. Modes define Sensor functionality
mitea1 0:f2815503561f 26 */
mitea1 0:f2815503561f 27 enum uBLOX_MODE{
mitea1 0:f2815503561f 28 uBLOX_MODE_0,//!< uBLOX_MODE_0
mitea1 0:f2815503561f 29 uBLOX_MODE_1,//!< uBLOX_MODE_1
mitea1 0:f2815503561f 30 uBLOX_MODE_2,//!< uBLOX_MODE_2
mitea1 0:f2815503561f 31 uBLOX_MODE_3,//!< uBLOX_MODE_3
mitea1 0:f2815503561f 32 };
mitea1 0:f2815503561f 33
mitea1 0:f2815503561f 34 /**
mitea1 0:f2815503561f 35 * @class uBloxConfig
mitea1 0:f2815503561f 36 * @brief A configuration container for the uBlox.
mitea1 0:f2815503561f 37 * All its configuration values are stored an held inside
mitea1 0:f2815503561f 38 * this Class. Depending on the uBLOX_MODE it sets all the configuration values.
mitea1 0:f2815503561f 39 */
mitea1 0:f2815503561f 40 class uBloxConfig {
mitea1 0:f2815503561f 41 public:
mitea1 0:f2815503561f 42 uBloxConfig();
mitea1 0:f2815503561f 43 virtual ~uBloxConfig();
mitea1 0:f2815503561f 44
mitea1 0:f2815503561f 45 /**
mitea1 0:f2815503561f 46 * @brief Generates a configuration according to the chosen uBLOX_MODE. More exactly it builds
mitea1 0:f2815503561f 47 * the strings that have to be sent at the initialization of the uBlox to run the uBlox to
mitea1 0:f2815503561f 48 * run it in a specific configuration
mitea1 0:f2815503561f 49 * @param desiredMode the mode to build the configuration according to
mitea1 0:f2815503561f 50 */
mitea1 0:f2815503561f 51 void build(uBLOX_MODE);
mitea1 0:f2815503561f 52
mitea1 0:f2815503561f 53 std::vector< std::vector<uint8_t> > getInitialConfigurationString();
mitea1 0:f2815503561f 54 private:
mitea1 0:f2815503561f 55
mitea1 0:f2815503561f 56 std::map<std::string,std::vector<uint8_t> > configCommands;
mitea1 0:f2815503561f 57 std::vector< std::vector<uint8_t> > initialCommands;
mitea1 0:f2815503561f 58
mitea1 0:f2815503561f 59 /**
mitea1 0:f2815503561f 60 * @brief Connects a command and its string that consists of Bytes
mitea1 0:f2815503561f 61 * @param command a command string describing the command
mitea1 0:f2815503561f 62 * @param string the content of the command
mitea1 0:f2815503561f 63 */
mitea1 0:f2815503561f 64 void connectCommandAndString(std::string command, uint8_t* string, uint8_t stringSize);
mitea1 0:f2815503561f 65
mitea1 0:f2815503561f 66
mitea1 0:f2815503561f 67 };
mitea1 0:f2815503561f 68
mitea1 0:f2815503561f 69 #endif /* UBLOXCONFIG_H_ */