Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Olimex ESP32-POE

Hello,

I’ve purchased an Olimex ESP32-POE board.
After digging around on the schematics I realized the clock circuit is different between ESP32-EVB (which works ok with MGOS, apparently) and ESP32-POE. I was not aware of that difference before purchasing.
Can someone please advise on the proper way to activate the PHY interface on the ESP32-POE board?
Schematic: https://github.com/OLIMEX/ESP32-POE/raw/master/HARDWARE/ESP32-PoE-hardware-revision-C/ESP32-PoE_Rev_C_Color.pdf

After cloning an empty JS app and adding the ethernet lib as an Origin, I’m running the following RPC command:
mos config-set eth.enable=true

When the board reboots, I get:
[Jan 13 00:39:28.967] mgos_ethernet_init ETH: MAC 3c:71:bf:0c:8b:27; PHY: LAN87x0 @ 0; IP: DHCP
[Jan 13 00:39:29.968] [0;31mE (2189) emac: Timed out waiting for PHY register 0x2 to have value 0x0007(mask 0xffff). Current value 0x0000[0m
[Jan 13 00:39:30.978] [0;31mE (3199) emac: Timed out waiting for PHY register 0x3 to have value 0xc0f0(mask 0xfff0). Current value 0x0000[0m
[Jan 13 00:39:30.987] [0;31mE (3209) emac: Initialise PHY device Timeout[0m
[Jan 13 00:39:30.992] mgos_deps_init ethernet init failed
[Jan 13 00:39:30.997] mgos_task MGOS init failed: -32
[Jan 13 00:39:31.504] mgos_vfs_umount_all Unmounting filesystems
[Jan 13 00:39:31.508] mgos_system_restart Restarting

This repeats indefinitely.

Comments

  • nliviunliviu Romania

    According to the schematic, the clock pin of the LAN8710A is connected to GPIO17. You have to set eth.clk_mode to 3 in your mos.yml

      - ["eth.clk_mode", 3]
    

    eth.clk_mode

  • edited January 14

    Did that, device stopped it's coredumping loop.

    But now we cannot get the device to connect to the dashboard. DHCP also does not work (nothing on the logs or on the DHCP server).
    If we set an static IP, several errors regarding DNS resolution arise.
    But even with the static IP, the device cannot be pinged and there is no arp entries on the router, indicating that the interface itself is not working.

    Something else should be done for activating the Ethernet interface?

    Here is a log when we had no IP configuration (relying on DHCP). The log stops at the last entry:

    [Jan 13 10:05:43.370] mgos_ethernet_init   ETH: MAC 3c:71:bf:0c:8b:27; PHY: LAN87x0 @ 0; IP: DHCP
    [Jan 13 10:05:43.390] [0;32mI (1222) emac: emac reset done[0m
    [Jan 13 10:05:43.396] mgos_wifi_setup      WiFi mode: AP
    [Jan 13 10:05:43.400] esp32_wifi_set_mode  WiFi mode: AP
    [Jan 13 10:05:43.405] I (1232) wifi: wifi driver task: 3ffd9398, prio:23, stack:3584, core=0
    [Jan 13 10:05:43.411] I (1242) wifi: wifi firmware version: e6431f2
    [Jan 13 10:05:43.416] I (1242) wifi: config NVS flash: enabled
    [Jan 13 10:05:43.419] I (1242) wifi: config nano formating: disabled
    [Jan 13 10:05:43.430] I (1262) wifi: Init dynamic tx buffer num: 32
    [Jan 13 10:05:43.436] I (1262) wifi: Init data frame dynamic rx buffer num: 64
    [Jan 13 10:05:43.441] I (1262) wifi: Init management frame dynamic rx buffer num: 64
    [Jan 13 10:05:43.447] I (1272) wifi: Init static rx buffer size: 1600
    [Jan 13 10:05:43.450] I (1282) wifi: Init static rx buffer num: 10
    [Jan 13 10:05:43.453] I (1282) wifi: Init dynamic rx buffer num: 0
    [Jan 13 10:05:43.465] I (1292) wifi: mode : softAP (3c:71:bf:0c:8b:25)
    [Jan 13 10:05:43.469] I (1292) wifi: Init max length of beacon: 752/752
    [Jan 13 10:05:43.475] I (1302) wifi: Init max length of beacon: 752/752
    [Jan 13 10:05:43.478] I (1302) wifi: Set ps type: 0
    [Jan 13 10:05:43.482] 
    [Jan 13 10:05:43.482] mgos_wifi_dev_ap_set WiFi AP: SSID Mongoose_0C8B24, channel 6
    [Jan 13 10:05:44.338] mgos_wifi_dev_ap_set WiFi AP IP: 192.168.4.1/255.255.255.0 gw 192.168.4.1, DHCP range 192.168.4.2 - 192.168.4.100
    [Jan 13 10:05:44.348] mgos_wifi_dev_ap_set WiFi AP: SSID Mongoose_0C8B24, channel 6
    [Jan 13 10:05:44.358] mgos_http_server_ini HTTP server started on [80]
    [Jan 13 10:05:44.366] mgos_dash_init       Dash init ok, server: wss://dash.mongoose-os.com/api/v2/rpc)
    [Jan 13 10:05:44.373] mgos_provision_btn_i Factory reset button: pin 0, pull up, hold_ms 0 (hold on boot)
    [Jan 13 10:05:44.392] mgos_provision_state Max state: 0
    [Jan 13 10:05:44.399] mg_rpc_channel_mqtt  0x3ffe987c esp32_0C8B24/rpc
    [Jan 13 10:05:44.405] mg_rpc_channel_uart  0x3ffea080 UART0
    [Jan 13 10:05:44.413] mgos_init            Init done, RAM: 233920 total, 88444 free, 88444 min free
    [Jan 13 10:05:44.801] mongoose_poll        New heap free LWM: 55584
    [Jan 13 10:05:44.811] mgos_lic_init        UID: 0f55454eef7457ef, license: none
    [Jan 13 10:05:44.818] esp32_bt_gatts_ev_mg Starting BT service 5f6d4f53-5f43-4647-5f53-56435f49445f
    [Jan 13 10:05:44.825] esp32_bt_gatts_ev_mg Starting BT service 5f6d4f53-5f44-4247-5f53-56435f49445f
    [Jan 13 10:05:44.836] esp32_bt_gatts_ev_mg Starting BT service 5f6d4f53-5f52-5043-5f53-56435f49445f
    [Jan 13 10:05:45.394] mgos_net_on_change_c ETH: connected
    
  • nliviunliviu Romania

    I suppose you have

      - ["eth.phy_pwr_gpio", 12]
    

    Do you have a DHCP server in your LAN?
    Did you test the device with the manufacturer provided demos?

Sign In or Register to comment.