Thanks for reporting.
Which example do you try to compile?
It is a strange error.
line 190 in ESP8266SocketBase.cpp shows me:
sint8 ESP8266SocketBase::send(const char* data)
Explore... Chat... Share...
Moderator: igrr
sint8 ESP8266SocketBase::send(const char* data)
inx wrote:Hi
Thanks for reporting.
Which example do you try to compile?
It is a strange error.
line 190 in ESP8266SocketBase.cpp shows me:Code: Select allsint8 ESP8266SocketBase::send(const char* data)
/// Do not remove the include below
#include "ClientTEST.h"
#include <ESP8266WiFi.h>
#include <ESP8266Client.h>
const char* ssid = "HogeveenNet";
const char* password = "??????????";
// create a TCP client
ESP8266Client client("192.168.2.185", 222);
unsigned long now = 0;
//------------------------
//------------------------
// general callbacks
void onDataCb(ESP8266Client& client, char *data, unsigned short length)
{
Serial.write(data, length);
}
//------------------------
//------------------------
// TCP callbacks
void onConnectCb(ESP8266Client& client)
{
Serial.println("connected to server");
}
void onDisconnectCb()
{
Serial.println("disconnected from server");
}
void onReconnectCb(ESP8266Client& client, sint8 err)
{
Serial.print("reconnect CB: ");
Serial.println(espErrorToStr(err));
Serial.println(espErrorDesc(err));
}
void setup() {
Serial.begin(115200);
delay(10);
// We start by connecting to a WiFi network
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
// set callback functions
client.onData(onDataCb);
client.onConnected(onConnectCb);
client.onDisconnected(onDisconnectCb);
client.onReconnect(onReconnectCb);
}
void loop() {
if (client.isConnected()) {
Serial.println("sending to server");
client.send("ping\r\n");
delay(1000);
} else {
// connect
boolean res = client.connect();
if (!res) {
// Serial.println("could not connect");
}
}
delay(10);
}
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]