Change README.md form nicely.

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2017-05-14 09:56:17 +09:00
parent e341d1a326
commit b3a59d3b48

View File

@@ -6,8 +6,8 @@ $ git clone -b gateway https://github.com/eclipse/paho.mqtt-sn.embedded-c
$ cd paho.mqtt-sn.embedded-c/MQTTSNGateway $ cd paho.mqtt-sn.embedded-c/MQTTSNGateway
$ make $ make
$ make install $ make install
$ make clean $ make clean
``` ````
MQTT-SNGateway, MQTT-SNLogmonitor and param.conf are copied into ../ directory. MQTT-SNGateway, MQTT-SNLogmonitor and param.conf are copied into ../ directory.
@@ -22,7 +22,7 @@ $ ./MQTT-SNGateway [-f Config file name]
### **How to Change the configuration of the gateway** ### **How to Change the configuration of the gateway**
**../gateway.conf** Contents are follows: **../gateway.conf** Contents are follows:
```` ````
# config file of MQTT-SN Gateway # config file of MQTT-SN Gateway
@@ -38,22 +38,22 @@ ClientAuthentication=NO
#CertKey=/path/to/your_cert.pem #CertKey=/path/to/your_cert.pem
#PrivateKey=/path/to/your_private-key.pem #PrivateKey=/path/to/your_private-key.pem
GatewayID=1 GatewayID=1
GatewayName=PahoGateway-01 GatewayName=PahoGateway-01
KeepAlive=900 KeepAlive=900
#LoginID=your_ID #LoginID=your_ID
#Password=your_Password #Password=your_Password
# UDP # UDP
GatewayPortNo=10000 GatewayPortNo=10000
MulticastIP=225.1.1.1 MulticastIP=225.1.1.1
MulticastPortNo=1883 MulticastPortNo=1883
# XBee # XBee
Baudrate=38400 Baudrate=38400
SerialDevice=/dev/ttyUSB0 SerialDevice=/dev/ttyUSB0
ApiMode=2 ApiMode=2
``` ````
**BrokerName** to specify a domain name of the Broker, and **BrokerPortNo** is a port No of the Broker. **BrokerSecurePortNo** is for TLS connection. **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 ADVERTISE, GWSEARCH and GWINFO messages. Gateway is waiting GWSEARCH multicast message and when receiving it send GWINFO message via Broadcast address. Clients can get the gateway address (Gateway IP address and **GatewayPortNo**) from GWINFO message by means of std::recvfrom(), **MulticastIP** and **MulticastPortNo** is a multicast address for ADVERTISE, GWSEARCH and GWINFO messages. Gateway is waiting GWSEARCH multicast message and when receiving it send GWINFO message via Broadcast address. Clients can get the gateway address (Gateway IP address and **GatewayPortNo**) from GWINFO message by means of std::recvfrom(),