Library for LoRa communication using MultiTech MDOT.

Dependents:   mDot_test_rx adc_sensor_lora mDotEVBM2X mDot_AT_firmware ... more

Function documentation is in mDot.h

Warning

Using libmDot 2.0.3 and above with an existing application may require a change in the MacEvent handler!
Compile applications with mbed v121 and mbed-rtos v116 libraries.

In AT Command Firmware remove line 803.

CommandTerminal/CommandTerminal.cpp

        delete[] info->RxBuffer;

Likewise, if your application is handling events from the library asynchronously.

Revision:
4:94969e981dcc
Parent:
0:c62615f15125
Child:
5:0bfe6a650513
--- a/mDot.h	Wed Jun 24 17:21:14 2015 -0500
+++ b/mDot.h	Tue Jun 30 16:18:24 2015 -0500
@@ -47,7 +47,10 @@
         uint8_t getActivityLedState();
 
         void blinkActivityLed(void) {
-            _activity_led = !_activity_led;
+            if (_activity_led) {
+                int val = _activity_led->read();
+                _activity_led->write(!val);
+            }
         }
 
         mDot(const mDot&);
@@ -64,7 +67,9 @@
         static const uint32_t _baud_rates[];
         uint8_t _activity_led_state;
         Ticker _tick;
-        DigitalOut _activity_led;
+        DigitalOut* _activity_led;
+        bool _activity_led_enable;
+        PinName _activity_led_pin;
         uint16_t _linkFailCount;
 
         typedef enum {
@@ -195,7 +200,28 @@
         /** Get the current log level for the library
          * @returns current log level
          */
-        uint8_t getLogLevel();
+        uint8_t getLogLevel();
+
+        /** Enable or disable the activity LED.
+         * @param enable true to enable the LED, false to disable
+         */
+        void setActivityLedEnable(const bool& enable);
+
+        /** Find out if the activity LED is enabled
+         * @returns true if activity LED is enabled, false if disabled
+         */
+        bool getActivityLedEnable();
+
+        /** Use a different pin for the activity LED.
+         * The default is XBEE_RSSI.
+         * @param pin the new pin to use
+         */
+        void setActivityLedPin(const PinName& pin);
+
+        /** Find out what pin the activity LED is on
+         * @returns the pin the activity LED is using
+         */
+        PinName getActivityLedPin();
 
         /** Get list of channel frequencies currently in use
          * @returns vector of channels currently in use