Cant connect arduino uno wifi rev 2(Mega 4809) to Blynk

People could you tell me if anybody alreday solve this issue on UNO WIFI REV 2, where just compile on BLYNK version 6.01, but did not work with blynk IOT, becasue said Invalid auth token, and when we use last version of blynk DID NOT COMPILE :frowning: :frowning:

this is very fraustration, becasue i have a lot of project associated to UNO WIFO REV 2

anybody can help please?

thanks a lot for any help.

I highly recommend you to get a new board.
https://docs.blynk.io/en/blynk.edgent/supported-boards

The 0.6.1 library will always try to connect to the Legacy Blynk servers, unless you specifically tell it not to. This means that when it tries to pass the Blynk IoT auth token to the Legacy server it wonā€™t recognise the token.

I donā€™t think that trying to force the 0.6.1 library to connect to the new IoT cloud servers is the correct solution.

Without knowing more about your particular compiler error messages, along with which version of the WiFiNINA library you have installed, and how exactly you installed that library, then itā€™s very difficult to comment in a constructive way.

Pete.

Pete

always present :slight_smile: thanks a lot for your answer

WIFiNINA Library i am use 1.4.8. last update

errors after compile here

Arduino: 1.8.16 (Windows Store 1.8.51.0) (Windows 10), Placa:ā€œArduino Uno WiFi Rev2, ATMEGA328ā€

In file included from C:\Users\EliteBook 8560\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkApi.h:36:0,

             from C:\Users\EliteBook 8560\Documents\Arduino\libraries\Blynk\src/Blynk.h:14,

             from C:\Users\EliteBook 8560\OneDrive\Documentos\PROJECTOS ARDUINO\TESTE_WIFI_conecttion_BLYNK\TESTE_WIFI_conecttion_BLYNK.ino:27:

C:\Users\EliteBook 8560\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h: In member function ā€˜long long int BlynkParam::iterator::asLongLong() constā€™:

C:\Users\EliteBook 8560\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:48:50: error: ā€˜atollā€™ was not declared in this scope

     long long   asLongLong() const  { return atoll(ptr); }

                                              ^~~~~

C:\Users\EliteBook 8560\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:48:50: note: suggested alternative: ā€˜atolā€™

     long long   asLongLong() const  { return atoll(ptr); }

                                              ^~~~~

                                              atol

C:\Users\EliteBook 8560\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h: In member function ā€˜long long int BlynkParam::asLongLong() constā€™:

C:\Users\EliteBook 8560\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:89:46: error: ā€˜atollā€™ was not declared in this scope

 long long   asLongLong() const  { return atoll(buff); }

                                          ^~~~~

C:\Users\EliteBook 8560\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:89:46: note: suggested alternative: ā€˜atolā€™

 long long   asLongLong() const  { return atoll(buff); }

                                          ^~~~~

                                          atol

exit status 1

Erro ao compilar para a placa Arduino Uno WiFi Rev2.

Youā€™ve not said where this library came from, but itā€™s clearly not been installed via the Arduino IDE as the latest version there is 1.8.13ā€¦

and a release 1.4.8 isnā€™t listedā€¦

image

The Blynk example sketches say this, which is somewhat confusingā€¦

>   Note: This requires WiFiNINA library
>     from http://librarymanager/all#WiFiNINA

but I guess that this actually meansā€¦

Arduino IDE > Library Manager > All > WiFiNINA

as shown in my Library Manager screenshot.

If you already have a different library installed then installing this library may not fix the issue unless you un-install the version thatā€™s already there, as the IDE may continue to use your old library rather than what I assume is the correct library.

Pete.

Pete

Sorry you have reason last wifinina instaled in 1.8.3, what i said was NINA firmware and this is 1.4.8
sorry for the poor picture

:frowning:

Why would you imagine that the WiFi firmware uploaded to the board would make any difference when it comes to compiling your sketch?
Iā€™d asked what WiFiNINA library you had installed and how you installed it, not which WiFi firmware your board was running.

You should tss as ke a look at the Sniping tool in Windows!

Iā€™d suggest that you post the sketch that youā€™re trying to compile (correctly formatted with triple backticks of course). Post the sketch EXACTLY as it appears in your IDE, and just replace your personal credentials with the word ā€œREDACTEDā€.

Iā€™ll then have a go at compiling it myself and see if I can understand what the compilation issues are.

Pete.

Pete

here you have

#define BLYNK_TEMPLATE_ID "TMPLCB8-pbEO"
#define BLYNK_DEVICE_NAME "Quickstart Template"
#define BLYNK_AUTH_TOKEN "OJLlHPNe2rxaIDtzseK4nO1IItNd2Dne"


#define BLYNK_PRINT Serial
#include <WiFiNINA.h>
#include <Blynk.h>
#include <SPI.h>
#include <BlynkSimpleWiFiNINA.h>



char auth[] = BLYNK_AUTH_TOKEN;
char ssid[] = "TP-Link_56E4";
char pass[] = "123456";

void setup()
{
 
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
 
}

void loop()
{
  Blynk.run();

}

Ā“Ā“Ā“

thanks

@vshymanskyy would you take a look at this please?

The supported hardware list says:

  • Arduino UNO WiFi Rev.2 (use the example for MKR WiFi 1010)

but when you install support for the Arduino Uno Rev2 from Boards Managerā€¦

and the latest WiFiNINA library the MKR1010 example from here wonā€™t compileā€¦

There are multiple compiler error messages like this:

In file included from C:\Users\Pete Knight\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkApi.h:36:0,
                 from C:\Users\Pete Knight\Documents\Arduino\libraries\Blynk\src/BlynkApiArduino.h:14,
                 from C:\Users\Pete Knight\Documents\Arduino\libraries\Blynk\src/Adapters/BlynkWiFiCommon.h:24,
                 from C:\Users\Pete Knight\Documents\Arduino\libraries\Blynk\src/BlynkSimpleWiFiNINA.h:22,
                 from C:\Users\PETEKN~1\AppData\Local\Temp\arduino_modified_sketch_216941\sketch_nov07a.ino:32:
C:\Users\Pete Knight\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h: In member function 'long long int BlynkParam::iterator::asLongLong() const':
C:\Users\Pete Knight\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:48:50: error: 'atoll' was not declared in this scope
         long long   asLongLong() const  { return atoll(ptr); }
                                                  ^~~~~
C:\Users\Pete Knight\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkParam.h:48:50: note: suggested alternative: 'atol'
         long long   asLongLong() const  { return atoll(ptr); }
                                                  ^~~~~
                                                  atol

It appears to be some issue with atoll not being defined as a public parameter in a certain combination of #if !defined() tests, but I canā€™t figure-out where the BLYNK_NO_LONGLONG and BLYNK_USE_INTERNAL_ATOLL values are coming from.

Pete.

Pete

i removed Mega arduino AVR boards, a re-installed.
Compile the example for MKR WiFi 1010, and nothing :frowning: said the same errors

why i can not understand is why this compile with blynk version 0.6.01 ? :frowning:

Some significant changes have been made to the BlynkParam.h library file since 0.6.1 and I think that a bug has been introduced which causes this error in certain circumstances.

Pete.

I did some research and found that the Arduino UNO WiFi Rev2 (ATmega4809-8 bit micro controller) uses a different micro controller to the Arduino MKR WiFi 1010 (the Arduino thatā€™s example you are supposed to use for the Arduino UNO WiFi Rev2[it has the SAMD21 micro controller]). This explains why the the sketch I am using compiles for the Arduino MKR WiFi 1010 and not the Arduino UNO WiFi Rev2. I hope that this was helpful.

best regards
Warrick Cleet

Is there already a solution for that issue? I am haveing the problem.

You can use a different board, I recommend esp32 or nodemcu instead.

UPDATE on how to fix this errorā€¦

@Andyy has figured-out how to fix this issue, the solution is to edit the Arduino\libraries\Blynk\src\Blynk\BlynkParam.h file in the library as documented here:

Pete.