@@ -13,13 +13,13 @@ The library is also available on [PlatformIO](https://platformio.org/lib/show/61
13
13
14
14
The following examples show how you can use the library with various Arduino compatible hardware:
15
15
16
- - [ Arduino Yun & Yun-Shield] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoYun/ArduinoYun.ino ) ([ SSL ] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoYun_SSL/ArduinoYun_SSL .ino ) )
16
+ - [ Arduino Yun & Yun-Shield] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoYun/ArduinoYun.ino ) ([ Secure ] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoYunSecure/ArduinoYunSecure .ino ) )
17
17
- [ Arduino Ethernet Shield] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoEthernetShield/ArduinoEthernetShield.ino )
18
18
- [ Arduino WiFi Shield] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoWiFiShield/ArduinoWiFiShield.ino )
19
- - [ Adafruit HUZZAH ESP8266] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/AdafruitHuzzahESP8266/AdafruitHuzzahESP8266.ino ) ([ SSL ] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/AdafruitHuzzahESP8266_SSL/AdafruitHuzzahESP8266_SSL .ino ) )
20
- - [ Arduino/Genuino WiFi101 Shield] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoWiFi101/ArduinoWiFi101.ino ) ([ SSL ] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoWiFi101_SSL/ArduinoWiFi101_SSL .ino ) )
21
- - [ Arduino MKR GSM 1400] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoMKRGSM1400/ArduinoMKRGSM1400.ino ) ([ SSL ] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoMKRGSM1400_SSL/ArduinoMKRGSM1400_SSL .ino ) )
22
- - [ ESP32 Development Board] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ESP32DevelopmentBoard/ESP32DevelopmentBoard.ino ) ([ SSL ] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ESP32DevelopmentBoard_SSL/ESP32DevelopmentBoard_SSL .ino ) )
19
+ - [ Adafruit HUZZAH ESP8266] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/AdafruitHuzzahESP8266/AdafruitHuzzahESP8266.ino ) ([ Secure ] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/AdafruitHuzzahESP8266Secure/AdafruitHuzzahESP8266Secure .ino ) )
20
+ - [ Arduino/Genuino WiFi101 Shield] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoWiFi101/ArduinoWiFi101.ino ) ([ Secure ] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoWiFi101Secure/ArduinoWiFi101Secure .ino ) )
21
+ - [ Arduino MKR GSM 1400] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoMKRGSM1400/ArduinoMKRGSM1400.ino ) ([ Secure ] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ArduinoMKRGSM1400Secure/ArduinoMKRGSM1400Secure .ino ) )
22
+ - [ ESP32 Development Board] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ESP32DevelopmentBoard/ESP32DevelopmentBoard.ino ) ([ Secure ] ( https://github.com/256dpi/arduino-mqtt/blob/master/examples/ESP32DevelopmentBoardSecure/ESP32DevelopmentBoardSecure .ino ) )
23
23
24
24
Other shields and boards should also work if they provide a [ Client] ( https://www.arduino.cc/en/Reference/ClientConstructor ) based network implementation.
25
25
@@ -107,7 +107,7 @@ void begin(const char hostname[], Client &client);
107
107
void begin(const char hostname[], int port, Client &client);
108
108
```
109
109
110
- - Specify port ` 8883 ` when using SSL clients for secure connections.
110
+ - Specify port ` 8883 ` when using secure clients for encrypted connections.
111
111
- Local domain names (e.g. ` Computer.local ` on OSX) are not supported by Arduino. You need to set the IP address directly.
112
112
113
113
The hostname and port can also be changed after calling ` begin() ` :
@@ -117,7 +117,7 @@ void setHost(const char hostname[]);
117
117
void setHost(const char hostname[ ] , int port);
118
118
```
119
119
120
- Set a will message (last testament) that gets registered on the broker after connecting:
120
+ Set a will message (last testament) that gets registered on the broker after connecting. `setWill()` has to be called before calling `connect()` :
121
121
122
122
```c++
123
123
void setWill(const char topic[]);
@@ -144,7 +144,7 @@ Set more advanced options:
144
144
void setOptions(int keepAlive, bool cleanSession, int timeout);
145
145
```
146
146
147
- - The ` keepAlive ` option controls the keep alive interval (default: 10).
147
+ - The ` keepAlive ` option controls the keep alive interval in seconds (default: 10).
148
148
- The ` cleanSession ` option controls the session retention on the broker side (default: true).
149
149
- The ` timeout ` option controls the default timeout for all commands in milliseconds (default: 1000).
150
150
0 commit comments