Skip to content
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

error: 'class IPAddress' has no member named 'isSet' #12

Closed
zenbooster opened this issue Sep 26, 2021 · 7 comments
Closed

error: 'class IPAddress' has no member named 'isSet' #12

zenbooster opened this issue Sep 26, 2021 · 7 comments

Comments

@zenbooster
Copy link

zenbooster commented Sep 26, 2021

When compilling TelnetServerExample for esp32-wroom-32:

C:\Users\home\Documents\Arduino\libraries\ESP_Telnet\src\ESPTelnet.cpp: In member function 'bool ESPTelnet::begin()':
C:\Users\home\Documents\Arduino\libraries\ESP_Telnet\src\ESPTelnet.cpp:16:56: error: 'class IPAddress' has no member named 'isSet'
   if (WiFi.status() == WL_CONNECTED || WiFi.softAPIP().isSet()) {
                                                        ^
@zenbooster zenbooster changed the title TelnetServerExample: error: 'class IPAddress' has no member named 'isSet' error: 'class IPAddress' has no member named 'isSet' Sep 26, 2021
@LennartHennigs
Copy link
Owner

Ah, thanks again.
Yes, I encountered that before - the WiFi classes of 32 and 8266 are slightly different. That's quite annoying. Plus, it's not that well documented.

Will check how to determine wether an IP is (in)valid on a 32.

@PacciK
Copy link

PacciK commented Nov 10, 2021

Hi @LennartHennigs , I was testing your library on an ESP32 and encountered this exact issue too.
Do you have an update ? Thanks!

@RichK2015
Copy link

RichK2015 commented Nov 14, 2021

This library could be the answer to my prayers.

However, I'm seeing the same isSet() error reported above using my ESP-32 WROOM32D. I'm using the DOIT DEVKIT V1 board template on Arduino 1.8.51 and the Library version shows up as Version: 1.2.1.

Thanks for any help you can provide

@NashAli
Copy link

NashAli commented Nov 15, 2021

C:...\Arduino\libraries\ESP_Telnet\src\ESPTelnet.cpp: In member function 'bool ESPTelnet::begin()':
C:...\Arduino\libraries\ESP_Telnet\src\ESPTelnet.cpp:16:56: error: 'class IPAddress' has no member named 'isSet'
if (WiFi.status() == WL_CONNECTED || WiFi.softAPIP().isSet()) {
_________________________________________________________^
I encountered this conflict as well, running an esp32 Dev Module, Win 10 environment using Arduino IDE 1.8.16.

If I compile for the ESP8266 it compiles fine and if I switch to the ESP32, it fails.

I tried this in your code for now!

/* ------------------------------------------------- */

bool ESPTelnet::begin() {
ip = "";
// connected to WiFi or is ESP in AP mode?
#if defined(ARDUINO_ARCH_ESP8266)
if (WiFi.status() == WL_CONNECTED || WiFi.softAPIP().isSet()) {
server.begin();
server.setNoDelay(true);
return true;
} else {
return false;
}
#elif defined(ARDUINO_ARCH_ESP32)
if (WiFi.status() == WL_CONNECTED ) {
server.begin();
server.setNoDelay(true);
return true;
} else {
return false;
}
#endif

}

Telnet is a very cool feature for the ESP, great work!!
Thanks for your time!!
Nash.

LennartHennigs added a commit that referenced this issue Nov 15, 2021
@LennartHennigs
Copy link
Owner

Added a private function that either uses isSet() (for ESP8266) or looks at the toString() ip address (for ESP32)

@szilvasyz
Copy link

Dear Friend,
I think you should add the prototype of the _isIPSet() helper function also to the header file. Without this I got the following error message:

/Users/szilva/Documents/Arduino/libraries/ESP_Telnet/src/ESPTelnet.cpp:14:38: error: no 'bool ESPTelnet::_isIPSet(IPAddress)' member function declared in class 'ESPTelnet'
bool ESPTelnet::_isIPSet(IPAddress ip) {
^

@LennartHennigs
Copy link
Owner

Hey, I published the code with v.1.2.2.
It should work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants