Skip to content

Commit 1241fde

Browse files
committed
Update README
1 parent 404c32c commit 1241fde

1 file changed

Lines changed: 72 additions & 9 deletions

File tree

README.md

Lines changed: 72 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Native Nim MQTT client library
22

33
This is a hybrid package including a native Nim MQTT library and
4-
binaries for publishing and subscribing to a MQTT-broker.
4+
binaries for a MQTT broker, publisher and subscriber.
55

66
* [Install](#Install)
77
* [Binaries](#Binaries)
8-
* [Publish](#Publish)
9-
* [Subscribe](#Subscribe)
8+
* [nmqtt](#nmqtt)
9+
* [nmqtt_password](#nmqtt_password)
10+
* [nmqtt_pub](#nmqtt_pub)
11+
* [nmqtt_sub](#nmqtt_sub)
1012
* [Library](#Library)
1113
* [Examples](#Examples)
1214
* [Procs](#Procs)
@@ -27,11 +29,72 @@ $ nimble install
2729

2830
# Binaries
2931

30-
The package provides 2 binaries for publishing messages to a MQTT-broker and
31-
for subscribing to a MQTT-broker.
32+
The package provides 4 MQTT binaries:
33+
1) `nmqtt` -> Broker
34+
2) `nmqtt_password` -> Password utility for the broker
35+
3) `nmqtt_pub` -> MQTT publisher
36+
4) `nmqtt_sub` -> MQTT subscriber
3237

33-
## Publish
34-
```bash
38+
39+
## nmqtt
40+
```
41+
$ nmqtt --help
42+
nmqtt is a MQTT v3.1.1 broker
43+
44+
USAGE
45+
nmqtt [options]
46+
nmqtt [-c /path/to/config.conf]
47+
nmqtt [-h hostIP -p port]
48+
49+
CONFIG
50+
Use the configuration file for detailed settings,
51+
such as SSL, adjusting keep alive timer, etc. or
52+
specify options at the command line.
53+
54+
To add and delete users from the password file
55+
please use nmqtt_password:
56+
- nmqtt_password -a|-b|-d [options]
57+
58+
OPTIONS
59+
-?, --help print this cligen-erated help
60+
-c=, --config= absolute path to the config file. Overrides all other options.
61+
-h=, --host= IP-address to serve the broker on.
62+
-p=, --port= network port to accept connecting from.
63+
-v=, --verbosity= verbosity from 0-3.
64+
--max-conn= max simultaneous connections. Defaults to no limit.
65+
--clientid-maxlen= max lenght of clientid. Defaults to 65535.
66+
--clientid-spaces allow spaces in clientid. Defaults to false.
67+
--clientid-empty allow empty clientid and assign random id. Defaults to false.
68+
--client-kickold kick old client, if new client has same clientid. Defaults to false.
69+
--clientid-pass pass clientid in payload {clientid:payload}. Defaults to false.
70+
--password-file= absolute path to the password file
71+
```
72+
_SSL is not supported_
73+
74+
75+
## nmqtt_password
76+
```
77+
$ nmqtt_password --help
78+
Add users and passwords to nmqtt's password file.
79+
80+
USAGE
81+
nmqtt_password -a {password_file.conf} {username}
82+
nmqtt_password -b {password_file.conf} {username} {password}
83+
nmqtt_password -d {password_file.conf} {username}
84+
85+
CONFIG
86+
Add or delete users from nmqtt password file.
87+
88+
OPTIONS
89+
-?, --help print this cligen-erated help
90+
-a, --adduser add a new user to the password file.
91+
-b, --batch run in batch mode to allow passing passwords on the command line.
92+
-d, --deluser delete a user form the password file.
93+
```
94+
95+
96+
## nmqtt_pub
97+
```
3598
$ ./nmqtt_pub --help
3699
Publish MQTT messages to a MQTT-broker.
37100
@@ -65,8 +128,8 @@ OPTIONS
65128
_`-verbose` not implemented yet_
66129

67130

68-
## Subscribe
69-
```bash
131+
## nmqtt_sub
132+
```
70133
$ ./nmqtt_sub --help
71134
Subscribe to a topic on a MQTT-broker.
72135

0 commit comments

Comments
 (0)