-
Notifications
You must be signed in to change notification settings - Fork 78
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
Use without using Arduino_ConnectionHandler library #338
Comments
Hi @chrisisbeef |
An issue I have run into is using the Arduino_ConnectionHandler with a WPA2 Enterprise network, which is currently not supported AFAIK. WiFiNINA does support it though, so it can be done through that instead, but then ideally we should be able to call .begin() with no arguments. |
Hi, I have simmilar issue with ESP8266 board. I have created my own connection manager (not a custom handler in terms of your class) and initialize the Arduino cloud with #include <ArduinoIoTCloud.h>
// #include <Arduino_ConnectionHandler.h>
#include "ESPWiFiManager.h" //my custom wifi connection manager due to need of ESP8266WiFiMulti class
#define SECRET_DEVICE_KEY "**********************************" //masked out just for the purpose of this forum
#define SECRET_OPTIONAL_PASS "**********"
#define SECRET_SSID "***************"
const char DEVICE_LOGIN_NAME[] = "***********************";
const char SSID[] = SECRET_SSID;
const char PASS[] = SECRET_OPTIONAL_PASS;
const char DEVICE_KEY[] = SECRET_DEVICE_KEY;
// WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);
bool btnState;
void onBtnStateChange()
{
digitalWrite(LED_BUILTIN, btnState);
}
void setup()
{
DEBUGINIT(115200); //opens the hw serial etc.
ArduinoCloud.setBoardId(DEVICE_LOGIN_NAME);
ArduinoCloud.setSecretDeviceKey(DEVICE_KEY);
ArduinoCloud.addProperty(btnState, READWRITE, ON_CHANGE, onBtnStateChange);
wifiMgr.SetupWifi("ArduinoCloud", LED_BUILTIN); //sets up wifi connection, device host name and LED to blink for several infos
wifiMgr.ConnectWifi(); //connects to my wifi
ArduinoCloud.begin();
}
void loop()
{
//ArduinoCloud.update();
} What am I missing? |
You make a good point: ArduinoIoTCloud/src/ArduinoIoTCloudTCP.h Line 87 in d436b80
Although feedback regarding the need or lack of need for changes to the library in order to support use without the "Arduino_ConnectionHandler" library is welcome, this is not an appropriate place to request assistance with your project. Please feel free to request assistance over on Arduino Forum: https://forum.arduino.cc/c/software/iot-cloud/152 I'm sure we'll be able to help you out over there. |
OK, thanks, I have creted a related topic in the forum. |
Hi @milanbx I've created this draft PR #405 that should do the trick. Not yet finalized, but i've tested with a couple of boards and it is working.
|
Thanks @pennam a lot! |
If you give it a try, let me know if it works for you! |
@pennam: I have tried it and works fine! Thanks a lot! I'll wait for the PR to complete to update libraries... |
Good! Thanks for the feedback
I'll try to complete the PR as soon as possible, this was something unplanned so please be patient. |
No rush, please... 😃 |
It would be really nice if there was a way to use this without it taking control of the network connection allowing someone to do their own network connection handling. Is this something that the team would consider, or would my best bet to to fork this and customize if for my own use?
The text was updated successfully, but these errors were encountered: