February 22, 2024, 08:42:27 AM

Recent posts

#71
ESP32 / Re: ESP32-POE-ISO ESPHome: wro...
Last post by daabutts - February 06, 2024, 06:09:32 PM
I am chasing the same problem.  Here is the code:

/*
    This sketch shows the Ethernet event usage
*/

#define ETH_PHY_TYPE        ETH_PHY_LAN8720
#define ETH_PHY_ADDR        0
#define ETH_PHY_MDC        23
#define ETH_PHY_MDIO        18

#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
#define ETH_PHY_POWER 12

#include <ETH.h>

static bool eth_connected = false;

void WiFiEvent(WiFiEvent_t 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 testClient(const char * host, uint16_t port)
{
  Serial.print("\nconnecting to ");
  Serial.println(host);

  WiFiClient client;
  if (!client.connect(host, port)) {
    Serial.println("connection failed");
    return;
  }
  client.printf("GET / HTTP/1.1\r\nHost: %s\r\n\r\n", host);
  while (client.connected() && !client.available());
  while (client.available()) {
    Serial.write(client.read());
  }

  Serial.println("closing connection\n");
  client.stop();
}

void setup()
{
  Serial.begin(115200);
  WiFi.onEvent(WiFiEvent);
  ETH.begin();
}


void loop()
{
  Serial.print("ETH MAC: ");
  Serial.print(ETH.macAddress());
  Serial.print(", IPv4: ");
  Serial.println(ETH.localIP());
  delay(1000);
}

Here is the output:
...
entry 0x400805e4
E (122) lan87xx: lan87xx_pwrctl(409): power up timeout
E (122) lan87xx: lan87xx_init(491): power control failed
E (122) esp_eth: esp_eth_driver_install(215): init phy failed
ETH MAC: E (137) esp_eth: esp_eth_ioctl(348): ethernet driver handle can't be null
00:00:00:00:00:00, IPv4: 0.0.0.0

I have two ESP32-POE-ISO Rev L boards purchased from Mouser.com two weeks ago.  They both produce the same output. Using Arduino IDE V 2.2.1, CLI Version 0.34.0. 

What other information can I give you that would help you see the difference between my system and yours where Rev L works fine?

Thanks!
Devin




#72
A20 / Re: A20-SOM-EVB gigabit ethern...
Last post by gilmour - February 06, 2024, 04:53:21 PM
Hello, thank you very much for your reply.
My question has mostly to do with the following boot log where you can see
at the bottom that "Link is Up - 100Mbps/Full".

Is there something I should take care? Specific kernel version or uboot version?

[    1.370449] sun7i-dwmac 1c50000.ethernet: IRQ eth_wake_irq not found
[    1.376856] sun7i-dwmac 1c50000.ethernet: IRQ eth_lpi not found
[    1.382943] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
[    1.388726] sun7i-dwmac 1c50000.ethernet: no reset control found
[    1.394785] sun7i-dwmac 1c50000.ethernet: no regulator found
[    1.401000] sun7i-dwmac 1c50000.ethernet: Version ID not available
[    1.407274] sun7i-dwmac 1c50000.ethernet:    DWMAC1000
[    1.412299] sun7i-dwmac 1c50000.ethernet: No HW DMA feature register supported
[    1.419541] sun7i-dwmac 1c50000.ethernet: TX Checksum insertion supported
[    1.426350] sun7i-dwmac 1c50000.ethernet: Normal descriptors
[    1.432024] sun7i-dwmac 1c50000.ethernet: Ring mode enabled
[  11.597572] sun7i-dwmac 1c50000.ethernet end0: renamed from eth0
[  20.094355] sun7i-dwmac 1c50000.ethernet end0: PHY [stmmac-0:01] driver [Generic PHY] (irq=POLL)
[  20.116104] sun7i-dwmac 1c50000.ethernet end0: No Safety Features support found
[  20.123683] sun7i-dwmac 1c50000.ethernet end0: RX IPC Checksum Offload disabled
[  20.131116] sun7i-dwmac 1c50000.ethernet end0: No MAC Management Counters available
[  20.138892] sun7i-dwmac 1c50000.ethernet end0: PTP not supported by HW
[  20.194347] sun7i-dwmac 1c50000.ethernet end0: configuring for phy/rgmii link mode
[  33.515188] sun7i-dwmac 1c50000.ethernet end0: Link is Up - 100Mbps/Full - flow control rx/tx
#73
TERES DIY Laptop / Re: anyone has put other Linux...
Last post by kreyren - February 06, 2024, 11:56:12 AM
#74
TERES DIY Laptop / Re: Development of Teres-2
Last post by kreyren - February 06, 2024, 11:53:36 AM
For context i am working on a new PCB basically since i got teres, but when brainstorming the idea it showed up more issue that needs to be handled so i am now working on addressing these and will then publish the proposal.
#75
TERES DIY Laptop / Re: Keyboard combination Super...
Last post by kreyren - February 06, 2024, 11:51:52 AM
I don't seem to have this issue on my teres and i suspect that being a gentoo-related issue so proposing to first focus on making teres work on gentoo smoothly and reliably and then investigate the cause optionally try the armbian image to see if you can reproduce it there.
#76
TERES DIY Laptop / Re: Troubleshooting: Blinking ...
Last post by kreyren - February 06, 2024, 11:49:55 AM
If more people have this issue then refer to https://github.com/OLIMEX/DIY-LAPTOP/issues/67 as it's likely caused by the wear of the power connector, the solution is to get a new charger or replace the charging port which can be done by any local repair shop.  If they don't know what to do then let me know i try to make a documentation to make that easier.
#77
TERES DIY Laptop / REQUEST: Set up FWUPD
Last post by kreyren - February 06, 2024, 11:46:45 AM
FWUPD is a service for vendors to supply firmware for linux, i am requesting that OLIMEX makes one for teres to make it's firmware management easier and make it independent from the invidual linux distributions for users to just be able to use generic UEFI installer for aarch64-linux and get a functional and reliable system.

Requested firmware:
* U-Boot (with crust)
* Keyboard
* Touchpad
#78
A20 / Re: A20-SOM-EVB gigabit ethern...
Last post by LubOlimex - February 06, 2024, 10:36:28 AM
The expected throughput of A20 boards with GbE is around 500Mbit/s. The exact numbers vary depending on the hardware setup. Most of the boards I've tested myself go up to 700Mbit/s when connected to a personal computer.

I use the Olimage Linux in my tests:

https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/OLIMAGE/Olimage-guide.pdf

Notice that we test each board with a network throughput test after manufacturing, each board is required to have at least 300Mbit/s throughput. If less is detected - the board gets discarded or repaired.
#79
ESP32 / Re: ESP32-POE-ISO ESPHome: wro...
Last post by LubOlimex - February 06, 2024, 09:35:39 AM
Maybe the Ethernet got damaged somehow, maybe it a hardware problem, my advice is to either get another ESP32-POE-ISO board and compare behavior or drop me an e-mail support@olimex.com to start the warranty and returns procedure, our warranty and returns policy is detailed here:

https://www.olimex.com/wiki/GTC#Warranty
#80
ESP32 / Re: ESP32-POE-ISO ESPHome: wro...
Last post by arcimus - February 06, 2024, 12:08:32 AM
Thanks for your reply.  I just tried again...

In Arduino IDE, I'm Running esp32 by Espressif 2.0.14 and Arduino ESP32 Boards by Arduino 2.0.13.

I found the current master version of the example here: https://github.com/espressif/arduino-esp32/blob/master/libraries/Ethernet/examples/ETH_LAN8720/ETH_LAN8720.ino
The one I'm using does not look like that.  I downloaded the current release v2.0.14 zip for espressif/arduino-esp32 and it also does not look like that.

Compiling the master version with the #define lines results in compilation errors.

https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html has a development release link.  I'll put that in Arduino IDE tomorrow and give it a shot.

Here's the v2.0.14 version
/*
    This sketch shows the Ethernet event usage

*/

#include <ETH.h>

static bool eth_connected = false;

void WiFiEvent(WiFiEvent_t 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 testClient(const char * host, uint16_t port)
{
  Serial.print("\nconnecting to ");
  Serial.println(host);

  WiFiClient client;
  if (!client.connect(host, port)) {
    Serial.println("connection failed");
    return;
  }
  client.printf("GET / HTTP/1.1\r\nHost: %s\r\n\r\n", host);
  while (client.connected() && !client.available());
  while (client.available()) {
    Serial.write(client.read());
  }

  Serial.println("closing connection\n");
  client.stop();
}

void setup()
{
  Serial.begin(115200);
  WiFi.onEvent(WiFiEvent);
  ETH.begin();
}


void loop()
{
  if (eth_connected) {
    testClient("google.com", 80);
  }
  delay(10000);
}

Here's the current master branch version:
/*
    This sketch shows the Ethernet event usage

*/

// Important to be defined BEFORE including ETH.h for ETH.begin() to work.
// Example RMII LAN8720 (Olimex, etc.)
#define ETH_PHY_TYPE        ETH_PHY_LAN8720
#define ETH_PHY_ADDR         0
#define ETH_PHY_MDC         23
#define ETH_PHY_MDIO        18
#define ETH_PHY_POWER       -1
#define ETH_CLK_MODE        ETH_CLOCK_GPIO0_IN

#include <ETH.h>

static bool eth_connected = false;

// WARNING: WiFiEvent is called from a separate FreeRTOS task (thread)!
void WiFiEvent(WiFiEvent_t event)
{
  switch (event) {
    case ARDUINO_EVENT_ETH_START:
      Serial.println("ETH Started");
      // The hostname must be set after the interface is started, but needs
      // to be set before DHCP, so set it from the event handler thread.
      ETH.setHostname("esp32-ethernet");
      break;
    case ARDUINO_EVENT_ETH_CONNECTED:
      Serial.println("ETH Connected");
      break;
    case ARDUINO_EVENT_ETH_GOT_IP:
      Serial.println("ETH Got IP");
      ETH.printInfo(Serial);
      eth_connected = true;
      break;
    case ARDUINO_EVENT_ETH_LOST_IP:
      Serial.println("ETH Lost IP");
      eth_connected = false;
      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 testClient(const char * host, uint16_t port)
{
  Serial.print("\nconnecting to ");
  Serial.println(host);

  WiFiClient client;
  if (!client.connect(host, port)) {
    Serial.println("connection failed");
    return;
  }
  client.printf("GET / HTTP/1.1\r\nHost: %s\r\n\r\n", host);
  while (client.connected() && !client.available());
  while (client.available()) {
    Serial.write(client.read());
  }

  Serial.println("closing connection\n");
  client.stop();
}

void setup()
{
  Serial.begin(115200);
  WiFi.onEvent(WiFiEvent);  // Will call WiFiEvent() from another thread.
  ETH.begin();
}

void loop()
{
  if (eth_connected) {
    testClient("google.com", 80);
  }
  delay(10000);
}