tc.sendCommand returns true everytime
hello sir, im new to this page, this is not really an issue, but cant find a way to contact you and ask for help about my code im trying to use the ESP8266 on arduino ide I used the library created by videojedi which is based on your library, anyway I noticed on your telnetMikrotikRouter example, when i used it on ESP8266 on line number 41 " if(tc.login(mikrotikRouterIp, "admin", ""))" this returns false when my login is successfull.. else statement is executed.. but this is not really my problem, i want to check if username already exist on a hotspot server of mikrotik i have this lines of code:
String mt_cmd ="/ip hotspot user add name=cyreanne password=cyreanne profile=1day server=hotspot1"; erMsg = ""; int datalen = mtcmd.length() +1; char dataSend[datalen]; mt_cmd.toCharArray(dataSend, datalen); if(tc.sendCommand(dataSend)){ //this always returns true erMsg = "username already exist"; tc.disconnect(); Serial.println(erMsg); } else{ erMsg = "username added successfully";//so this is never executed even if username does not exist tc.disconnect(); Serial.println(erMsg); } am I doing it right? or can you point me to the right direction sir.. thank you so much...
good day say can you solve this issue upon compiling, thanks.
ESP8266TelnetClient.cpp:75:19: error: control reaches end of non-void function [-Werror=return-type] 75 | this->disconnect(); | ~~~~~~~~~~~~~~~~^~ cc1plus.exe: some warnings being treated as errors exit status 1
good day say can you solve this issue upon compiling, thanks.
ESP8266TelnetClient.cpp:75:19: error: control reaches end of non-void function [-Werror=return-type] 75 | this->disconnect(); | ~~~~~~~~~~~~~~~~^~ cc1plus.exe: some warnings being treated as errors exit status 1
Hello, did you already solve this problem? We have same issues..
good day say can you solve this issue upon compiling, thanks. ESP8266TelnetClient.cpp:75:19: error: control reaches end of non-void function [-Werror=return-type] 75 | this->disconnect(); | ~~~~~~~~~~~~~~~~^~ cc1plus.exe: some warnings being treated as errors exit status 1
Hello, did you already solve this problem? We have same issues..
I solved it replaces file ESP8266telnetClient.cpp line 75 "this->disconnect();" to "return false;"
Sorry I already forgot how I solved it last year.
On Mon, Mar 25, 2024, 10:57 AM Arturo V. Gutierrez @.***> wrote:
good day say can you solve this issue upon compiling, thanks. ESP8266TelnetClient.cpp:75:19: error: control reaches end of non-void function [-Werror=return-type] 75 | this->disconnect(); |
status 1 Hello, did you already solve this problem? We have same issues.. I solved it replaces file ESP8266telnetClient.cpp line 75 "this->disconnect();" to "return false;" — Reply to this email directly, view it on GitHub <https://github.com/alejho/Arduino-Telnet-Client/issues/14#issuecomment-2017122729>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BAJJIK7EPYHFLDPCGXR5WLTYZ6HCHAVCNFSM5AOB7IEKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBRG4YTEMRXGI4Q> . You are receiving this because you commented.Message ID: ***@***.***>