MultiTech / libxDot-Custom

Fork of libxDot-dev-mbed5-deprecated by MultiTech

The Connect example can be used as a starting point for an xDot application.

Import programmDot_LoRa_Connect_Example_CUSTOM_AS923

Example configuration of frequencies and datarates for AS923 channel plan.

Change the libmDot-Custom library to libxDot-Custom after importing the above example.

Change the platform for the project to xDot in upper right corner of the compiler page.

Ensure the mbed-os version matches the with the library commit.

Currently the AT Firmware cannot be built online for the xDot.

Creating new channel plans

Copy EU868 or US915 custom channel plan as a starting point

Import librarymDot_Channel_Plans

Channel plans to enable libmDot-Custom

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

  1. Setup datarates, duty-cycle bands and channels in ChannelPlan_* constructor
  2. Modify GetJoinDatarate and CalculateJoinBackoff to change join datarates and backoff
  3. Customize HandleJoinAccept datarates
  4. Use GetRxWindow(int) to define how the device open Rx window 1 and 2
  5. GetNextChannel will pick a channel from the enabled channel at the current datarate before each TX
Revision:
23:17a25e16ccf1
Parent:
2:4569491293d7
Child:
24:707857d35a6e
--- a/Mote.h	Wed Oct 26 07:51:39 2016 -0500
+++ b/Mote.h	Mon Oct 31 14:51:55 2016 +0000
@@ -164,6 +164,10 @@
              */
             uint8_t SetChannelPlan(uint8_t freqBand);
 
+            uint8_t SetChannelPlan(ChannelPlan* plan);
+
+            Settings* GetSettings();
+
             /**
              * Get the channel mask of currently enabled channels
              * @return vector containing channel bit masks
@@ -236,6 +240,11 @@
             Statistics& GetStats();
 
             /**
+             * Reset the current statistics for the device
+             */
+            void ResetStats();
+
+            /**
              * Get time on air with current settings for provided payload bytes
              * 13 overhead bytes will be added to payload
              * @param bytes of payload data
@@ -260,3 +269,4 @@
 
 }
 #endif
+