Control class for ESP8266 module. Implements TransportLayer methods.
More...
#include <ESP8266.h>
Control class for ESP8266 module. Implements TransportLayer methods.
◆ ESP8266()
ESP8266::ESP8266 |
( |
Module * |
module | ) |
|
Default constructor.
- Parameters
-
mod | Instance of Module that will be used to communicate with the radio. |
◆ begin()
int16_t ESP8266::begin |
( |
long |
speed | ) |
|
Initialization method.
- Parameters
-
speed | Baud rate to use for UART interface. |
- Returns
- Status Codes
◆ closeTransportConnection()
int16_t ESP8266::closeTransportConnection |
( |
| ) |
|
|
virtual |
◆ getNumBytes()
size_t ESP8266::getNumBytes |
( |
uint32_t |
timeout = 10000 , |
|
|
size_t |
minBytes = 10 |
|
) |
| |
|
virtual |
Get number of received bytes.
- Parameters
-
timeout | Reception timeout in ms. Defaults to 10000. |
minBytes | Minimum required number of bytes that must be received. |
- Returns
- Number of received bytes, or 0 on timeout.
Implements TransportLayer.
◆ join()
int16_t ESP8266::join |
( |
const char * |
ssid, |
|
|
const char * |
password |
|
) |
| |
Joins access point.
- Parameters
-
ssid | Access point SSID. |
password | Access point password. |
◆ openTransportConnection()
int16_t ESP8266::openTransportConnection |
( |
const char * |
host, |
|
|
const char * |
protocol, |
|
|
uint16_t |
port, |
|
|
uint16_t |
tcpKeepAlive = 0 |
|
) |
| |
|
virtual |
Open transport layer connection.
- Parameters
-
host | Host to connect to. |
protocol | Transport protocol to use. Usually "TCP" or "UDP". |
port | to be used for the connection. |
tcpKeepAlive | TCP keep alive interval. Defaults to 0. |
- Returns
- Status Codes
Implements TransportLayer.
◆ receive()
size_t ESP8266::receive |
( |
uint8_t * |
data, |
|
|
size_t |
len, |
|
|
uint32_t |
timeout = 10000 |
|
) |
| |
|
virtual |
Receive data.
- Parameters
-
data | Pointer to array to save the received data. |
len | Number of bytes to read. |
timeout | Reception timeout in ms. Defaults to 10000. |
- Returns
- Status Codes
Implements TransportLayer.
◆ reset()
int16_t ESP8266::reset |
( |
| ) |
|
◆ send() [1/2]
int16_t ESP8266::send |
( |
const char * |
data | ) |
|
|
virtual |
◆ send() [2/2]
int16_t ESP8266::send |
( |
uint8_t * |
data, |
|
|
uint32_t |
len |
|
) |
| |
|
virtual |
Send arbitrary binary data.
- Parameters
-
data | Data to be sent. |
len | Number of bytes to send. |
- Returns
- Status Codes
Implements TransportLayer.
The documentation for this class was generated from the following files:
- Libraries/RadioLib/src/modules/ESP8266/ESP8266.h
- Libraries/RadioLib/src/modules/ESP8266/ESP8266.cpp