diff --git a/MQTTSNGateway/README.md b/MQTTSNGateway/README.md index 108511e..af6094d 100644 --- a/MQTTSNGateway/README.md +++ b/MQTTSNGateway/README.md @@ -1,4 +1,7 @@ -**MQTT-SN** requires a MQTT-SN Gateway which acts as a protocol converter to convert **MQTT-SN messages to MQTT messages**. MQTT-SN client (UDP) can not communicate directly with MQTT broker(TCP/IP). +# MQTT-SN Transparent / Aggrigating Gateway + +**MQTT-SN** requires a MQTT-SN Gateway which acts as a protocol converter to convert **MQTT-SN messages to MQTT messages**. MQTT-SN client over SensorNetwork can not communicate directly with MQTT broker(TCP/IP). +This Gateway can run as a transparent or aggrigating Gateway by specifying the gateway.conf. ### **step1. Build the gateway** ```` @@ -36,12 +39,12 @@ BrokerPortNo=1883 BrokerSecurePortNo=8883 # -# When AggregateGateway=YES or ClientAuthentication=YES, +# When AggregatingGateway=YES or ClientAuthentication=YES, # All clients must be specified by the ClientList File # ClientAuthentication=NO -AggregateGateway=NO +AggregatingGateway=NO QoS-1=NO Forwarder=NO @@ -82,7 +85,7 @@ ShearedMemory=NO; Client should know the MulticastIP and MulticastPortNo to send a SEARCHGW message. **GatewayId** is used by GWINFO message. **KeepAlive** is a duration of ADVERTISE message in seconds. -when **AggregateGateway** or **ClientAuthentication** is **YES**, All clients which connect to the gateway must be declared by a **ClientsList** file. +when **AggregatingGateway** or **ClientAuthentication** is **YES**, All clients which connect to the gateway must be declared by a **ClientsList** file. Format of the file is ClientId and SensorNetwork Address. e.g. IP address and Port No etc, in CSV. more detail see clients.conf. When **QoS-1** is **YES**, QoS-1 PUBLISH is available. All clients which send QoS-1 PUBLISH must be specified by Client.conf file. When **PredefinedTopic** is **YES**, **Pre-definedTopicId**s specified by **PredefinedTopicList** are effective. This file defines Pre-definedTopics of the clients. In this file, ClientID,TopicName and TopicID are declared in CSV format. diff --git a/MQTTSNGateway/gateway.conf b/MQTTSNGateway/gateway.conf index 52481de..c06853b 100644 --- a/MQTTSNGateway/gateway.conf +++ b/MQTTSNGateway/gateway.conf @@ -19,12 +19,12 @@ BrokerPortNo=1883 BrokerSecurePortNo=8883 # -# When AggregateGateway=YES or ClientAuthentication=YES, +# When AggregatingGateway=YES or ClientAuthentication=YES, # All clients must be specified by the ClientList File # ClientAuthentication=NO -AggregateGateway=NO +AggregatingGateway=NO QoS-1=NO Forwarder=NO diff --git a/MQTTSNGateway/src/MQTTSNGWAggregater.cpp b/MQTTSNGateway/src/MQTTSNGWAggregater.cpp index 1eceedd..b74ec86 100644 --- a/MQTTSNGateway/src/MQTTSNGWAggregater.cpp +++ b/MQTTSNGateway/src/MQTTSNGWAggregater.cpp @@ -40,7 +40,7 @@ void Aggregater::initialize(void) { char param[MQTTSNGW_PARAM_MAX]; - if (_gateway->getParam("AggregateGateway", param) == 0 ) + if (_gateway->getParam("AggregatingGateway", param) == 0 ) { if (!strcasecmp(param, "YES") ) { diff --git a/README.md b/README.md index d0818f6..5a46018 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,14 @@ It is dual licensed under the EPL and EDL (see about.html and notice.html for mo There are three sub-projects: 1. MQTTSNPacket - simple de/serialization of MQTT-SN packets, plus helper functions -2. MQTTGateway - MQTT-SN transparent gateway - connects MQTT-SN clients with an MQTT server. See the README within the project for more information. +2. MQTTGateway - MQTT-SN transparent/aggregating gateway - connects MQTT-SN clients with an MQTT server. See the README within the project for more information. 3. MQTTSNClient - high(er) level C++ client (not yet complete) The *MQTTSNPacket* directory contains the lowest level C library with the smallest requirements. This supplies simple serialization and deserialization routines. They serve as a base for the higher level libraries, but can also be used on their own. It is mainly up to you to write and read to and from the network. -The *MQTTSNGateway* directory contains an MQTT-SN to MQTT transparent gateway (see the MQTT-SN specification for a description of that.) It can +The *MQTTSNGateway* directory contains an MQTT-SN to MQTT transparent/aggregating gateway (see the MQTT-SN specification for a description of that.) It can be used to connect the MQTT-SN client to an MQTT server. The *MQTTSNClient* directory contains the next level C++ library. This is intended to mirror the way the MQTTClient works in the Paho embedded @@ -45,3 +45,4 @@ Discussion of the Paho clients takes place on the [Eclipse Mattermost Paho chann General questions about the MQTT protocol are discussed in the [MQTT Google Group](https://groups.google.com/forum/?hl=en-US&fromgroups#!forum/mqtt). More information is available via the [MQTT community](http://mqtt.org). +