Skip to content

WiFiClass::status() doesn't return WL_NO_SHIELD when shield is missing #22

@andreimatei

Description

@andreimatei

On my Arduino UNO board in a pristine state, with the WiFi101 shield not connected, the following program just hangs in that status() call. I've tried it with both versions 0.6 and 0.5 of the library.
I've tracked the hanging to m2m_wifi_init() -> nm_drv_init() -> wait_for_firmware_start(). This is probably expected, but I guess the question is how come nm_drv_init() does't fail earlier (in nm_bus_iface_init()?).

This has tripped me because the 101 shield I got was not particularly easy to plug in at first.

#include <WiFi101.h>

void setup() {
  Serial.begin(9600);
  while (!Serial) { }

  Serial.println("init");
  WiFi.status();
  Serial.println("why don't I get here?");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions