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 LoRaMeasuermentMessage.h
mitea1 0:f2815503561f 3 *
mitea1 0:f2815503561f 4 * @author Adrian
mitea1 0:f2815503561f 5 * @date 13.06.2016
mitea1 0:f2815503561f 6 */
mitea1 0:f2815503561f 7
mitea1 0:f2815503561f 8 #ifndef APP_LORAMEASUERMENTMESSAGE_H_
mitea1 0:f2815503561f 9 #define APP_LORAMEASUERMENTMESSAGE_H_
mitea1 0:f2815503561f 10
mitea1 0:f2815503561f 11 #include <stdio.h>
mitea1 0:f2815503561f 12 #include <stdint.h>
mitea1 0:f2815503561f 13 #include <string>
mitea1 0:f2815503561f 14 #include <vector>
mitea1 0:f2815503561f 15 #include "SensorMessage.h"
mitea1 0:f2815503561f 16
mitea1 0:f2815503561f 17 /**
mitea1 0:f2815503561f 18 * @class LoRaMeasurementMessage
mitea1 0:f2815503561f 19 * @brief A Container that can hold acquired measurement values such as Rssi, Snr and some other config values from the LoRa Module.
mitea1 0:f2815503561f 20 * The container will be transported via a MessageQueue between different Tasks and its intended to stored measurement results.
mitea1 0:f2815503561f 21 */
mitea1 0:f2815503561f 22 class LoRaMeasurementMessage: public SensorMessage {
mitea1 0:f2815503561f 23 public:
mitea1 0:f2815503561f 24 LoRaMeasurementMessage();
mitea1 0:f2815503561f 25 virtual ~LoRaMeasurementMessage();
mitea1 0:f2815503561f 26
mitea1 0:f2815503561f 27
mitea1 0:f2815503561f 28 /**
mitea1 0:f2815503561f 29 * @brief Sets the rssi value of the LoRaMeasurementMessage
mitea1 0:f2815503561f 30 * @param rssi rssi value to be stored
mitea1 0:f2815503561f 31 */
mitea1 0:f2815503561f 32 void setRssi(int16_t rssi);
mitea1 0:f2815503561f 33
mitea1 0:f2815503561f 34 /**
mitea1 0:f2815503561f 35 * @brief Gets the stored rssi value of the LoRaMeasurmentMessage
mitea1 0:f2815503561f 36 * @return
mitea1 0:f2815503561f 37 */
mitea1 0:f2815503561f 38 int16_t getRssi();
mitea1 0:f2815503561f 39
mitea1 0:f2815503561f 40 /**
mitea1 0:f2815503561f 41 * @brief Sets the snr value of the LoRaMeasurementMessage
mitea1 0:f2815503561f 42 * @param snr snr value to be stored
mitea1 0:f2815503561f 43 */
mitea1 0:f2815503561f 44 void setSnr(int16_t snr);
mitea1 0:f2815503561f 45
mitea1 0:f2815503561f 46 /**
mitea1 0:f2815503561f 47 * @brief Gets the stored snr value of the LoRaMeasurementMessage
mitea1 0:f2815503561f 48 * @return
mitea1 0:f2815503561f 49 */
mitea1 0:f2815503561f 50 int16_t getSnr();
mitea1 0:f2815503561f 51
mitea1 0:f2815503561f 52 /**
mitea1 0:f2815503561f 53 * @brief Sets the spreadingFactor of the LoRaMeasurementMessage
mitea1 0:f2815503561f 54 * @param spreadingFactor spreading Factor to be stored
mitea1 0:f2815503561f 55 */
mitea1 0:f2815503561f 56 void setSpreadingFactor(uint8_t spreadingFactor);
mitea1 0:f2815503561f 57
mitea1 0:f2815503561f 58 /**
mitea1 0:f2815503561f 59 * @brief Gets the stored spreading Factor of the LoRaMeasurementMessage
mitea1 0:f2815503561f 60 * @return
mitea1 0:f2815503561f 61 */
mitea1 0:f2815503561f 62 uint8_t getSpreadingFactor();
mitea1 0:f2815503561f 63
mitea1 0:f2815503561f 64 /**
mitea1 0:f2815503561f 65 * @brief Sets the tx Power value in dBm of the LoRaMeasurementMessage
mitea1 0:f2815503561f 66 * @param txPowerdBm tx Power in dBm to be stored
mitea1 0:f2815503561f 67 */
mitea1 0:f2815503561f 68 void setTxPowerdBm(uint8_t txPowerdBm);
mitea1 0:f2815503561f 69
mitea1 0:f2815503561f 70 /**
mitea1 0:f2815503561f 71 * @breif Gets the stored tx Power in dBm of the LoRaMeasurementMessage
mitea1 0:f2815503561f 72 * @return
mitea1 0:f2815503561f 73 */
mitea1 0:f2815503561f 74 uint8_t getTxPowerdBm();
mitea1 0:f2815503561f 75
mitea1 0:f2815503561f 76 /**
mitea1 0:f2815503561f 77 * Gets a small LoRaMessage Type Formated String from the LoRaMeasurmentMessage.
mitea1 0:f2815503561f 78 * This String can later be used for transportation via LoRa
mitea1 0:f2815503561f 79 * @return
mitea1 0:f2815503561f 80 */
mitea1 0:f2815503561f 81 virtual char* getLoRaMessageString();
mitea1 0:f2815503561f 82
mitea1 0:f2815503561f 83 private:
mitea1 0:f2815503561f 84 std::string loraMessage;
mitea1 0:f2815503561f 85 std::vector<std::string> loraMessageId;
mitea1 0:f2815503561f 86
mitea1 0:f2815503561f 87 int16_t rssi;
mitea1 0:f2815503561f 88 int16_t snr;
mitea1 0:f2815503561f 89 uint8_t spreadingFactor;
mitea1 0:f2815503561f 90 uint8_t txPowerdBm;
mitea1 0:f2815503561f 91
mitea1 0:f2815503561f 92
mitea1 0:f2815503561f 93 };
mitea1 0:f2815503561f 94
mitea1 0:f2815503561f 95 #endif /* APP_LORAMEASUERMENTMESSAGE_H_ */