mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-13 15:36:51 +01:00
Update & BugFix Add GatewayTester
Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
@@ -15,37 +15,38 @@ MQTT-SNGateway, MQTT-SNLogmonitor and param.conf are copied into ../ directory.
|
||||
|
||||
````
|
||||
$ cd ../
|
||||
$ ./MQTT-SNGateway
|
||||
$ ./MQTT-SNGateway [-f Config file name]
|
||||
````
|
||||
|
||||
MQTT-SN clients should run in differnt from a host of the gateway. Other wise the gateway can't receive multicast packets form clients.
|
||||
|
||||
|
||||
### **How to Change the configuration of the gateway**
|
||||
**../param.conf** Contents are follows:
|
||||
**../gateway.conf** Contents are follows:
|
||||
|
||||
````
|
||||
|
||||
# config file of MQTT-SN Gateway
|
||||
|
||||
BrokerName=test.mosquitto.org
|
||||
BrokerPortNo=1883
|
||||
SecureConnection=NO
|
||||
#BrokerPortNo=8883
|
||||
#SecureConnection=YES
|
||||
ClientAuthorization=NO
|
||||
GatewayID=1
|
||||
GatewayName=PahoGateway-01
|
||||
KeepAlive=900
|
||||
#LoginID=
|
||||
#Password=
|
||||
|
||||
# UDP
|
||||
GatewayPortNo=2000
|
||||
MulticastIP=225.1.1.1
|
||||
MulticastPortNo=1883
|
||||
|
||||
# XBee
|
||||
Baudrate=38400
|
||||
SerialDevice=/dev/ttyUSB0
|
||||
BrokerName=iot.eclipse.org
|
||||
BrokerPortNo=1883
|
||||
SecureConnection=NO
|
||||
#BrokerPortNo=8883
|
||||
#SecureConnection=YES
|
||||
ClientAuthentication=NO
|
||||
ClientList=clients.conf
|
||||
GatewayID=1
|
||||
GatewayName=PahoGateway-01
|
||||
KeepAlive=900
|
||||
#LoginID=
|
||||
#Password=
|
||||
|
||||
# UDP
|
||||
GatewayPortNo=10000
|
||||
MulticastIP=225.1.1.1
|
||||
MulticastPortNo=1883
|
||||
|
||||
# XBee
|
||||
Baudrate=38400
|
||||
SerialDevice=/dev/ttyUSB0
|
||||
```
|
||||
|
||||
**BrokerName** to specify a domain name of the Broker, and **BrokerPortNo** is a port No of the Broker. If the Broker have to connected via TLS, set BrokerPortNo=8883 and **SecureConnection=YES**.
|
||||
@@ -53,15 +54,9 @@ SerialDevice=/dev/ttyUSB0
|
||||
Client should know the BroadcastIP and PortNo to send a SEARCHGW message.
|
||||
**GatewayId** is defined by GWSEARCH message.
|
||||
**KeepAlive** is a duration of ADVERTISE message in seconds.
|
||||
when **ClientAuthorization** is YES, see MQTTSNGWClient.cpp line53, /usr/local/etc/mqttsnGateway/config/clientList.conf file is required. this file defines connect able clients by IPaddress and PortNo.
|
||||
when **ClientAuthentication** is YES, see MQTTSNGWClient.cpp line53, clients file specified by ClientList is required. This file defines connect allowed clients by ClientId, IPaddress and PortNo.
|
||||
|
||||
|
||||
### ** How to change the config files directory. **
|
||||
|
||||
The directory is defined in MQTTSNGWProcess.h line33.
|
||||
change this value to new directory you want to use.
|
||||
|
||||
`#define MQTTSNGW_CONFIG_DIRECTORY "./"`
|
||||
|
||||
### ** How to monitor the gateway from remote. **
|
||||
|
||||
|
||||
Reference in New Issue
Block a user