program to test receiving packets from the gateway
Dependencies: libmDot mbed-rtos mbed-src
Revision 2:aadbdfb6d517, committed 2015-07-10
- Comitter:
- mfiore
- Date:
- Fri Jul 10 18:44:02 2015 +0000
- Parent:
- 1:8295b8c0d802
- Commit message:
- update libraries, add extra wait between packets
Changed in this revision
--- a/libmDot.lib Fri Jun 26 19:40:51 2015 +0000 +++ b/libmDot.lib Fri Jul 10 18:44:02 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/teams/MultiTech/code/libmDot/#5e805b567124 +http://developer.mbed.org/teams/MultiTech/code/libmDot/#0bfe6a650513
--- a/main.cpp Fri Jun 26 19:40:51 2015 +0000
+++ b/main.cpp Fri Jul 10 18:44:02 2015 +0000
@@ -7,8 +7,8 @@
using namespace mts;
-static std::string config_network_name = "<network name>";
-static std::string config_network_pass = "<network key>";
+static std::string config_network_name = "";
+static std::string config_network_pass = "";
static uint8_t config_frequency_sub_band = 1;
int main() {
@@ -17,6 +17,7 @@
int32_t ret;
int32_t next_tx;
+ int32_t wait_time = 2;
mDot* dot;
std::vector<uint8_t> send_data;
std::vector<uint8_t> recv_data;
@@ -50,6 +51,9 @@
logError("failed to set network password: [%d][%s]", ret, mDot::getReturnCodeString(ret).c_str());
}
+ logInfo("enabling activity LED");
+ dot->setActivityLedEnable(true);
+
logInfo("joining network");
while ((ret = dot->joinNetwork()) != mDot::MDOT_OK) {
logError("failed to join network: [%d][%s]", ret, mDot::getReturnCodeString(ret).c_str());
@@ -80,6 +84,8 @@
next_tx = dot->getNextTxMs() + 1;
logInfo("waiting %ld ms to transmit again", next_tx);
wait_ms(next_tx);
+ logInfo("waiting another %d seconds", wait_time);
+ wait(wait_time);
}
logInfo("Version: %s", dot->getId().c_str());
--- a/mbed-rtos.lib Fri Jun 26 19:40:51 2015 +0000 +++ b/mbed-rtos.lib Fri Jul 10 18:44:02 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-rtos/#ef0a22cdf839 +http://mbed.org/users/mbed_official/code/mbed-rtos/#a21475017ae2
--- a/mbed-src.lib Fri Jun 26 19:40:51 2015 +0000 +++ b/mbed-src.lib Fri Jul 10 18:44:02 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-src/#30f9462b5296 +http://mbed.org/users/mbed_official/code/mbed-src/#61103edf8a92