Issues following the AdaFruit atwinc 1500 wifi breakout guide

Hello everyone

Before I start: I’ve posted this on the Adafruit Forum but sadly didn’t get any answer.

I’m new to the Arduino/adafruit community and would like you to help me on the following issue:

I’ve bought an Adafruit atwinc 1500 WiFi break + Arduino Uno in order to use it for my project. Since I’m not familiar with the Adafruit, I’ve downloaded the guide (See Link here) and followed the well explained steps one by one.

Arriving to the programming section and more specifically at the Firmware check, I’m now stuck because of an error I cannot figure out. The code that I’m using is literally a copy-past ( + adding the setPins required) of the code in the library.

The Code is:

#include <SPI.h>
#include <WiFi101.h>

void setup() {
  WiFi.setPins(8,7,4);
  Serial.begin(9600);
  while (!Serial) {
    ; 
  }

  Serial.println("WiFi101 firmware check.");
  Serial.println();


  Serial.print("WiFi101 shield: ");

  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("NOT PRESENT");
    return;
  }
  Serial.println("DETECTED");

  
  String fv = WiFi.firmwareVersion();
  String latestFv;
  Serial.print("Firmware version installed: ");
  Serial.println(fv);

  if (REV(GET_CHIPID()) >= REV_3A0) {
    
    latestFv = WIFI_FIRMWARE_LATEST_MODEL_B;
  } else {
    
    latestFv = WIFI_FIRMWARE_LATEST_MODEL_A;
  }


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

 
  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
}

Error Code with verbose during compile:

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino Uno"

[...]

Compiling sketch...
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\libraries\\SPI\\src" "-IC:\\Users\\Laurent\\Documents\\Arduino\\libraries\\WiFi101\\src" "C:\\Users\\Laurent\\AppData\\Local\\Temp\\arduino_build_308781\\sketch\\CheckWifi101FirmwareVersion.ino.cpp" -o "C:\\Users\\Laurent\\AppData\\Local\\Temp\\arduino_build_308781\\sketch\\CheckWifi101FirmwareVersion.ino.cpp.o"
C:\Users\Laurent\AppData\Local\Temp\arduino_modified_sketch_88\CheckWifi101FirmwareVersion.ino: In function 'void setup()':

CheckWifi101FirmwareVersion:42:22: error: 'GET_CHIPID' was not declared in this scope

   if (REV(GET_CHIPID()) >= REV_3A0) {

CheckWifi101FirmwareVersion:42:23: error: 'REV' was not declared in this scope

   if (REV(GET_CHIPID()) >= REV_3A0) {

CheckWifi101FirmwareVersion:42:28: error: 'REV_3A0' was not declared in this scope

   if (REV(GET_CHIPID()) >= REV_3A0) {

Using library SPI at version 1.0 in folder: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\libraries\SPI 
Using library WiFi101 at version 0.16.0 in folder: C:\Users\Laurent\Documents\Arduino\libraries\WiFi101 
exit status 1
'GET_CHIPID' was not declared in this scope

→ I’ve tried to declare GET_CHIPID, REV_3A0 and REV as a int, double or char. If I do so, I get an error telling me that they can’t be used as a function.

Thank you for your help

I've tried to declare GET_CHIPID, REV_3A0 and REV as a int, double or char.

Why? GET_CHIPID is clearly being used as a function. Declaring the name as an int, instead, is not going to produce anything like meaningful results when the not-any-longer-a-function gets called.

There IS an icon on the top row that allows you to create hyperlinks. Learn which one it is, and make the URLs clickable.

Post ALL your output, with verbose mode enabled during compile, so we can see what you are compiling for.

Hi Paul

Thank you for your answer. I have modified my post with the input you have given me.
Hope it helps.

Edit:

Once I take the "if" function out, I'm able to upload the code on my Arduino uno and am able to see which firmware version is installed ( 19.4.4). Which means my shield is wired correctly and getting detected.

I thus tried the next step of the guide which is the network scan:

After uploading the code from the Library, adding my setPins and uploading it to my arduino, all i see in my COM is:

MAC: F8:F0:05:F7:31:8E
Scanning available networks...
** Scan Networks **
number of available networks:0

I would greatly appreciate any help.

I have modified my post with the input you have given me.

So, you make me look like a fool for pointing out problems that don't exist any more.

I would greatly appreciate any help.

You won't be getting it from me.

PaulS:
So, you make me look like a fool for pointing out problems that don't exist any more.

Making you look like one wasn't my point at all.

PaulS:
You won't be getting it from me.

Thanks for trying

Other Customers using Winc 1500 WiFi shields are having the similar issues. The problem seems to come from the programms of the WiFi101 library itself. Since I like monologues, I thought I would post the solution that worked for me:

(credits to franklin97355 on the Adafruit forums)

Unzip the file and put it into your Arduino library folder. If you are following the steps of the guide, you should be able to carry on without any troubles.