Comments (9)
Ah I used the IDE to update the WiFi module firmware and now it's ok!
from arduinoiotcloud.
I've tried several things, but none of them cause the connection to come back up:
void loop() {
ArduinoCloud.update();
// ---- Maintaining connection led
bool connected = ArduinoCloud.connected();
if (connected_prev != connected) {
Serial.print("ArduinoCloud connection ");
Serial.println(connected);
}
connected_prev = connected;
digitalWrite(CONNECTION_LED_PIN, connected);
// ---- Reconnect
ArduinoIoTPreferredConnection.check();
// if (!connected) {
// Serial.println("ArduinoCloud reconnecting...");
// ArduinoIoTPreferredConnection.connect();
// ArduinoCloud.begin(ArduinoIoTPreferredConnection);
// delay(10000);
// }
}
from arduinoiotcloud.
Hi @jcham 👋
The reconnection is handled within the ArduinoCloud logic. Under no circumstances should you try to manually interfere with this logic (e.g. directly calling ArduinoIoTPreferredConnection.check()
). When you say "WiFi connection gets momentarily lost" what kind of WiFi connection loss are you describing?
from arduinoiotcloud.
Also: What board are you using?
from arduinoiotcloud.
Using an Arduino Nano 33. That's what I tried in the first place, but it never reconnects. I don't know in production why the connection fails, but I can replicate my problem by turning off the wifi at home.
So not calling anything it should reconnect automatically?
from arduinoiotcloud.
When I disconnect the WiFi, I get this on the Serial:
ArduinoIoTCloudTCP::handle_Connected MQTT client connection lost
But it never reconnects, what do I have to do to restart it.
from arduinoiotcloud.
Actually, there is still a problem: when the WiFi comes in and out it reconnects fine, but some other condition (after some random amount of time) causes it to drop and then it doesn't recover. How to debug this?
from arduinoiotcloud.
Hi 👋 We've got new releases of the firmware running on the WiFi module (NINA-W102). Would you mind trying to upgrade to the latest release (1.4.3) and see if that solves your issue? Best way to do is is probably: https://github.com/arduino/FirmwareUpdater.
from arduinoiotcloud.
@jcham Lot's of stuff happened 👋 ArduinoIoTCloud:v1.0.1 in combination with nina-fw:v1.4.4 should solve a lot of issues with regards to reconnection. I'll be closing this issue since you already failed to answer to my last comment. If you should still be around and give a spin to the latest releases AND still experience issues, please reopen this issue.
from arduinoiotcloud.
Related Issues (20)
- Reset when connected to network but no internet HOT 1
- Version 1.10.0 - Error in OTA.h HOT 4
- Compilation of my sketch fails: "`'class ArduinoIoTCloudTCP' has no member named 'getFloatProperty'`" HOT 1
- Include the capability to send messages from the modules to the messenger dashboard HOT 13
- Fatal Error: SFU.h: No Such File or Directory HOT 4
- Incompatible Lszz.py with Apple M1 processor HOT 6
- Add a cloud pause capability needed for cellular modem devices like MKR NB 1500
- OTA support for Renesas-based boards: `UNO R4 WiFi`, `Portenta C33`
- ESP32 WROOM 32 DevKit (DIYMall) error connecting to ArduinoCloud HOT 2
- Negative values HOT 5
- Scheduler isn't valid when using Time zone HOT 5
- Where are the Micropython examples and help? HOT 1
- [WIRE-10] Make ota error codes homogeneous and board specific
- Add support for LZSS tools on Windows
- Compilation fails "multiple definition of ..." when "ESP Mail Client" and ArduinoIoTCloud libraries used in sketch
- Package tools on PyPI
- Warnings of usage of depricated code within Arduin Cloud libraries
- Add support cloud type for thermostat / Alexa.TemperatureSensor
- Library does not compile from the Arduino Cloud IDE for MKR Wi-Fi 1010 HOT 4
- OTA-esp32.cpp:125:29: error: 'isCapable' is not a member of 'Arduino_ESP32_OTA' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinoiotcloud.