-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Hot fix" for ESP82XX #2
base: main
Are you sure you want to change the base?
Conversation
Adding patch for ESP8XX so its possible compiling the firmware. I do not have the knowledge off writing C++ so i have adding it as comment and the user must comment the ESP32 out and un-commented lines fro ESP82XX for changing arch. Im very sure some one can doing it automatic detecting if ESP 32 or 82XX and dont need my hack. Looks working OK on my test setup with one "IKEA Marcus2 EZSP 6.10.3.0 one one D1 Mini clone.
Status report from testing: One WeMos D1 Mini clone with one "Markus EZSP" 6.10.3.0 is the stream server status connected for over one week and the ZHA is running on my laptop (Windows 10 and HA core containered) and have no error reported in the log and looks working fine all the time. Perhaps shall testing with RCP and see if it also working OK (without hardware flow control then HW is not supported in the ESP hardware) ;-)) I have one more D1 Mini flashed but its being for testing and have not being active all the time. |
|
||
// For ESP-32 | ||
this->socket_->setsockopt(SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout)); | ||
this->socket_->setsockopt(SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout)); | ||
|
||
// | ||
// For ESP82XX | ||
// this->socket_->setsockopt(SOL_SOCKET, LWIP_SO_RCVTIMEO, (char *)&timeout, sizeof(timeout)); | ||
// this->socket_->setsockopt(SOL_SOCKET, LWIP_SO_RCVTIMEO, (char *)&timeout, sizeof(timeout)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking through the esphome repo I believe you can do like this
#ifdef USE_ESP8266
this->socket_->setsockopt(SOL_SOCKET, LWIP_SO_RCVTIMEO, (char *)&timeout, sizeof(timeout));
this->socket_->setsockopt(SOL_SOCKET, LWIP_SO_RCVTIMEO, (char *)&timeout, sizeof(timeout));
#endif
#ifdef USE_ESP32
this->socket_->setsockopt(SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout));
this->socket_->setsockopt(SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout));
#endif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI there's also #ifdef USE_RP2040
I believe this part in // stream_server.h, lines 23-29
#ifdef ARDUINO_ARCH_ESP8266 // -> should be #ifdef USE_ESP8266
#include <ESPAsyncTCP.h>
#else
// AsyncTCP.h includes parts of freertos, which require FreeRTOS.h header to be included first
#include <freertos/FreeRTOS.h>
#include <AsyncTCP.h>
#endif |
Thanks @cenobitedk for comments on the "PR" !! Can you pleas posting OK formatted code that is possible putting in current code without braking it then i can doing the testing. Thanks in advance !! |
Adding patch for ESP8XX so its possible compiling the firmware. I do not have the knowledge off writing C++ so i have adding it as comment and the user must comment the ESP32 out and un-commented lines fro ESP82XX for changing arch. Im very sure some one can doing it automatic detecting if ESP 32 or 82XX and dont need my hack.
Looks working OK on my test setup with one "IKEA Marcus2 EZSP 6.10.3.0 one one D1 Mini clone.
PS: Some extra spaces is taken away.