You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-3Lines changed: 29 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,18 @@
3
3
microgear-esp8266-arduino is a client library that is used to connect an ESP8266 chip to the NETPIE Platform's service for developing IoT applications. For more details on the NETPIE Platform, please visit https://netpie.io .
4
4
5
5
## Compatibility
6
+
6
7
We have tested this library and found it compatible with (but not limited to) the following hardware
7
8
- ESP8266-01, 07, 12E, 12F
8
9
- NodeMCU v1, v2, V3
9
10
- Espresso Lite v2.0
10
11
12
+
## Outgoing Network Port
13
+
14
+
Make sure ther following ports are allowed to connect from your network.
15
+
- Non-TLS mode : 8080 and 1883 (the library uses this mode by default)
16
+
- TLS mode : 8081 and 8883 (still under testing)
17
+
11
18
## Installation
12
19
* Download Arduino IDE 1.6.9 or later from https://www.arduino.cc/en/Main/Software
13
20
* After installation, open Preferences
@@ -182,6 +189,15 @@ Check the connection status, return true if it is connected.
182
189
183
190
---
184
191
192
+
**void MicroGear::useTLS(bool* enabled)**
193
+
194
+
Switch between uncrypted and TLS mode (by default the library does not use TLS). This function must be called before the connection is made.
195
+
196
+
**arguments**
197
+
**enabled* - set to TRUE to use TLS.
198
+
199
+
---
200
+
185
201
**void MicroGear::setAlias(char* alias)**
186
202
187
203
microgear can set its own alias, which to be used for others make a function call chat(). The alias will appear on the key management portal of netpie.io .
@@ -191,21 +207,31 @@ microgear can set its own alias, which to be used for others make a function cal
In the case that the microgear want to send a message to an unspecified receiver, the developer can use the function publish to the desired topic, which all the microgears that subscribe such topic will receive a message.
205
230
206
231
**arguments**
207
232
**topic* - name of topic to be send a message to.
208
233
**message* - message to be sent.
234
+
**decimal* - number of digits after the deimal point.
209
235
**retained* - retain a message or not, the default is false (optional))
0 commit comments