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.
Dependencies: libmDot mbed-rtos mbed
Fork of mDot_Workshop by
Diff: main.cpp
- Revision:
- 8:308a67b71c86
- Parent:
- 6:ac306e26e4cc
- Child:
- 9:d589fb5e68a4
diff -r 8f2fd29c633a -r 308a67b71c86 main.cpp
--- a/main.cpp Mon Apr 04 18:43:17 2016 +0000
+++ b/main.cpp Mon Apr 04 21:26:16 2016 +0000
@@ -7,10 +7,10 @@
// these options must match the settings on your Conduit
// uncomment the following lines and edit their values to match your configuration
-static uint8_t config_app_eui[] = { 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04 };
-static uint8_t config_app_key[] = { 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04 };
+static uint8_t config_app_eui[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 };
+static uint8_t config_app_key[] = { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x45 };
-static uint8_t config_frequency_sub_band = 1;
+static uint8_t config_frequency_sub_band = 7;
int main() {
int32_t ret;
@@ -45,10 +45,14 @@
std::vector<uint8_t> temp;
- for (int i = 0; i < 16; i++) {
+ for (int i = 0; i < 8; i++) {
temp.push_back(config_app_eui[i]);
}
+ if ((ret = dot->setPublicNetwork(true)) != mDot::MDOT_OK) {
+ logError("failed to set public network");
+ }
+
logInfo("setting app eui");
if ((ret = dot->setNetworkId(temp)) != mDot::MDOT_OK) {
logError("failed to set app eui %d:%s", ret, mDot::getReturnCodeString(ret).c_str());
