0

Adafruit Wifi Breakout Unstable?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit Wifi Breakout Unstable?

by cindynnn on Fri Mar 09, 2018 1:10 am

I am trying to connect the ATWINC1500 Wifi Breakout (https://www.adafruit.com/product/2999) to an Arduino Uno Rev3, and it's been challenging.

Arduino IDE ver: 1.8.5
Wifi101 library ver: 0.15.2

I tried the CheckWifi101FirmwareVersion sketch:
Code: Select all | TOGGLE FULL SIZE
/*
 * This example check if the firmware loaded on the WiFi101
 * shield is updated.
 *
 * Circuit:
 * - WiFi101 Shield attached
 *
 * Created 29 July 2015 by Cristian Maglie
 * This code is in the public domain.
 */
#include <SPI.h>
#include <WiFi101.h>
#include <driver/source/nmasic.h>

void setup() {
  WiFi.setPins(9,7,4);
 
  // Initialize serial
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }

  // Print a welcome message
  Serial.println("WiFi101 firmware check.");
  Serial.println();

  // Check for the presence of the shield
  Serial.print("WiFi101 shield: ");
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("NOT PRESENT");
    return; // don't continue
  }
  Serial.println("DETECTED");

  // Print firmware version on the shield
  String fv = WiFi.firmwareVersion();
  String latestFv;
  Serial.print("Firmware version installed: ");
  Serial.println(fv);

  if (REV(GET_CHIPID()) >= REV_3A0) {
    // model B
    latestFv = WIFI_FIRMWARE_LATEST_MODEL_B;
  } else {
    // model A
    latestFv = WIFI_FIRMWARE_LATEST_MODEL_A;
  }

  // Print required firmware version
  Serial.print("Latest firmware version available : ");
  Serial.println(latestFv);

  // Check if the latest version is installed
  Serial.println();
  if (fv == latestFv) {
    Serial.println("Check result: PASSED");
  } else {
    Serial.println("Check result: NOT PASSED");
    Serial.println(" - The firmware version on the shield do not match the");
    Serial.println("   version required by the library, you may experience");
    Serial.println("   issues or failures.");
  }
}

void loop() {
  // do nothing
}


I attached a picture of the setup.

And I'm confused because sometimes the Wifi shield is 'DETECTED', but most times (like 95% of the time) it is not detected, and I don't do anything differently between uploads. What's going on? :-(
Attachments
1520572105_tmp_IMG_0838.jpg
1520572105_tmp_IMG_0838.jpg (94.32 KiB) Viewed 169 times

cindynnn
 
Posts: 3
Joined: Fri Mar 09, 2018 12:08 am

Re: Adafruit Wifi Breakout Unstable?

by adafruit_support_mike on Sat Mar 10, 2018 12:42 am

That kind of behavior usually means there's a connection problem somewhere.

I can't make out the details on the WINC1500's solder joints in the photo above, but there seems to be some variation from one to the next. You might have a weak connection somewhere in there.

Take a look at our soldering turorial, give each joint a dab of flux, and reheat them. You want a smooth cone that covers the pad and sweeps up to the pin.

https://learn.adafruit.com/adafruit-gui ... -soldering

adafruit_support_mike
 
Posts: 50741
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit Wifi Breakout Unstable?

by cindynnn on Sun Mar 11, 2018 2:02 pm

Thanks so much for the tip! I re-soldered it and it's able to be detected reliably now.

However, it's taking quite long to connect to a Wifi source (15 minutes now). Is that normal? I can reliably connect to this wifi on a laptop computer just fine.

I'm running the following code:
Code: Select all | TOGGLE FULL SIZE
/*
  Web client

 This sketch connects to a website (http://www.google.com)
 using a WiFi shield.

 This example is written for a network using WPA encryption. For
 WEP or WPA, change the WiFi.begin() call accordingly.

 This example is written for a network using WPA encryption. For
 WEP or WPA, change the WiFi.begin() call accordingly.

 Circuit:
 * WiFi shield attached

 created 13 July 2010
 by dlf (Metodo2 srl)
 modified 31 May 2012
 by Tom Igoe
 */


#include <SPI.h>
#include <WiFi101.h>
#include "arduino_secrets.h"
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = "Cindy Nguyen’s iPhone";        // your network SSID (name)
char pass[] = "guacisgood";    // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0;            // your network key Index number (needed only for WEP)

int status = WL_IDLE_STATUS;
// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
//IPAddress server(74,125,232,128);  // numeric IP for Google (no DNS)
char server[] = "www.google.com";    // name address for Google (using DNS)

// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
WiFiClient client;

void setup() {

  WiFi.setPins(9,7,4);
 
  //Initialize serial and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }

  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while (true);
  }

  // attempt to connect to WiFi network:
  while (status != WL_CONNECTED) {
    Serial.print("Attempting to connect to SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
    status = WiFi.begin(ssid, pass);

    // wait 10 seconds for connection:
    delay(10000);
  }
  Serial.println("Connected to wifi");
  printWiFiStatus();

  Serial.println("\nStarting connection to server...");
  // if you get a connection, report back via serial:
  if (client.connect(server, 80)) {
    Serial.println("connected to server");
    // Make a HTTP request:
    client.println("GET /search?q=arduino HTTP/1.1");
    client.println("Host: www.google.com");
    client.println("Connection: close");
    client.println();
  }
}

void loop() {
  // if there are incoming bytes available
  // from the server, read them and print them:
  while (client.available()) {
    char c = client.read();
    Serial.write(c);
  }

  // if the server's disconnected, stop the client:
  if (!client.connected()) {
    Serial.println();
    Serial.println("disconnecting from server.");
    client.stop();

    // do nothing forevermore:
    while (true);
  }
}


void printWiFiStatus() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // print your WiFi shield's IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);

  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
}





cindynnn
 
Posts: 3
Joined: Fri Mar 09, 2018 12:08 am

Re: Adafruit Wifi Breakout Unstable?

by adafruit_support_mike on Sun Mar 11, 2018 11:27 pm

That's longer than I'd expect.

Try using the .RSSI() method to measure the strength of the signal the WINC1500 sees.

https://www.arduino.cc/en/Reference/WiFi101RSSI

adafruit_support_mike
 
Posts: 50741
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit Wifi Breakout Unstable?

by cindynnn on Mon Mar 12, 2018 6:54 pm

I'm getting -100 dBm. Is that an issue with the Adafruit or my wifi?

cindynnn
 
Posts: 3
Joined: Fri Mar 09, 2018 12:08 am

Re: Adafruit Wifi Breakout Unstable?

by adafruit_support_mike on Mon Mar 12, 2018 10:31 pm

Unfortunately, it could be any number of things. There might be signal interference from something nearby.

It sounds like communication between the WINC1500 and the Arduino is working properly though, which rules out a lot of connection and hardware problems. Try moving the WINC1500 to different locations and orientations to see if it picks up a stronger signal.

adafruit_support_mike
 
Posts: 50741
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.