Ethernet2 Problem with Blynk IoT

Hello,
Sorry to intrude on the topic, but I have a similar problem. I’ve been using an Industruino Proto board for 3 years with blynk legacy without a problem. When I already had to switch to blynk iot, the device doesn’t want to connect to the blink server. I tried every option I could think of, but without success. I used the sketch from the Arduino Ethernet2 example but still no luck. The message in serial monitor is: “[61638] DHCP Failed!” I would be very grateful if you could help me! And I apologize for the bad English language!

Please don’t hijack other people’s posts.

I’d suggest that you post your full sketch and full serial output, along with full details of your hardware.

Pete.

I apologize once again for the intervention, but I am still a beginner in your forum.

How do I upload the sketch?

#include <Blynk.h>
#include "Arduino.h"
#include <Indio.h>
#include <UC1701.h>      // Industruino LCD

#include <SPI.h>
#include <Ethernet2.h>
#include <BlynkSimpleEthernet2.h>

#define BLYNK_PRINT SerialUSB
#define BLYNK_TEMPLATE_ID "TMPLAoIqrSJ3"
#define BLYNK_DEVICE_NAME "Valeri"
#define BLYNK_AUTH_TOKEN "fpHC1Z9GhUmhT-cTwF0tdLnz2gCvVQ4r"

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = BLYNK_AUTH_TOKEN;


void setup()
{
  // Debug console
  SerialUSB.begin(9600);

  Blynk.connect(auth);
  // You can also specify server:
  //Blynk.begin(auth, "blynk-cloud.com", 80);
  //Blynk.begin(auth, IPAddress(192,168,1,100), 8080);
  // For more options, see Boards_Ethernet/Arduino_Ethernet_Manual example
}

void loop()
{
  Blynk.run();
}

Успях!!!
I succeeded!!!

You copy the text, and paste it into a forum post.
It needs to have triple backticks at the beginning and end of the sketch so that it displays correctly.
Triple backticks look like this:
```

You do the same thing if you are posting serial output or compiler error messages.

There is also little point in posting what appears to be a screenshot of an information page about your device, as the information is unreadable. A url to the page would be the sensible approach don’t you think?.

Pete.

www.industruino.com

You seem to have ignored the piece of information underlined in yellow…

Pete.

No, I haven’t ignored it, but it still doesn’t work!

How do you mean you haven’t ignored it?
Those aren’t the first three lines of your sketch.

Pete.

At first ( after reading the information on how to put an ethernet device into BLYNK IOT ) it was on the first three lines, but the error message is exactly the same!

If you’re saying that you’ve edited your sketch so that these are now the first three lines of code then post your edited sketch, along with the serial output that appears when you boot the device and it attempts to connect to Blynk.

Pete.

#define BLYNK_TEMPLATE_ID "TMPLAoIqrSJ3"
#define BLYNK_DEVICE_NAME "Valeri"
#define BLYNK_AUTH_TOKEN "fpHC1Z9GhUmhT-cTwF0tdLnz2gCvVQ4r"


/* Fill-in your Template ID (only if using Blynk.Cloud) */
//#define BLYNK_TEMPLATE_ID   "YourTemplateID"
#include <Blynk.h>
#include "Arduino.h"
#include <Indio.h>
#include <UC1701.h>      // Industruino LCD

#include <SPI.h>
#include <Ethernet2.h>
#include <BlynkSimpleEthernet2.h>

#define BLYNK_PRINT SerialUSB
char auth[] = BLYNK_AUTH_TOKEN;


void setup()
{
  // Debug console
  SerialUSB.begin(9600);

  Blynk.begin(auth);
  // You can also specify server:
  //Blynk.begin(auth, "blynk-cloud.com", 80);
  //Blynk.begin(auth, IPAddress(192,168,1,100), 8080);
}

void loop()
{
  Blynk.run();
}

Serial monitor is empty!

You need to figure-out why that is. The SerialUSB ports is presumably something that’s peculiar to your specific device, and not something that I’m familiar with.

Pete.

try change to #define BLYNK_PRINT Serial

Hello,
Thank you
SerialUSB is Ok,
but when the sketch reaches line: Blynk.begin(…) and hangs. At first I was giving an error “[61638] DHCP Failed!”, but then that stopped too!

void setup()
{
  // Debug console
  SerialUSB.begin(9600);
  delay(10000);
  SerialUSB.println("marker0");         This line works normally.
  Blynk.begin(auth);                    At this line sketch stops working.
  delay(2000);
  SerialUSB.println("marker1");

try it with the Ethernet library. Ethernet2 is obsolete.
and first try the WebClient example of the Ethernet library