Coder Social home page Coder Social logo

Comments (9)

jcham avatar jcham commented on May 27, 2024 1

Ah I used the IDE to update the WiFi module firmware and now it's ok!

from arduinoiotcloud.

jcham avatar jcham commented on May 27, 2024

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.

aentinger avatar aentinger commented on May 27, 2024

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.

aentinger avatar aentinger commented on May 27, 2024

Also: What board are you using?

from arduinoiotcloud.

jcham avatar jcham commented on May 27, 2024

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.

jcham avatar jcham commented on May 27, 2024

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.

jcham avatar jcham commented on May 27, 2024

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.

aentinger avatar aentinger commented on May 27, 2024

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.

aentinger avatar aentinger commented on May 27, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.