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

ESP32 or GSM #19

Open
eried opened this issue Sep 13, 2022 · 0 comments
Open

ESP32 or GSM #19

eried opened this issue Sep 13, 2022 · 0 comments

Comments

@eried
Copy link

eried commented Sep 13, 2022

Hi,

I am making a device that can use wifi (esp32) or gsm, it works well with:

#ifdef USE_GSM
#include <CayenneMQTTGSM.h>
#else
#include <CayenneMQTTESP32.h>
#endif

however it would be nice to switch from wifi to gsm while the device is running, or at least at boot if wifi timeouts. If I include both libraries there is a conflict because the begin is different:

#ifdef USE_GSM
Cayenne.begin(username, password, clientID, SerialAT, apn, gprsLogin, gprsPassword, pin);
#else
Cayenne.begin(username, password, clientID, ssid, wifiPassword);
#endif

Any idea how to deal with this?

Thanks

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

1 participant