diff --git a/MQTTSNGateway/README.md b/MQTTSNGateway/README.md index bef8415..22e3d27 100644 --- a/MQTTSNGateway/README.md +++ b/MQTTSNGateway/README.md @@ -94,18 +94,15 @@ When **QoS-1** is **YES**, QoS-1 PUBLISH is available. All clients which send Qo 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. When **Forwarder** is **YES**, Forwarder Encapsulation Message is available. Connectable Forwarders must be declared by a **ClientsList** file. - ### ** How to monitor the gateway from remote. ** - -Uncomment line32 in MQTTSNGWDefined.h. - -`//#define RINGBUFFER // print out Packets log into shared memory./"` -```` -$ make -$ make install -$ make clean +Change gateway.conf as follows: +``` +# LOG +ShearedMemory=YES; ```` -restart the gateway. + +Restart the gateway with sudo only once to create shared memories. + open ssh terminal and execute LogMonitor. `$ ./MQTT-SNLogmonitor` @@ -113,4 +110,15 @@ open ssh terminal and execute LogMonitor. Now you can get the Log on your terminal. +## ** Tips: ** +Uncomment the line 62, 63 in MQTTSNDefines.h then you can get more precise logs. +``` +/*================================= + * Log controls + ==================================*/ +//#define DEBUG // print out log for debug +//#define DEBUG_NWSTACK // print out SensorNetwork log +``` + + diff --git a/MQTTSNGateway/src/MQTTSNGWLogmonitor.cpp b/MQTTSNGateway/src/MQTTSNGWLogmonitor.cpp index 50dc482..692e3fe 100644 --- a/MQTTSNGateway/src/MQTTSNGWLogmonitor.cpp +++ b/MQTTSNGateway/src/MQTTSNGWLogmonitor.cpp @@ -13,8 +13,6 @@ * Contributors: * Tomoaki Yamaguchi - initial API and implementation and/or initial documentation **************************************************************************************/ -#define RINGBUFFER - #include "MQTTSNGWProcess.h" #include "MQTTSNGWLogmonitor.h" #include