I should have checked my git diff -- another required change is
diff --git a/MQTTSNGateway/src/linux/xbee/SensorNetwork.h b/MQTTSNGateway/src/linux/xbee/SensorNetwork.h
index f4a18ee..264c57d 100644
--- a/MQTTSNGateway/src/linux/xbee/SensorNetwork.h
+++ b/MQTTSNGateway/src/linux/xbee/SensorNetwork.h
@@ -125,6 +125,7 @@ public:
int read(uint8_t* buf, uint16_t bufLen);
int initialize(void);
const char* getType(void);
+ const char* getDescription(void) { return "XBEE"; }
SensorNetAddress* getSenderAddress(void)
{
to be able to compile the xbee version. The UDP one gives a variant description; you might for this one too, I'm not sure about its purpose, I was just "making it go".
Another change I would suggest is
diff --git a/Makefile b/Makefile
index 6f33f36..f25a044 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,9 @@ SRCDIR := MQTTSNGateway/src
SUBDIR := MQTTSNPacket/src
OS := linux
-SENSORNET := udp
+ifndef SENSORNET
+ SENSORNET := udp
+endif
CPPSRCS := \
to allow the sensor net to be changed from make without altering the makefile. Ultimately, if we wanted this kind of thing to be an distributed binary, I think we might want the sensor net to be software selectable instead compile time selected, as than only a single binary is needed, but at least this change allows two binaries to be built without altering the Makefile.
Lastly, I'd like to see the XBee device SerialDevice to be able to be overridden on the command line, as if you are stuck using a USB serial device you might need to detect the device name before calling the gateway and pass it in on the command line (there are ways to get a steady device name if one does get desperate...). I can run up a diff for that if you like (eventually... the command line handling/def file handling is a fairly layered here and I've not followed it through completely)
PK