Unable to build ScanNetworks example for Nano 33 Sense (WiFiNINA errors)

My board is set to “Arduino Nano 33 BLE”
I have version 1.4.0 of WifiNINA installed

When I try to build the example, I get the following errors:

Arduino: 1.8.9 (Mac OS X), Board: "Arduino Nano 33 BLE"

Build options changed, rebuilding all
In file included from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/utility/wifi_drv.h:27:0,
                 from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiClient.cpp:30:
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:28:28: error: expected class-name before '{' token
 class WiFiUDP : public UDP {
                            ^
In file included from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/utility/wifi_drv.h:27:0,
                 from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiClient.cpp:30:
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:37:34: error: 'IPAddress' has not been declared
   virtual uint8_t beginMulticast(IPAddress, uint16_t);  // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 if there are no sockets available to use
                                  ^~~~~~~~~
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:44:27: error: 'IPAddress' has not been declared
   virtual int beginPacket(IPAddress ip, uint16_t port);
                           ^~~~~~~~~
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:56:9: error: 'Print' has not been declared
   using Print::write;
         ^~~~~
In file included from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/utility/wifi_drv.h:27:0,
                 from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.cpp:29:
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:28:28: error: expected class-name before '{' token
 class WiFiUDP : public UDP {
                            ^
In file included from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/utility/wifi_drv.h:27:0,
                 from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.cpp:29:
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:37:34: error: 'IPAddress' has not been declared
   virtual uint8_t beginMulticast(IPAddress, uint16_t);  // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 if there are no sockets available to use
                                  ^~~~~~~~~
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:44:27: error: 'IPAddress' has not been declared
   virtual int beginPacket(IPAddress ip, uint16_t port);
                           ^~~~~~~~~
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:56:9: error: 'Print' has not been declared
   using Print::write;
         ^~~~~
In file included from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/utility/wifi_drv.h:27:0,
                 from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFi.cpp:21:
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:28:28: error: expected class-name before '{' token
 class WiFiUDP : public UDP {
                            ^
In file included from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/utility/wifi_drv.h:27:0,
                 from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFi.cpp:21:
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:37:34: error: 'IPAddress' has not been declared
   virtual uint8_t beginMulticast(IPAddress, uint16_t);  // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 if there are no sockets available to use
                                  ^~~~~~~~~
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:44:27: error: 'IPAddress' has not been declared
   virtual int beginPacket(IPAddress ip, uint16_t port);
                           ^~~~~~~~~
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:56:9: error: 'Print' has not been declared
   using Print::write;
         ^~~~~
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:76:11: error: 'IPAddress' does not name a type
   virtual IPAddress remoteIP();
           ^~~~~~~~~
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:76:11: error: 'IPAddress' does not name a type
   virtual IPAddress remoteIP();
           ^~~~~~~~~
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:76:11: error: 'IPAddress' does not name a type
   virtual IPAddress remoteIP();
           ^~~~~~~~~
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.cpp:60:9: error: prototype for 'uint8_t WiFiUDP::beginMulticast(arduino::IPAddress, uint16_t)' does not match any in class 'WiFiUDP'
 uint8_t WiFiUDP::beginMulticast(IPAddress ip, uint16_t port) {
         ^~~~~~~
In file included from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/utility/wifi_drv.h:27:0,
                 from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.cpp:29:
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:37:19: error: candidate is: virtual uint8_t WiFiUDP::beginMulticast(int, uint16_t)
   virtual uint8_t beginMulticast(IPAddress, uint16_t);  // initialize, start listening on specified multicast IP address and port. Returns 1 if successful, 0 if there are no sockets available to use
                   ^~~~~~~~~~~~~~
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.cpp:108:5: error: prototype for 'int WiFiUDP::beginPacket(arduino::IPAddress, uint16_t)' does not match any in class 'WiFiUDP'
 int WiFiUDP::beginPacket(IPAddress ip, uint16_t port)
     ^~~~~~~
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.cpp:96:5: error: candidates are: virtual int WiFiUDP::beginPacket(const char*, uint16_t)
 int WiFiUDP::beginPacket(const char *host, uint16_t port)
     ^~~~~~~
In file included from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/utility/wifi_drv.h:27:0,
                 from /Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.cpp:29:
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.h:44:15: error:                 virtual int WiFiUDP::beginPacket(int, uint16_t)
   virtual int beginPacket(IPAddress ip, uint16_t port);
               ^~~~~~~~~~~
/Users/lkw/Documents/Arduino/libraries/WiFiNINA/src/WiFiUdp.cpp:198:30: error: no 'arduino::IPAddress WiFiUDP::remoteIP()' member function declared in class 'WiFiUDP'
 IPAddress  WiFiUDP::remoteIP()
                              ^
exit status 1
Error compiling for board Arduino Nano 33 BLE.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I’ve run into the same errors attempting to build several other WiFiNINA examples. Is the WiFiNINA library incompatible with the new Nano 33 BLE Sense boards?

The WiFiNINA library is for boards that have a u-blox NINA-W102 WiFi module attached. The Nano 33 BLE board does not have a NINA-W102 module so you can't use it with the WiFiNINA library. This board does not have WiFi functionality, only BLE provided by the NINA-B306 module.

If you want a Nano board with built-in WiFi, I recommend the Nano 33 IoT:
https://store.arduino.cc/nano-33-iot

Thanks for pointing that out. My mistake.

pert:
The WiFiNINA library is for boards that have a u-blox NINA-W102 WiFi module attached. The Nano 33 BLE board does not have a NINA-W102 module so you can’t use it with the WiFiNINA library. This board does not have WiFi functionality, only BLE provided by the NINA-B306 module.

If you want a Nano board with built-in WiFi, I recommend the Nano 33 IoT:
https://store.arduino.cc/nano-33-iot

I have been researching the Nano 33 BLE Sense for more than a week, have just ordered mine and this is the first time I have heard that it does not support Wifi. I think I just assumed that a modern board like this would have Wifi. Obviously my mistake but I am still a bit surprised. I need both Wifi and BLE for my projects. Purchasing the Nano 33 IOT will also not serve this purpose as it does not have BLE. I assume I could connect a Wifi module of some sort. Does anyone have any suggestions or opinions of easy to connect Arduino Wifi boards that would work with the Nano 33 BLE?

Personally I think this should be mentioned in any Arduino advertising as I can’t be the only person assuming the Nano 33 BLE Sense comes with Wifi.

I need both Wifi and BLE for my projects. Purchasing the Nano 33 IOT will also not serve this purpose as it does not have BLE.

The Arduino Nano 33 IoT has both, WiFi and Bluetooth LE support. Tried both myself. Works fine. :slight_smile:

Personally I think this should be mentioned in any Arduino advertising as I can't be the only person assuming the Nano 33 BLE Sense comes with Wifi.

The name does not imply WiFi support. WiFi is not a question of a modern board. It is actually a bad choice for many applications, because it needs a lot of power. The bandwidth provided by WiFi over Bluetooth has its price. A BLE solution could work on a coin cell battery for many months or more than a year.

Many believe there is going to be a huge market for sensors. Nobody wants to run around the house every week and change batteries. So, even though everyone has a WiFi router nowadays, it will not work for sensors.

Do not worry about your Arduino Nano 33 Sense, you can use it to connect to the Arduino Nano 33 IoT. You could create a Bluetooth WiFi gateway. Get the best of both world. Use BLE for sensors and WiFi to connect to the world. :slight_smile:

Klaus_K:
The Arduino Nano 33 IoT has both, WiFi and Bluetooth LE support. Tried both myself. Works fine. :slight_smile:

Thanks Klaus. I just found this page 11 Myths About Bluetooth 5 | Electronic Design which explains the difference between the Nano 33 BLE 5.0 and the Nano 33 IOT with bluetooth 4.2.

It looks like they will be compatible, just the BLE 5.0 will be needed to run the long range and faster speeds. Thanks for the post. I should be able to make what I want using both these boards together.