example for iot course with c027 and sx1276 module

Files at this revision

API Documentation at this revision

Comitter:
frank_dunn1
Date:
Fri May 24 19:00:01 2019 +0000
Parent:
50:6e615eea1e6f
Commit message:
test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed_app.json Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Mar 13 17:30:20 2019 +0000
+++ b/main.cpp	Fri May 24 19:00:01 2019 +0000
@@ -14,6 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include <mbed.h> 
 #include <stdio.h>
 
 #include "lorawan/LoRaWANInterface.h"
@@ -82,6 +83,9 @@
  */
 int main(void)
 {
+    DigitalOut resetPin(A0);
+    resetPin = false ;
+    
     // setup tracing
     setup_trace();
 
--- a/mbed_app.json	Wed Mar 13 17:30:20 2019 +0000
+++ b/mbed_app.json	Fri May 24 19:00:01 2019 +0000
@@ -6,13 +6,13 @@
         },
         "main_stack_size":     { "value": 4096 },
 
-        "lora-spi-mosi":       { "value": "NC" },
-        "lora-spi-miso":       { "value": "NC" },
-        "lora-spi-sclk":       { "value": "NC" },
-        "lora-cs":             { "value": "NC" },
-        "lora-reset":          { "value": "NC" },
-        "lora-dio0":           { "value": "NC" },
-        "lora-dio1":           { "value": "NC" },
+        "lora-spi-mosi":       { "value": "P1_24" },
+        "lora-spi-miso":       { "value": "P1_23" },
+        "lora-spi-sclk":       { "value": "P1_20" },
+        "lora-cs":             { "value": "P1_21" },
+        "lora-reset":          { "value": "D2" },
+        "lora-dio0":           { "value": "P2_4" },
+        "lora-dio1":           { "value": "P2_11" },
         "lora-dio2":           { "value": "NC" },
         "lora-dio3":           { "value": "NC" },
         "lora-dio4":           { "value": "NC" },
@@ -31,11 +31,11 @@
             "platform.stdio-baud-rate": 115200,
             "platform.default-serial-baud-rate": 115200,
             "lora.over-the-air-activation": false,
-            "lora.duty-cycle-on": false,
+            "lora.duty-cycle-on": true,
             "lora.phy": "EU868",
-            "lora.appskey": "{ 0xCD, 0xA9, 0x0D, 0x58, 0x4A, 0x45, 0x47, 0xE7, 0x77, 0x06, 0x63, 0x7E, 0x7B, 0x0D, 0x88, 0xC1 }",
-            "lora.nwkskey": "{ 0x30, 0xFD, 0x2C, 0xD2, 0x46, 0x06, 0xE5, 0xAE, 0x21, 0x8E, 0xCF, 0x29, 0xCE, 0xFB, 0xC1, 0xA1 }",
-            "lora.device-address": "0x26011BF1" 
+            "lora.appskey": "{ 0x11, 0xE1, 0x26, 0x56, 0x04, 0x12, 0x4E, 0xC1, 0xC1, 0x62, 0x82, 0xE5, 0xFF, 0x6F, 0xCD, 0xC5 }",
+            "lora.nwkskey": "{ 0xB0, 0xB5, 0xF7, 0x3B, 0x45, 0x06, 0x31, 0x85, 0x1B, 0x36, 0xAD, 0xAB, 0xE1, 0xB0, 0x0E, 0x36 }",
+            "lora.device-address": "0x26011D84" 
         },
 
         "K64F": {