Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blynk.begin(AUTH) crash with WT32-ETH01 boards #596

Open
olignyf opened this issue Feb 8, 2024 · 0 comments
Open

Blynk.begin(AUTH) crash with WT32-ETH01 boards #596

olignyf opened this issue Feb 8, 2024 · 0 comments

Comments

@olignyf
Copy link

olignyf commented Feb 8, 2024

Blynk library version: ?? How do we find ??
IDE: Arduino
IDE version: 2.3.0
Board type: WT32-ETH01 v1.4
Additional modules: N/A

Scenario, steps to reproduce

Connect to Blynk using Ethernet on WT32-ETH01 v1.4

Expected Result

Not crashing

Actual Result

Crashing after Blynk.begin(AUTH)

Going to Blynk begin
[2683] Getting IP...
8��BX݌�t(Uզոlƚ�mթ�

Full code

#define BLYNK_PRINT Serial

#define BLYNK_TEMPLATE_ID "REPLACE"
#define BLYNK_TEMPLATE_NAME "Weather Station WT32 ESP01"
#define BLYNK_AUTH_TOKEN "REPLACE"

#include <ETH.h>

#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>

#include "Arduino.h"
#include <Wire.h>

char auth[] = BLYNK_AUTH_TOKEN; // replace this with your auth token
char ssid[] = ""; // replace this with your wifi name (SSID)
char pass[] = ""; // replace this with your wifi password

BlynkTimer timer;

static bool eth_connected = false; 
void WiFiEvent(WiFiEvent_t event)
{
      Serial.println("Wifi Event");
  switch (event) {
    case ARDUINO_EVENT_ETH_START:
      Serial.println("ETH Started");
      //set eth hostname here
      ETH.setHostname("esp32-ethernet");
      break;
    case ARDUINO_EVENT_ETH_CONNECTED:
      Serial.println("ETH Connected");
      break;
    case ARDUINO_EVENT_ETH_GOT_IP:
      Serial.print("ETH MAC: ");
      Serial.print(ETH.macAddress());
      Serial.print(", IPv4: ");
      Serial.print(ETH.localIP());
      if (ETH.fullDuplex()) {
        Serial.print(", FULL_DUPLEX");
      }
      Serial.print(", ");
      Serial.print(ETH.linkSpeed());
      Serial.println("Mbps");
      eth_connected = true;
      break;
    case ARDUINO_EVENT_ETH_DISCONNECTED:
      Serial.println("ETH Disconnected");
      eth_connected = false;
      break;
    case ARDUINO_EVENT_ETH_STOP:
      Serial.println("ETH Stopped");
      eth_connected = false;
      break;
    default:
      break;
  }
}

void sendSensor() // function to read sensor values and send them to Blynk
{
    // ...
}

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

  WiFi.onEvent(WiFiEvent);
  ETH.begin();
  
  Serial.println("Going to Blynk begin");
  Blynk.begin(auth);
  Serial.println("Blynk ready");

  timer.setInterval(15000L, sendSensor); // sendSensor function will run every 1000 milliseconds
}

void loop()
{
  if (eth_connected)
  {
     Blynk.run();
  }
  timer.run();
}

It just crash in loop
WT32-ETH01 Blynk crash in loop

Wifi Event
ETH Started
Wifi Event
ETH Connected
Wifi Event
ETH MAC: B0:A7:32:07:0E:07, IPv4: 192.168.50.34, FULL_DUPLEX, 100Mbps
Going to Blynk begin
[1683] Getting IP...
�
G�oo��6ѩV���u�ա��

Let me know what else I can try and if WT32-ETH01 works on your side. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant