ayushsharma82 / WebSerial

A remote terminal library for wireless microcontrollers to log, monitor or debug your firmware/product
https://webserial.pro
GNU Affero General Public License v3.0
461 stars 108 forks source link

WebSerial with PubSubClient for MQTT #37

Closed nadi1971 closed 2 years ago

nadi1971 commented 2 years ago

I'm trying to build a sketch for NodeMCU using PubSubClient for MQTT and WebSerial libraries. I'm using the following libraries:

include

include

include

include

include

include

When I'm enabling WebSerial library, I'm receiving the following error: D:\Arduino\ESP8266_Async_Demo\ESP8266_Async_Demo.ino: In function 'void setup()': ESP8266_Async_Demo:36:22: error: 'callback' was not declared in this scope; did you mean 'calloc'? 36 | client.setCallback(callback); | ^~~~ | calloc Multiple libraries were found for "Hash.h" Used: C:\Users\home\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\Hash Not used: D:\Arduino\libraries\AsyncElegantOTA exit status 1 'callback' was not declared in this scope; did you mean 'calloc'?

Could you please check how to make webserial library working with PubSubClient library?

nadi1971 commented 2 years ago

ESP8266_Async_Demo.txt

ayushsharma82 commented 2 years ago

The culprit is how the webpage was compiled previously.

I'll merge the new script in a couple of days to produce a better webpage.h file.

ayushsharma82 commented 2 years ago

Should be resolved with v1.3.0 release, Let me know the outcome.

nadi1971 commented 2 years ago

I've just checked and looks like it working. I'll try to compile the completed sketch and let you know if I'm still having problems. Thanks for your effort!