Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of libmDot-custom by
Information
Library has been updated to mbed 5.x
The LoRaWAN Certification test mode implementation is built-in to libmDot code. When a start test mode packet is received the library will not return until test mode has ended.
Warning
This library is currently in BETA release. Unresolved issues may be experienced. Software is provided as is with no expectation of support of bug fixes in the future. Please report issues found through the mbed website or directly to support.multitech.com.
Changing of channel plan parameters may cause the device to no longer respect local RF regulations. Please use caution and respect your local regulations.
In AT Command Firmware remove line 803.
CommandTerminal/CommandTerminal.cpp
delete[] info->RxBuffer;
Likewise, if your application is handling events from the library asynchronously.
Creating new channel plans
Copy EU868 or US915 custom channel plan as a starting point
Import programmDot_AT_firmware_CUSTOM
AT Firmware with custom channel plan support
EU868 provides a framework for a DYNAMIC channel plan with duty-cycle limitations
US915 provides a framework for a FIXED channel plan
RADIO_POWERS are measured output in dBm for each radio tx power setting.
Additional MAC Commands can be implemented by overriding the HandleMacCommand function.
Steps
- Setup datarates, duty-cycle bands and channels in ChannelPlan_* constructor
- Modify GetJoinDatarate and CalculateJoinBackoff to change join datarates and backoff
- Customize HandleJoinAccept datarates
- Use GetRxWindow(int) to define how the device open Rx window 1 and 2
- GetNextChannel will pick a channel from the enabled channel at the current datarate before each TX
Diff: mDot.h
- 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

