Go Down

Topic: WiFiWebServer failing to compile (Read 721 times) previous topic - next topic

straygrey

When attempting to compile the example downloaded from Arduino called WiFiWebServer on my Linux Debian laptop I get the following error messages.

Code: [Select]

Arduino: 1.8.13 (Linux), Board: "Arduino Uno WiFi"
/home/alf/Arduino/libraries/WiFiNINA/src/utility/spi_drv.cpp: In static member function 'static void SpiDrv::begin()':
/home/alf/Arduino/libraries/WiFiNINA/src/utility/spi_drv.cpp:87:24: error: 'PINS_COUNT' was not declared in this scope
       if (SLAVERESET > PINS_COUNT) {
                        ^~~~~~~~~~
/home/alf/Arduino/libraries/WiFiNINA/src/utility/spi_drv.cpp:87:24: note: suggested alternative: 'PING_CMD'
       if (SLAVERESET > PINS_COUNT) {
                        ^~~~~~~~~~
                        PING_CMD
/home/alf/Arduino/libraries/WiFiNINA/src/utility/spi_drv.cpp:97:15: error: 'NINA_GPIO0' was not declared in this scope
       pinMode(NINA_GPIO0, OUTPUT);
               ^~~~~~~~~~
/home/alf/Arduino/libraries/WiFiNINA/src/utility/spi_drv.cpp: In static member function 'static int SpiDrv::available()':
/home/alf/Arduino/libraries/WiFiNINA/src/utility/spi_drv.cpp:581:25: error: 'NINA_GPIO0' was not declared in this scope
     return (digitalRead(NINA_GPIO0) != LOW);
                         ^~~~~~~~~~
exit status 1
Error compiling for board Arduino Uno WiFi.


Please advise what I have done incorrectly.

Juraj

it is not the right Uno WiFi.
install the 'megaavr' board package in Boards Manager and the select the right Uno WiFi.

https://www.arduino.cc/en/Guide/ArduinoUnoWiFiRev2

straygrey

Thank you but what have I misunderstood to not have found that myself.

straygrey

and now I get
Code: [Select]

Arduino: 1.8.13 (Linux), Board: "Arduino Uno WiFi Rev2, ATMEGA328"

Sketch uses 13863 bytes (28%) of program storage space. Maximum is 48640 bytes.
Global variables use 411 bytes (6%) of dynamic memory, leaving 5733 bytes for local variables. Maximum is 6144 bytes.
avrdude: usbdev_open(): cannot open device: Permission denied
avrdude: jtag3_open_common(): Did not find any device matching VID 0x03eb and PID list: 0x2145
An error occurred while uploading the sketch

This despite
Code: [Select]

alf@LenovoE50:~$ ls -l /dev/ttyACM0
crw-rw-rw- 1 root dialout 166, 0 Nov 28 14:05 /dev/ttyACM0
alf@LenovoE50:~$ groups
alf tty dialout cdrom floppy sudo audio dip video plugdev netdev bluetooth lpadmin scanner
alf@LenovoE50:~$ groups dialout
groups: 'dialout': no such user
alf@LenovoE50:~$ adduser alf dialout
bash: adduser: command not found
alf@LenovoE50:~$ sudo adduser alf dialout 
The user `alf' is already a member of `dialout'.

pert

Are you using the Arduino Uno WiFi Rev2 board?

This exact board:
https://store.arduino.cc/arduino-uno-wifi-rev2



straygrey

It looks exactly like that image you sent.

pert

Try running this command:
Code: [Select]
sudo ~/.arduino15/packages/arduino/hardware/megaavr/1.8.6/scripts/create_dfu_udev_rule

straygrey

pert that command you suggested did not seem to have achieved anything except now when I attempt upload, even after a reboot, the device is reported as busy.

straygrey

Arduino: 1.8.13 (Linux), Board: "Arduino Uno WiFi Rev2, ATMEGA328"

Sketch uses 13863 bytes (28%) of program storage space. Maximum is 48640 bytes.
Global variables use 411 bytes (6%) of dynamic memory, leaving 5733 bytes for local variables. Maximum is 6144 bytes.
avrdude: usbdev_open(): WARNING: failed to set configuration 1: Device or resource busy
avrdude: jtag3_edbg_prepare(): unexpected response 0x81, 0x23
avrdude: jtag3_edbg_prepare(): unexpected response 0x02, 0x01
avrdude: jtag3_edbg_send(): Unexpected response 0x01, 0x00
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
An error occurred while uploading the sketch

Go Up