paho_cs_sub.1 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. .TH PAHO_CS_SUB 1L "31 July 2018 (v1.3.0)" http://eclipse.org/paho
  2. .SH NAME
  3. paho_cs_sub \- receive (subscribe to) data from an MQTT server
  4. .SH SYNOPSIS
  5. .B paho_cs_sub
  6. [\fItopic\fR]
  7. [\fB\-t\fR|\fB\-\-topic\fR \fItopic\fR]
  8. [\fB\-c\fR|\fB\-\-connection\fR \fIconnection\fR]
  9. [\fB\-h\fR|\fB\-\-host\fR \fIhostname\fR]
  10. [\fB\-p\fR|\fB\-\-port\fR \fIportnumber\fR]
  11. [\fB\-i\fR|\fB\-\-clientid\fR \fIclientid\fR]
  12. [\fB\-u\fR|\fB\-\-username\fR \fIusername\fR]
  13. [\fB\-P\fR|\fB\-\-password\fR \fIpassword\fR]
  14. [\fB\-k\fR|\fB\-\-keepalive\fR \fIkeepalive-timeout\fR]
  15. [\fB\-V\fR|\fB\-\-MQTT-version\fR \fB31\fR|\fB311\fR|\fB5\fR]
  16. .br
  17. [\fB\-q\fR|\fB\-\-qos\fR \fB0\fR|\fB1\fR|\fB2\fR]
  18. [\fB\-R\fR|\fB\-\-no-retained\fR]
  19. [\fB\-\-delimiter\fR \fIdelimiter\fR]
  20. [\fB\-\-no-delimiter\fR]
  21. .br
  22. [\fB\-\-quiet\fR]
  23. [\fB\-\-verbose\fR]
  24. [\fB\-\-trace\fR \fBmin\fR|\fBmax\fR|\fBerror\fR|\fBprotocol\fR]
  25. .br
  26. [\fB\-\-will-topic\fR \fIwill-topic\fR]
  27. [\fB\-\-will-payload\fR \fIwill-payload\fR]
  28. [\fB\-\-will-retain\fR]
  29. [\fB\-\-will-qos\fR \fB0\fR|\fB1\fR|\fB2\fR]
  30. .br
  31. [\fB\-\-cafile\fR \fIcafile\fR]
  32. [\fB\-\-capath\fR \fIcapath\fR]
  33. [\fB\-\-cert\fR \fIcertfile\fR]
  34. [\fB\-\-key\fR \fIkeyfile\fR]
  35. [\fB\-\-keypass\fR \fIpassword\fR]
  36. [\fB\-\-ciphers\fR \fIcipher-string\fR]
  37. [\fB\-\-insecure\fR]
  38. .SH DESCRIPTION
  39. .B paho_cs_sub
  40. receives data from an MQTT server using the Eclipse Paho C client synchronous library (MQTTClient).
  41. MQTT is a protocol, operating over TCP/IP, which allows programs to easily communicate
  42. with each other through a server. Messages are published to topics and delivered to any subscribers to those topics.
  43. The corresponding publisher program \fBpaho_cs_pub\fR allows MQTT messages to be sent.
  44. .PP
  45. The default mode of operation is to output each message to stdout terminated by the delimiter.
  46. .SH "OPTIONS"
  47. .TP
  48. .PD 0
  49. .BI \-t
  50. .TP
  51. .PD
  52. .B \-\-topic
  53. The MQTT topic to publish the data to.
  54. .TP
  55. .PD 0
  56. .BI \-c
  57. .TP
  58. .PD
  59. .B \-\-connection
  60. The MQTT URI to connect to, a combination of transport prefix, host, port and for websockets, topic.
  61. To connect using TCP use the tcp prefix, for example: \fBtcp://\fR\fIlocalhost\fR\fB:\fR\fI1883\fR.
  62. An example using SSL/TLS: \fBssl://\fR\fIlocalhost\fR\fB:\fR\fI1883\fR.
  63. An example for websockets, insecure: \fBws://\fR\fIlocalhost\fR\fB:\fR\fI1883\fR\fB/\fR\fItopic\fR, and
  64. secure: \fBwss://\fR\fIlocalhost\fR\fB:\fR\fI80\fR\fB/\fR\fItopic\fR.
  65. .TP
  66. .PD 0
  67. .BI \-h
  68. .TP
  69. .PD
  70. .B \-\-host
  71. The TCP/IP host name of the MQTT server to connect to. Along with the \fB--port\fR option, an older alternative to using \fB--connection\fR.
  72. .TP
  73. .PD 0
  74. .BI \-p
  75. .TP
  76. .PD
  77. .B \-\-port
  78. The TCP/IP port number of the MQTT server to connect to. Along with the \fB--host\fR option, an older alternative to using \fB--connection\fR.
  79. .TP
  80. .PD 0
  81. .BI \-q
  82. .TP
  83. .PD
  84. .B \-\-qos
  85. The MQTT QoS on which to publish the message. The alternatives are \fB0\fR, \fB1\fR or \fB2\fR.
  86. .TP
  87. .PD 0
  88. .BI \-V
  89. .TP
  90. .PD
  91. .B \-\-MQTTversion
  92. The version of the MQTT protocol to use. Valid options are \fB31\fR (or \fBmqttv31\fR), \fB311\fR (\fBmqttv311\fR) and \fB5\fR (or \fBmqttv5\fR).
  93. .TP
  94. .PD
  95. .B \-\-quiet
  96. Do not print error messages.
  97. .TP
  98. .PD
  99. .B \-\-trace
  100. Print library internal trace. Valid levels are \fBmin\fR, \fBmax\fR, \fBerror\fR and \fprotocol\fR.
  101. .TP
  102. .PD 0
  103. .BI \-R
  104. .TP
  105. .PD
  106. .B \-\-no-retained
  107. Do not print messages which have the MQTT retained flag set.
  108. .TP
  109. .PD
  110. .B \-\-delimiter
  111. The delimiter string to append to each message when printing. Defaults to newline.
  112. .TP
  113. .PD
  114. .B \-\-no-delimiter
  115. Do not add a delimiter to each message when printing.
  116. .TP
  117. .PD
  118. .B \-\-will-topic
  119. Sets the MQTT will message topic to publish to. If the application ends without sending an MQTT disconnect, the
  120. will message will be published to this topic.
  121. .TP
  122. .PD
  123. .B \-\-will-payload
  124. Only used if \fBwill-topic\fR is set. Sets the MQTT will message to be published.
  125. .TP
  126. .PD
  127. .B \-\-will-qos
  128. Only used if \fBwill-topic\fR is set. Sets the MQTT QoS at which the will message is published. The alternatives are \fB0\fR, \fB1\fR or \fB2\fR.
  129. .TP
  130. .PD
  131. .B \-\-will-retain
  132. Only used if \fBwill-topic\fR is set. Sets the MQTT retained flag on the will message.
  133. .TP
  134. .PD
  135. .B \-\-cafile
  136. Only used with a TLS connection. The name of a file for the OpenSSL trust store.
  137. .TP
  138. .PD
  139. .B \-\-capath
  140. Only used with a TLS connection. The name of a directory holding OpenSSL trusted certificates.
  141. .TP
  142. .PD
  143. .B \-\-cert
  144. Only used with a TLS connection. The name of a file for the TLS keystore containing a client certificate to be presented.
  145. .TP
  146. .PD
  147. .B \-\-key
  148. Only used with a TLS connection. The name of a file containing the client private key.
  149. .TP
  150. .PD
  151. .B \-\-keypass
  152. Only used with a TLS connection. The password for the client private key file, if needed.
  153. .TP
  154. .PD
  155. .B \-\-ciphers
  156. Only used with a TLS connection. A list of cipher suites that the client will present to the server during the TLS handshake.
  157. .TP
  158. .PD
  159. .B \-\-insecure
  160. Only used with a TLS connection. Don't check that the server certificate common name matches the hostname.