Wireless interface using LoRa technology

Dependencies:   AlohaTransceiver RingBuffer SX1276Lib SerialInterfaceProtocol mbed L3PDU

Revision:
8:332099ece6e9
Parent:
6:19457108c899
Child:
9:e13e02aa4a2f
--- a/main.cpp	Wed Jul 27 03:42:34 2016 +0000
+++ b/main.cpp	Wed Jul 27 04:37:58 2016 +0000
@@ -12,7 +12,7 @@
 SerialInterfaceProtocol SIP(&SerialInputBuffer, &SerialOutputBuffer);
 
 // aloha transceiver
-AlohaTransceiver aloha;
+AlohaTransceiver aloha(DEVICE_ID);
 AlohaFrame txFrame;
 
 void serialInterruptHandler() {
@@ -89,7 +89,7 @@
     // Transmit RSSI and SNR back to sender
     txFrame.setType(AlohaFrame::Aloha_Data);
     txFrame.setPayloadLength(3);
-    txFrame.setSourceAddress(frame->getDestinationAddress());
+    txFrame.setSourceAddress(aloha.getDeviceId());
     txFrame.setDestinationAddress(frame->getSourceAddress());
     txFrame.setFullMessageFlag(frame->getFullMessageFlag());
     txFrame.setSequenceID(frame->getSequenceID() + 1);