arduino-libraries / WiFiLink-Library

Arduino Library WiFi Link
14 stars 26 forks source link

Unable to connect to your Library with my Arduino Primo #14

Open 1Map opened 7 years ago

1Map commented 7 years ago

Hi,

I tried several of your examples with my Arduino Primo and all giving:

Error0Communication with WiFi module not established.

JAndrassy commented 7 years ago

Hi. nobody here. Arduino.org doesn't exist anymore. I am the community expert for WiFi Link, but with "Uno WiFi". Primo has WiFi Link firmware in the ESP from the factory. Can you access the WiFi Link Web Panel of ESP on Primo?

1Map commented 7 years ago

Hi, Yes, I can access the Wifi Panel and setup it there to connect to my existing wifi. The problem is with the arduino code is that it is already connected to a wifi network and then it fails with:

Error0Communication with WiFi module not established.

If it is not already connected, then it works 100%. So, the arduino wifilink library should first detect if it is not already connected before just giving message, like:

Error0Communication with WiFi module not established.

JAndrassy commented 7 years ago

The ESP takes longer to initialize. I use

delay(4000);
while (WiFi.status() != WL_CONNECTED) {
  delay(10);
}

in setup()

1Map commented 7 years ago

Ok, thanks, but the error does not happen there it happens on the first one:

  if (WiFi.status() == WL_NO_WIFI_MODULE_COMM) {
    Serial.println("Communication with WiFi module not established.");
    while (true); // don't continue:
  }

this will give: Error0Communication with WiFi module not established.

As I said. this only happens if the wifi is already manually connected through the primo web interface to an existing wifi network. So during setup the above code fails...

JAndrassy commented 7 years ago

I understand you and my answer is valid in this context. I can't change the examples