diff --git a/.gitignore b/.gitignore index ee251ce..d497d0f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,8 @@ /Release/ /Debug/ /core +Build +*.a +CMakeFiles/ +*.cmake +CMakeCache.txt diff --git a/MQTTSNGateway/README.md b/MQTTSNGateway/README.md index c7a791c..3480b95 100644 --- a/MQTTSNGateway/README.md +++ b/MQTTSNGateway/README.md @@ -5,27 +5,21 @@ This Gateway can run as a transparent or aggregating Gateway by specifying the g ### **step1. Build the gateway** ```` -$ git clone -b develop https://github.com/eclipse/paho.mqtt-sn.embedded-c -$ cd paho.mqtt-sn.embedded-c/MQTTSNGateway -$ make [SENSORNET={udp6|xbee|loralink}] -$ make install -$ make clean +$ git clone -b develop https://github.com/eclipse/paho.mqtt-sn.embedded-c +$ cmake .. [-DSENSORNET={udp|udp6|xbee|loralink}] +$ make + ```` By default, a gateway for UDP is built. -In order to create a gateway for UDP6, XBee or LoRaLink, SENSORNET argument is required. +In order to create a gateway for UDP6, XBee or LoRaLink, -DSENSORNET argument is required. -MQTT-SNGateway, MQTT-SNLogmonitor and *.conf files are copied into ../ directory. -If you want to install the gateway into specific directories, enter a command line as follows: -```` -$ make install INSTALL_DIR=/path/to/your_directory CONFIG_DIR=/path/to/your_directory -```` - +MQTT-SNGateway and MQTT-SNLogmonitor (executable programs) are built in the Build directory. ### **step2. Execute the Gateway.** ```` -$ cd ../../ -$ ./MQTT-SNGateway [-f Config file name] + +$ ./Build/MQTT-SNGateway -f ./MQTTSNGateway/gateway.conf ```` If you get the error message as follows: ```` @@ -34,13 +28,12 @@ Aborted (core dumped) ```` You have to start using sudo command only once for the first time. ```` -$ sudo ./MQTT-SNGateway [-f Config file name] +$ sudo ./Build/MQTT-SNGateway -f ./MQTTSNGateway/gateway.conf ```` ### **How to Change the configuration of the gateway** -**../gateway.conf** Contents are follows: +**gateway.conf** Contents are follows: -
+ **BrokerName** to specify a domain name of the Broker, and **BrokerPortNo** is a port No of the Broker. **BrokerSecurePortNo** is for TLS connection. **MulticastIP** and **MulticastPortNo** is a multicast address for GWSEARCH messages. Gateway is waiting GWSEARCH and when receiving it send GWINFO message via MulticastIP address. Clients can get the gateway address (Gateway IP address and **GatewayPortNo**) from GWINFO message by means of std::recvfrom(). diff --git a/README.md b/README.md index 5a46018..db89200 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ MQTT project, but it's not yet complete. ## Build requirements / compilation -CMake builds for MQTTSNPacket with a Makefile for MQTTSNGateway have been introduced, along with Travis-CI configuration for automated build & testing. +CMake builds have been introduced, along with Travis-CI configuration for automated build & testing. The travis-build.sh file has the full build and test sequence for Linux.# config file of MQTT-SN Gateway # @@ -102,7 +95,7 @@ DeviceTxLoRaLink=/dev/ttyLoRaLinkTx # LOG ShearedMemory=NO; -