Wireless interface using LoRa technology

Dependencies:   AlohaTransceiver RingBuffer SX1276Lib_inAir SerialInterfaceProtocol mbed L3PDU

Revision:
9:86d95e095bb0
Parent:
8:e30610bf6f79
Child:
10:7dcb951ecabd
--- a/main.cpp	Wed Jul 27 04:38:00 2016 +0000
+++ b/main.cpp	Wed Jul 27 04:42:36 2016 +0000
@@ -12,7 +12,7 @@
 SerialInterfaceProtocol SIP(&SerialInputBuffer, &SerialOutputBuffer);
 
 // aloha transceiver
-AlohaTransceiver aloha;
+AlohaTransceiver aloha(DEVICE_ID);
 AlohaFrame txFrame;
 Timer timer;
 InterruptIn button(USER_BUTTON);
@@ -61,8 +61,8 @@
     // prepare for the frame
     txFrame.setType(AlohaFrame::Aloha_Data);
     txFrame.setPayloadLength(0x0);
-    txFrame.setSourceAddress(0x1);
-    txFrame.setDestinationAddress(0x2);
+    txFrame.setSourceAddress(aloha.getDeviceId());
+    txFrame.setDestinationAddress(0x0);
     txFrame.setFullMessageFlag(0x1);
     txFrame.setSequenceID(seqid);
     txFrame.generateCrc();