This is a fork of the Multitech mDot LoRa Connect Example modified to log data or send from Temperature and Light Sensors connected to the mDot UDK
Dependencies: libmDot mbed-rtos mbed
Fork of mDot_LoRa_Connect_Example by
Revision 5:e9d78a9bafc5, committed 2016-04-04
- Comitter:
- jreiss
- Date:
- Mon Apr 04 18:44:38 2016 +0000
- Parent:
- 4:36e214ebfa56
- Child:
- 6:f0b6fea36e28
- Commit message:
- update libmDot
Changed in this revision
--- a/libmDot.lib Wed Sep 30 19:49:02 2015 +0000 +++ b/libmDot.lib Mon Apr 04 18:44:38 2016 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/MultiTech/code/libmDot/#0b4eb17d07ae +http://developer.mbed.org/teams/MultiTech/code/libmDot/#121e4c454964
--- a/main.cpp Wed Sep 30 19:49:02 2015 +0000
+++ b/main.cpp Mon Apr 04 18:44:38 2016 +0000
@@ -7,9 +7,9 @@
// these options must match the settings on your Conduit
// uncomment the following lines and edit their values to match your configuration
-//static std::string config_network_name = "<lora network id>";
-//static std::string config_network_pass = "<lora network key>";
-//static uint8_t config_frequency_sub_band = 1;
+static std::string config_network_name = "<lora network id>";
+static std::string config_network_pass = "<lora network key>";
+static uint8_t config_frequency_sub_band = 1;
int main() {
int32_t ret;
@@ -37,7 +37,12 @@
// frequency sub band is only applicable in the 915 (US) frequency band
// if using a MultiTech Conduit gateway, use the same sub band as your Conduit (1-8) - the mDot will use the 8 channels in that sub band
// if using a gateway that supports all 64 channels, use sub band 0 - the mDot will use all 64 channels
- logInfo("setting frequency sub band");
+
+ if ((ret = dot->setPublicNetwork(true)) != mDot::MDOT_OK) {
+ logError("failed to set public network %d:%s", ret, mDot::getReturnCodeString(ret).c_str());
+ }
+
+ logInfo("setting frequency sub band");
if ((ret = dot->setFrequencySubBand(config_frequency_sub_band)) != mDot::MDOT_OK) {
logError("failed to set frequency sub band %d:%s", ret, mDot::getReturnCodeString(ret).c_str());
}
--- a/mbed-rtos.lib Wed Sep 30 19:49:02 2015 +0000 +++ b/mbed-rtos.lib Mon Apr 04 18:44:38 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-rtos/#d7bd06319118 +http://mbed.org/users/mbed_official/code/mbed-rtos/#bdd541595fc5
--- a/mbed.bld Wed Sep 30 19:49:02 2015 +0000 +++ b/mbed.bld Mon Apr 04 18:44:38 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/c0f6e94411f5 \ No newline at end of file
