arduino-mkr1000

Why MKR1000 will not connect to WiFi when on battery power?


I have a MKR1000 project that connects to my WiFi network. The MKR1000 connects to my WiFi when powered via the USB port, but not when powered by the 3.7V LiPo. Is there a minimum power requirement that disallows the WiFi function when on battery power, or is there some other reason it's not working?

Here is a simple sketch I'm using to test; it connects when plugged in to the USB, but not when unplugged.

#include <WiFi101.h>
#include "Mkr.h"

int wifiStatus = WL_IDLE_STATUS;
char ssid[] = SECRET_SSID;
char pass[] = SECRET_PASS;
IPAddress localip;

void setup() {
    pinMode(LED_BUILTIN, OUTPUT);
    //Serial.println();
    ConnectToWifi();
    //Serial.println(wifiStatus);
}

void loop() {
    digitalWrite(LED_BUILTIN, HIGH);
    delay(1000);
    digitalWrite(LED_BUILTIN, LOW);
    delay(1000);
}

void ConnectToWifi() {
    wifiStatus = WiFi.status();
    int retrys = 10;
    while (wifiStatus != WL_CONNECTED) {
        wifiStatus = WiFi.begin(ssid, pass);
        delay(1000);
        if (wifiStatus != WL_CONNECTED) {
            retrys--;
            if (retrys < 0)
            {
                retrys = 10;
                delay(3600000);
            }
            delay(9000);
        }
    }
    localip = WiFi.localIP();
    //Serial.print("Connected: ");
    //Serial.println(localip);
}

Solution

  • Found the answer!

    The MKR1000 uses the Amtel WINC 1500 Model A module to connect to 802.11 b/g/n WiFi. The firmware that comes from the factory for that module is 19.6.1. Apparently Amtel stopped supporting the Model A, and firmware 19.4.4 was the last update available.

    After loading 19.4.4, the MKR1000 is now able to connect to my WiFi network when on battery power.

    Information on updating the firmware is available here: Guide To WiFi101