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

Feature Request: Documentation: WT32-ETH01 support LAN Port in Settings #886

Open
5 of 16 tasks
Matten-Matten opened this issue Apr 15, 2023 · 107 comments
Open
5 of 16 tasks
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Matten-Matten
Copy link

Matten-Matten commented Apr 15, 2023

Hardware

  • ESP8266
  • ESP32
  • Raspberry Pi

Modelname: WT32-ETH01
Retailer URL: WT32-ETH01

nRF24L01+ Module

  • nRF24L01+ you verified this is a Plus model capable of the required 256kBit/s mode
  • square dot indicates original Nordic Semicon chip
  • round dot indicates copy-cat / counterfeit SI labs chip

Antenna:

  • circuit board
  • external antenna (SMA)

Power Stabilization:

  • 100uF Electrolytic Capacitor
    connected between +3.3V and GND (Pin 1 & 2) of the NRF Module
  • Voltage stabilizing motherboard

Version / Git SHA:

Version: 0.6.0
Github Hash: _______

Build & Flash Method:

  • AhoyDTU Webinstaller
  • VSCode - Platform IO
  • Arduino
  • ESP Tools

Debugging:

  • USB Serial Log (attached)
  • Setup settings (use our templates ... to be added)

Hallo, ist die Implementierung einer Konfiguration eines LAN Port möglich?
ähnlich wie bei OpenDTU

gruß
matten matten

EDIT PINOUT
wt32-eth01 Pinout

@Matten-Matten
Copy link
Author

In openDTU sieht es in der WebUi wie folgt aus.

OpenDTU-ETHernet

@VitBeck
Copy link

VitBeck commented Apr 24, 2023

Kann man die fehlende Reaktion auf diese Anfrage so interpretieren, dass es sonst kein Interesse von anderen Usern besteht und diese Anfrage nicht umgesetzt wird?

@geronet1
Copy link
Contributor

Ich brauch das auch demnächst, könnte auch den Code beisteuern da bei meiner Anlage kein WLan möglich ist.
Das dauert aber

@peff74
Copy link

peff74 commented Apr 24, 2023

Also ich hätte auch Interesse, bringe mich gerade im PlatformIO um...
Bei uns is Nachts WLAN aus^^

@roobbb
Copy link

roobbb commented Apr 24, 2023

I am also interested in. Alternatively connecting to a wiz5500/ wiz5100 could even do the job and I could keep the esp8266 based Wemos D1.

@lumapu
Copy link
Owner

lumapu commented Apr 25, 2023

ist schon in der Pipeline, habe leider aktuell aber nicht allzu viel Zeit. Ich hoffe es sehr bald veröffentlichen zu können

@MadMax-git
Copy link

Would be great!
Actually I'm working with WIFI for testing but in the planned installation LAN would be preferred :-)

@lumapu
Copy link
Owner

lumapu commented May 9, 2023

hier die erste Version, ist auch im Branch eth als source verfügbar.

Edit: diese Version ist fehlerhaft, repariert in nächstem Beitrag
230509_ahoy_0.6.12_eth.zip

@lumapu
Copy link
Owner

lumapu commented May 9, 2023

Update, die erste Version war fehlerhaft, leider falsch benannt, sollte 06.12 heißen

230509_ahoy_0.5.12_eth.zip

@MadMax-git
Copy link

WT32-ETH01 ist bestellt :-)

@Matten-Matten
Copy link
Author

Matten-Matten commented May 9, 2023

@lumapu,
danke für die erste vorab version, ich hab die bin via webinterface geupdatet, leider verbindet der esp sich nicht mit dem Netzwerk. weder WIFI noch Ethernet.

Ich muss mal schauen das ich den via serial neu flashe.

Edit:
Via serial die stable Version auf den ESP32 ETH geflasht und er ist wieder erreichbar.

Ist die 0.6.12_ETH auch für den ESP32 ?

Gruß matten matten

@MadMax-git
Copy link

MadMax-git commented May 12, 2023

So, der WT32-ETH01 ist gekommen.
Leider bei mir auch keine Verbindung: weder WLAN noch ETH.
Hab die (falsche) 0.5.12 und die (richtige) 0.6.12 probiert.

Mit der stable und der Dev 0.6.12 geht zumindest eine Verbindung mittels AP AHOY-DTU, allerdings schaffe ich es nicht mit meinem Netz zu verbinden (in dem Fall nicht wichtig, Ziel ist ja LAN aber wollte es mal "fallen lassen").
Es wird zwar gemeldet, dass die Einstellungen gespeichert wurden aber nach dem Neustart (auch schon "hart" probiert), trotzdem keine Verbindung...

Hmm, eben noch mal probiert, weil ich mal die Console (USB) mitlaufen lassen wollte und: jetzt habe ich ihn zumindest mittels WLAN ins Netz bekommen.
Also die 0.6.12_eth
Ich bin verwirrt.

Ich teste dann mal noch mal mit LAN und USB-Console...
...vorher mal noch mit WLAN OHNE USB-Console.

Also: per WLAN geht wohl. Ich musste nach dem Speichern der WIFI-Daten mein Notebook "zwangsweise" mit meinem Netzwerk verbinden, sonst wurde wohl immer mit dem AP AHOY-DTU verbunden und der ESP probiert dann gar nicht mit dem eingestellten WLAN zu verbinden? Wenn ich vor dem (Re)Boot (nach WIFI-Einstellungen) mein WLAN ändere, geht es.

Leider (weiterhin) keine Verbindung mit LAN :-
Auch nach Factory-Reset nicht (weil ich hatte ja WLAN schon konfiguriert, nicht dass das "reinspuckt")...
In der Console erscheint auch nichts was auf LAN (Probleme) hindeutet.

EDIT: ich werde dann mal ein NRF-Modul dranbasteln... Welche Pins sollte ich nehmen? Aktuell würde ich die von OpenDTU (da gibt es eine config-json) nehmen: https://github.com/tbnobody/OpenDTU/blob/master/docs/DeviceProfiles/wt32-eth01.json
EDIT: ok, grad gesehen, ist wie "oben" ;-)
EDIT: per WLAN läuft :-) (jetzt hoffe ich nur, ich hab auch die richtige Version aufgespielt, wobei ich es ja extra noch mal per OTA-Update gemacht habe und schon sehr sicher die 0.6.12_eth genommen habe / weil mich wundert, dass es "plötzlich" [zumindest per WLAN] geht / gibt es eine Möglichkeit das herauszufinden? Weil die Version heißt in der Oberfläche auch "nur" 0.6.12 Dev)

Danke für die Mühe!

Kann ich sonst was tun?

Gruß, Joachim

@lumapu
Copy link
Owner

lumapu commented May 16, 2023

ich habe es selbst noch nicht testen können und plane einen Aufbau mit W5500 an einem ESP32, evtl. gibt es hier Erkenntnisse die dir weiterhelfen

@Gerd-Watzmann
Copy link

Zu der Frage nach dem Interesse: ich hätte es ;-) Da bei mir im Haus alle Infrastruktur-Technik grundsätzlich über LAN/Cat6 läuft, ist mir die WLAN-Geschichte beim ansonsten genialen AhoyDTU ein echter Dorn im Auge. Das Olimex-Board habe ich gerade bekommen, wollte eigentlich OpenDTU drauf flashen - aber jetzt warte ich erst einmal die Entwicklung hier ab. Bin nur Anwender und Bastler, aber kein Entwickler. Insofern profitiere ich von den genialen Codern, die solche Dinge der Allgemeinheit zur Verfügung stellen. An dieser Stelle einen herzlichen Dank dafür ;-)

@roobbb
Copy link

roobbb commented May 18, 2023

Hab soeben erfolgreich getestet. Source eth kompiliert für lolin32 lite. Zusammengesteckt mit einem W5500 gemäß config.h.
Zugriff via Ethernet klappt. Debug vom serial monitor schaut so aus:

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13192
load:0x40080400,len:3028
entry 0x400805e4
I: Initializing FS ..
I:  .. done
[    44][E][vfs_api.cpp:105] open(): /littlefs/settings.json does not exist, no permits for creation
W: failed to load json, using default config
I: Settings valid: false
I: RF24 Amp Pwr: RF24_PA_I: LOW
I: Radio Config:
SPI Frequency		= 1 Mhz
Channel			= 3 (~ 2403 MHz)


Model			= nRF24L01+


RF Data Rate		= 250 KBPS


RF Power Amplifier	= PA_LOW


RF Low Noise Amplifier	= Enabled


CRC Length		= 16 bits


Address Length		= 5 bytes


Static Payload Length	= 32 bytes


Auto Retry Delay	= 1000 microseconds


Auto Retry Attempts	= 15 maximum


Packets lost on
    current channel	= 0


Retry attempts made for
    last transmission	= 0


Multicast		= Disabled


Custom ACK Payload	= Disabled


Dynamic Payloads	= Enabled


Auto Acknowledgment	= Enabled


Primary Mode		= RX


TX address		= 0xe7e7e7e7e7


pipe 0 (closed) bound	= 0xe7e7e7e7e7


pipe 1 ( open ) bound	= 0x0807988601


pipe 2 (closed) bound	= 0xc3


pipe 3 (closed) bound	= 0xc4


pipe 4 (closed) bound	= 0xc5


pipe 5 (closed) bound	= 0xc6


I: mEth setup...I: [ETH]: Register for events...
I: [ETH]: begin...
[ETH]: Got event...

ETH Started
done...
I: (#0) resetPayload
I: (#1) resetPayload
I: (#2) resetPayload
I: (#3) resetPayload
I: (#4) resetPayload
I: (#5) resetPayload
I: (#6) resetPayload
I: (#7) resetPayload
I: (#8) resetPayload
I: (#9) resetPayload
I: (#0) resetPayload
I: (#1) resetPayload
I: (#2) resetPayload
I: (#3) resetPayload
I: (#4) resetPayload
I: (#5) resetPayload
I: (#6) resetPayload
I: (#7) resetPayload
I: (#8) resetPayload
I: (#9) resetPayload
D: regularTickers
E (1219) gpio: gpio_install_isr_service(449): GPIO isr service already installed
[ETH]: Got event...
ETH Connected
[ETH]: Got event...
ETH MAC: FE:ED:DE:AD:BE:EF, IPv4: 192.168.0.110
FULL_DUPLEX, 100Mbps
D: onNetwork
D: regularTickers
D: updateNtpTime
ETH.linkUp()=down
ETH.localIP()=192.168.0.110
Go on? Yes...
D: updateNtpTime: checking udp "connection"...
D: updateNtpTime: About to (re)connect...
D: updateNtpTime: Connected...
D: updateNtpTime: prepare packet...
D: updateNtpTime: send packet...
D: updateNtpTime: about to handle ntp packet...
I: [NTP]: 2023-05-18 18:45:20 UTC

Ntp sync wollte noch nicht klappen. Tiefer habe ich bisher nicht getestet.
Wenn ich den Code richtig verstehe, ist alles auf den Wiz5500 ausgelegt (https://github.com/khoih-prog/AsyncUDP_ESP32_W5500). Das WT32-ETH01-Board funktioniert damit nicht (?).
Vielleicht hilft das weiter 😀

@lumapu
Copy link
Owner

lumapu commented May 19, 2023

habe auch gesehen, dass das WT32 einen anderen LAN Chip verwendet, aber das kann man bestimmt auch integrieren.

@lumapu
Copy link
Owner

lumapu commented May 19, 2023

[ 44][E][vfs_api.cpp:105] open(): /littlefs/settings.json does not exist, no permits for creation
W: failed to load json, using default config
I: Settings valid: false

das ist komisch, ich sehe es bei mir auch. Man kann keine Einstellungen speichern. Was ich noch nicht verstehe wie das mit Ethernet zusammenhängt

@roobbb
Copy link

roobbb commented May 19, 2023

Im Framework vom esp32 kommt die ETH.h mit, welche sich um die LAN-Chips kümmert (per default LAN8720). Aber W5500 ist nicht dabei. Für den Esp8266 dürfte das deshalb generell nicht nützen.
Ist wahrscheinlich einiges an Arbeit nötig, um die möglichen Konstellationen dann zu abstrahieren (Esp32 mit LAN8720, ESP32 mit W5500, Esp8622 mit W5500 etc.).

Wegen Settings hab ich an der settings.h ein paar Kleinigkeiten testweise auskommentiert, aber war anscheinend nix dabei, was die Ursache trifft.

In den Sourcen steckt enorm viel Arbeit drin. Ich steig da leider nur schwer durch. Sorry 😀

@lumapu
Copy link
Owner

lumapu commented May 27, 2023

mal wieder eine neue Version (Änderungen aus dev03 branch gemerged). Um den Settings load failed Fehler zu umgehen habe ich gemerkt, dass man einfach zuerst das Release aufspielen kann, einmal mit dem Wifi verbindet und speichert. Dann per Update das ETH Package drauf und alles funktoniert 😀

230527_ahoy_eth_esp32_0.6.15.bin.zip

@MadMax-git
Copy link

MadMax-git commented May 27, 2023

Eben ausprobiert aber ist wohl nur der w5500 Chip "aktiviert"...
Der ist (wohl) im WT32-ETH01 nicht drin (?)... :-\

In der Console bekomme ich folgende Ausgabe:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:8896 load:0x40080400,len:5828 entry 0x400806ac E (472) esp_core_dump_flash: No core dum���ѥѥ���found! E (472) esp_core_dump_flash: No core dump partition found! I: Initializing FS .. I: .. done I: Settings valid: true I: RF24 Amp Pwr: RF24_PA_I: LOW I: Radio Config: SPI Frequency = 1 Mhz Channel = 2 (~ 2402 MHz) Model = nRF24L01+ RF Data Rate = 2 MBPS RF Power Amplifier = PA_LOW RF Low Noise Amplifier = Enabled CRC Length = 8 bits Address Length = 5 bytes Static Payload Length = 32 bytes Auto Retry Delay = 250 microseconds Auto Retry Attempts = 3 maximum Packets lost on current channel = 0 Retry attempts made for last transmission = 0 Multicast = Disabled Custom ACK Payload = Disabled Dynamic Payloads = Disabled Auto Acknowledgment = Enabled Primary Mode = TX TX address = 0xe7e7e7e7e7 pipe 0 ( open ) bound = 0xe7e7e7e7e7 pipe 1 ( open ) bound = 0xc2c2c2c2c2 pipe 2 (closed) bound = 0xc3 pipe 3 (closed) bound = 0xc4 pipe 4 (closed) bound = 0xc5 pipe 5 (closed) bound = 0xc6 I: mEth setup...I: [ETH]: Register for events... I: [ETH]: begin... E (1200) w5500.mac: w5500_reset(301): Read MR failed E (1201) w5500.mac: emac_w5500_init(827): Reset w5500 failed E (1201) esp_eth: esp_eth_driver_install(214): init mac failed esp_eth_driver_install failed done... I: added inverter HM114183712345 I: (#0) resetPayload I: (#1) resetPayload I: (#2) resetPayload I: (#3) resetPayload I: (#4) resetPayload I: (#5) resetPayload I: (#6) resetPayload I: (#7) resetPayload I: (#8) resetPayload I: (#9) resetPayload I: (#0) resetPayload I: (#1) resetPayload I: (#2) resetPayload I: (#3) resetPayload I: (#4) resetPayload I: (#5) resetPayload I: (#6) resetPayload I: (#7) resetPayload I: (#8) resetPayload I: (#9) resetPayload W: WARNING! your NRF24 module can't be reached, check the wiring E (1269) gpio: gpio_install_isr_service(449): GPIO isr service already installed

Habe auf bereits laufendem ESP (Dev 0.6.12? oder stable 0.6.0?) per Web aktualisiert und auch mal per ESP-flasher.

Bin jetzt wieder auf 0.6.12 dev und warte...
...oder kann ich was tun?
(außer programmieren, dazu steige ich [noch] zu wenig durch :-\ )

EDIT: Alternative: wie müsste ich denn ein W5500-Modul an einen ESP32 DEVKIT o.ä. (habe da ja noch welche) anschließen? Oder was gibt es da "fertig"?

@roobbb
Copy link

roobbb commented Jun 5, 2023

Der ist (wohl) im WT32-ETH01 nicht drin (?)
...
EDIT: Alternative: wie müsste ich denn ein W5500-Modul an einen ESP32 DEVKIT o.ä. (habe da ja noch welche) anschließen?

Das WT32-ETH01-Board hat meist den LAN8720. Den wiz5500 m.W.n. generell nicht.
Ich hab nur das Lolin32-lite-Board - Anschluss müsste mit Devkit analog klappen (dürfte ja mehr GPIO rausgeführt haben, als mein lite-Dingens).

Folgende Pin-Map habe ich verwendet:

ESP32 (Lolin32 lite) NRF24L01 W5500
Vcc 3.3V Vcc 3.3V Vcc 3.3V
GND GND GND
GPIO05 CS  
GPIO16 IRQ  
GPIO17 CE  
GPIO18 SCK  
GPIO19 MISO  
GPIO23 MOSI  
GPIO04   INT
GPIO12   MISO
GPIO13   MOSI
GPIO14   SCLK
GPIO15   SCS

AhoiDTU_lolin32+W5500

Edit: Pin-Map u. Grafik korrigiert

@MadMax-git
Copy link

MadMax-git commented Jun 6, 2023

@roobbb: DANKE!
Ich hab mal so W5500 bestellt, mal sehen...

So, habe es mal schnell verdrahtet...
...und geflasht.
Er meldet in der Console "ETH connected" und ich sehe auch MAC im NW auftauchen.
Leider keine IP...
Sollte das mit DHCP gehen?
Sollte da mehr auftauchen?

Allerdings wird der NRF auch nicht erkannt, evtl. doch was an der Verkabelung?

Muss jetzt allerdings erst mal (wieder) pausieren... :-\

@xFvPx
Copy link

xFvPx commented Jun 21, 2023

Ich habe auch mal ein ESP32,W5500 und NRF verbunden (PINS wie von roobbb beschrieben).
Firmware 0.6.9 geflasht NRF erfolgreich geprüft.
Mit 230527_ahoy_eth_esp32_0.6.15 upgedatet.
Console zeigt

21:19:56.406 -> [ETH]: Got event...
21:19:56.406 -> ETH Connected
21:26:56.396 -> [ETH]: Got event...
21:26:56.396 -> ETH Disconnected
21:26:58.399 -> [ETH]: Got event...
21:26:58.399 -> ETH Connected

wenn ich das LAN Kabel stecke/ziehe/stecke.

Keine IP. Auch nicht im DHCP Server zu sehen.

Noch eimal die 0.6.9 aufgespielt. Statische IP eingestellt. Wieder mit 230527_ahoy_eth_esp32_0.6.15 upgedatet. Keine Veränderung.

@xFvPx
Copy link

xFvPx commented Jun 22, 2023

Update: Ich habe noch einmal in die config.h geschaut.
Firmware 0.6.9 geflasht, NRF CE von PIN 4 auf 17 geändert. Mit 230527_ahoy_eth_esp32_0.6.15 upgedatet. W5500 INT von PIN 22 auf 4 geändert.
16:07:06.965 -> [ETH]: Got event...
16:07:06.965 -> ETH MAC: FE:ED:DE:AD:BE:EF, IPv4: 192.168.176.90
16:07:06.965 -> FULL_DUPLEX, 100Mbps
16:07:06.965 -> ETH.linkUp()=down
16:07:06.965 -> ETH.localIP()=192.168.176.90
16:07:06.965 -> Go on? Yes...
16:07:06.965 -> I: [NTP]: 2023-06-22 14:07:06 UTC

Webserver ist über LAN erreichbar.
Kommunikation zum WR läuft.
Daten gehen auch zum MQTT Broker.

Mal schauen ob es stabil bleibt. Limit habe ich nicht getestet.

@roobbb
Copy link

roobbb commented Jun 23, 2023

@xFvPx : Danke für Deine Rückmeldung. Die config.h hatte ich auch konsultiert. Ich hab nochmal bei meinem Aufbau geschaut und mit Schrecken bemerkt, dass ich beim Malen von Schaubild + Map tatsächlich die Pins verwechselt habe 😱.
Sorry für die Verwirrung. Kann leider nicht sagen, wie ich das wieder geschafft habe 🙄.
Hab beides korrigiert, damit keiner mehr drüber stolpern muss. Hoffe, ich hab keinen neuen Bock drin ...

@geronet1
Copy link
Contributor

Also WT32-ETH01 geht noch nicht?
Aber W5500 geht? Dann bestell ich mir den mal.

@roobbb
Copy link

roobbb commented Jun 23, 2023

Ich meine, der WT32-ETH01 klappt noch nicht, weil dazu noch Anpassungen im Code nötig wären. W5500 ist aber im Branch "eth" bereits vorgesehen. Im Versuchsaufbau hat das auch geklappt mit obiger Einschränkung:

Um den Settings load failed Fehler zu umgehen habe ich gemerkt, dass man einfach zuerst das Release aufspielen kann, einmal mit dem Wifi verbindet und speichert. Dann per Update das ETH Package drauf und alles funktoniert

Zu tieferen oder längeren Tests bin ich leider nicht mehr gekommen. xFvPx ist da bereits weiter.

@xFvPx
Copy link

xFvPx commented Jun 23, 2023

WT32-ETH01 habe ich nicht getestet.
W5500 läuft seit gestern. Bis jetzt absolut stabil.

eine Kleinigkeit:
die beiden MQTT states sind nicht ok:
grafik

@MadMax-git
Copy link

MadMax-git commented Jun 24, 2023

DSC_0525
So habe es nun auch hinbekommen...
Bei mir kam hinzu, dass das NRF-Modul für diesen Aufbau defekt war :-|
Langzeittest muss noch ein wenig warten... :-|

Hab es mal auf Lochraster aufgebaut und läuft seit einigen Tagen problemlos :-)

Mit dem WT32-ETH01 wäre es zwar kompakter aber so ist das auch ganz nett...
...und für das WT32-ETH01 findet sich bestimmt eine Aufgabe ;-)

DANKE!! :-)

@geronet1
Copy link
Contributor

Habs hinbekommen, nun kann man auch HMS/HMT mit dem CMT2003A und der Ethernet-Version verwenden: #1356

@geronet1
Copy link
Contributor

Der Datumsfehler ist wieder da:
Bildschirmfoto 2024-01-16 um 08 44 46

Nach einem manuellen NTP Sync stimmt das Datum wieder, NTP Server funktioniert also. Ist das nur in der ETH Version so?

@lumapu
Copy link
Owner

lumapu commented Jan 18, 2024

beim fusion Board (ESP32-S3) funktoniert das. Schau mal in der app.cpp, ob da evtl. der NTP ticker nicht läuft.
Du kannst auch einen zweiten Tab öffnen und mit [AHOY_IP]/debug eine Ausgabe aller ticker in die Konsole triggern. Im ersten Tab natürlich auf Webserial gehen.

@geronet1
Copy link
Contributor

0.8.46 - f096dc4
07:17:26.587 -----
07:17:26.587 I: com loop duration: 506ms
07:17:26.588 -----
07:17:31.079 I: (#0) no communication to the inverter (night time)
07:17:31.080 I: (#1) no communication to the inverter (night time)
07:17:31.147 I: webSc, tmt: 1, rel: 1
07:17:31.148 I: uart, tmt: 5, rel: 5
07:17:31.148 I: tSend, tmt: 5, rel: 5
07:17:31.148 I: ivCom, tmt: 1705647394, rel: 0
07:17:31.149 I: mqttS, tmt: 1, rel: 1
07:17:31.149 I: mqttM, tmt: 37, rel: 60
07:17:31.160 I: mid2, tmt: 1705705200, rel: 0
07:17:31.160 I: Sunri, tmt: 1705679810, rel: 0
07:17:31.160 I: ntp, tmt: 7297, rel: 0
07:17:31.160 I: ntp, tmt: 7302, rel: 0
07:17:31.171 I: ntp, tmt: 7302, rel: 0
07:17:31.171 I: ntp, tmt: 7297, rel: 0
07:17:31.171 I: ntp, tmt: 7297, rel: 0
07:17:31.172 I: ntp, tmt: 7302, rel: 0
07:17:31.172 I: ntp, tmt: 7302, rel: 0
07:17:31.183 I: ntp, tmt: 7297, rel: 0
07:17:31.183 I: ntp, tmt: 7302, rel: 0
07:17:31.183 I: ntp, tmt: 7302, rel: 0
07:17:31.183 I: ntp, tmt: 7302, rel: 0
07:17:31.184 I: ntp, tmt: 7302, rel: 0
07:17:31.194 I: mqSr, tmt: 1705647395, rel: 0
07:17:31.194 I: ntp, tmt: 7297, rel: 0
07:17:31.195 I: ntp, tmt: 7297, rel: 0
07:17:31.195 I: ntp, tmt: 7297, rel: 0
07:17:31.195 I: ntp, tmt: 7297, rel: 0
07:17:31.206 I: ntp, tmt: 7302, rel: 0
07:17:31.206 I: ntp, tmt: 7302, rel: 0
07:17:31.206 I: ntp, tmt: 7302, rel: 0
07:17:31.207 I: ntp, tmt: 7302, rel: 0
07:17:31.207 I: ntp, tmt: 7302, rel: 0
07:17:31.582 I: (#2) RX  28ms | 27 CH40 | 95 01
07:17:31.685 I: (#2) RX  44ms | 27 CH40 | 95 82
07:17:31.686 I: (#2) Payload (30)
07:17:31.688 -----
07:17:31.688 I: com loop duration: 607ms
07:17:31.689 -----
07:17:36.079 I: (#0) no communication to the inverter (night time)
07:17:36.080 I: (#1) no communication to the inverter (night time)
07:17:36.582 I: (#2) RX  22ms | 27 CH40 | 95 01
07:17:36.685 I: (#2) RX  64ms | 27 CH40 | 95 82

Was heißt tmt: ? Timepoint?
Sieht irgendwie nicht sinnvoll aus..
Warum stellt sich das Jahr 2036 ein:
https://www.ntp.org/reflib/y2k/

@lumapu
Copy link
Owner

lumapu commented Jan 19, 2024

der ntp ticker ist sehr oft registriert, das sollte nicht so sein.
Ja tmt ist timeout

@geronet1
Copy link
Contributor

Ich sehe das Problem..
Warum ist der Scheduler so implementiert daß er bei "addTicker" den Namen doppelt zulässt?
Also in der Liste der Ticker den Namen suchen und wenn schon vorhanden diesen Eintrag überschreiben.
Würde das Problem einfach lösen da er in der ETH Version die NTP Funktion zweigeteilt ist, nicht wie bei der Wifi Version alles blockiert bis das NTP Paket empfangen wurde. Deshalb frägt er auch beim reboot 2x den NTP Server ab und installiert zwei ntp update-Trigger mit "once"..

Ach, der Reboot-Knopf auf der System-Seite funktioniert nicht :-)

@lumapu
Copy link
Owner

lumapu commented Jan 30, 2024

auf welche Version bezieht sich deine Antwort @geronet1

@geronet1
Copy link
Contributor

auf welche Version bezieht sich deine Antwort @geronet1

Das war die 0.8.62, mit #1385 funktioniert jetzt alles, auch der Reboot-Knopf.
Zeit und Nachtzeit geht auch, Uptime 7 Tage..

@lumapu
Copy link
Owner

lumapu commented Mar 16, 2024

evtl. funktioniert jetzt der WT32. Ich habe den Webserver, der nur mit dem W5500 zusammengearbeitet hat heute ersetzt.

@MadMax-git
Copy link

MadMax-git commented Mar 16, 2024

Ok probiere ich aus :-)
Neueste Dev-Version und gut?

Hmm, leider nicht, zumindest nicht bei mir :-
Wir sprechen schon davon, dass es mit einem WT32-ETH01 gehen soll?

Ich habe die letzte Release eingespielt, dann ins WLAN und da dann Update auf die neueste Dev. 240316_ahoy_0.8.94_6af07f5_esp32-wroom32-ethernet-de.bin
Da stand "erfolgreich" und "reboot".

Danach kam dann auf der Console folgendes:
`found ttyUSB0 connecting...
picocom v3.1

port is : /dev/ttyUSB0
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
stopbits are : 1
escape is : C-a
local echo is : no
noinit is : no
noreset is : no
hangup is : no
nolock is : no
send_cmd is : sz -vv
receive_cmd is : rz -vv -E
imap is :
omap is : crcrlf,
emap is : crcrlf,delbs,
logfile is : none
initstring : none
exit_after is : not set
exit is : no

Type [C-a] [C-h] to see available commands
Terminal ready
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
E (507) esp_core_dump_flash: No core dump f�ѥѥ���found!
E (507) esp_core_dump_flash: No core dump partition found!
I: Initializing FS ..
I: .. done
[ 44][E][vfs_api.cpp:105] open(): /littlefs/settings.json does not exist, no permits for creation
W: failed to load json, using default config
I: Settings valid: false
W: WARNING! your NRF24 module can't be reached, check the wiring
E (1073) spi_master: check_trans_valid(694): txdata transfer > host maximum
E (1074) w5500.mac: w5500_read(97): spi transmit failed
E (1075) w5500.mac: w5500_read_buffer(188): read RX buffer failed
E (1080) w5500.mac: emac_w5500_receive(572): read payload failed, len=65533, offset=1
E (1088) spi_master: check_trans_valid(694): txdata transfer > host maximum
E (1095) w5500.mac: w5500_read(97): spi transmit failed
E (1100) w5500.mac: w5500_read_buffer(188): read RX buffer failed
E (1105) w5500.mac: emac_w5500_receive(572): read payload failed, len=65533, offset=1
E (1113) spi_master: check_trans_valid(694): txdata transfer > host maximum
E (1120) w5500.mac: w5500_read(97): spi transmit failed
E (1125) w5500.mac: w5500_read_buffer(188): read RX buffer failed
E (1130) w5500.mac: emac_w5500_receive(572): read payload failed, len=65533, offset=1
E (1138) spi_master: check_trans_valid(694): txdata transfer > host maximum
E (1145) w5500.mac: w5500_read(97): spi transmit failed
`
usw.

Hätte ich anders vorgehen sollen?

@lumapu
Copy link
Owner

lumapu commented Mar 16, 2024

Das war nur eine Idee, sorry wenn man es falsch verstehen konnte.
Im Log sieht man, dass noch alles auf W5500 gemünzt ist, daher kann es leider weiterhin nicht funktionieren.
Welches Board hast du, ich besorge mir mal Hardware?

@lumapu
Copy link
Owner

lumapu commented Mar 16, 2024

sehe gerade, das ist ja schon der Boardname 🙈

@MadMax-git
Copy link

MadMax-git commented Mar 16, 2024

Also ich bin aktuell mit meinem Aufbau mit W5500 sehr zufrieden!
Oder anders: nur wegen mir musst du dir keine HW zulegen und auch nicht weiterprobieren...

War eher anders: ich hatte ja mit einem WT32-ETH01 angefangen/nutzen wollen und das habe ich noch und dachte nur (falsch verstanden ;-) ) es würde jetzt gehen, daher habe ich es vorgezogen und mal ausprobiert ;-)

Wenn du weiterentwickeln willst, ich kann dir auch mein Board schicken...
...dann kann ich allersings nicht mehr testen ;-)

@lumapu
Copy link
Owner

lumapu commented Mar 16, 2024

zu spät, Ali ist schon beauftragt mir eine zu schicken.
Finde es praktisch da gleich alles auf einem Board ist. Evtl. ist es auch für andere interessant.
In zwei Wochen kann ich hoffentlich was erreichen.

@MadMax-git
Copy link

Dann packe ich (diesmal) das Board nicht ganz so weit weg... ;-)
Stehe für Tests bereit :-)

@MadMax-git
Copy link

Jetzt habe ich allerdings (doch) mal 240316_ahoy_0.8.94_6af07f5_esp32-wroom32-ethernet-de.bin auf mein W5500 Board gespielt und nun kommt:

W: WARNING! your NRF24 module can't be reached, check the wiring

Obwohl es vor dem Update funktioniert hatte (eben noch mal zurück auf Release: 0.8.83 und geht wieder) und ich die Einstellungen geprüft habe, passen auch laut Webinterface...

Gruß, Joachim

@MadMax-git
Copy link

MadMax-git commented Mar 16, 2024

Habe eben noch mal hin-und-her geflasht (per Web-Interface).
Der Start ist generell anders und auch die IP-wechselt?

Hier mal der Start mit der neuesten Dev und dann der "Backport" zur akt. Release inkl. der Start dann.
Zuvor hatte ich bei einem Update-Versuch auf die letzte Dev irgendwas mit Flash korrupt usw.?
Nach einem "harten Reboot" ging es dann bis auf den genannten Fehler...

`--------------------------------
Welcome to AHOY!

point your browser to http://192.168.1.137 (Station)
to configure your device

mDNS established: AHOY-DTU.local
I: [NTP]: 2024-03-16 12:42:37 UTC
�E (506) esp_core_dump_flash: No core dump�ˊ�8�C!�+��0x���0�bb���13�&&H���d:��008�0�lY���3�C!���� 0�0���*�
�ѥѥ���found!
E (506) esp_core_dump_flash: No core dump partition found!
I: Initializing FS ..
I: .. done
I: Config Version: 11
I: Settings valid: true
I: Radio Config:
SPI Frequency = 1 Mhz
Channel = 76 (~ 2476 MHz)
Model = nRF24L01+
RF Data Rate = 250 KBPS
RF Power Amplifier = PA_LOW
RF Low Noise Amplifier = Enabled
CRC Length = 16 bits
Address Length = 5 bytes
Static Payload Length = 32 bytes
Auto Retry Delay = 1000 microseconds
Auto Retry Attempts = 15 maximum
Packets lost on
current channel = 0
Retry attempts made for
last transmission = 0
Multicast = Disabled
Custom ACK Payload = Disabled
Dynamic Payloads = Enabled
Auto Acknowledgment = Enabled
Primary Mode = TX
TX address = 0xe7e7e7e7e7
pipe 0 ( open ) bound = 0xe7e7e7e7e7
pipe 1 ( open ) bound = 0x5052168801
pipe 2 (closed) bound = 0xc3
pipe 3 (closed) bound = 0xc4
pipe 4 (closed) bound = 0xc5
pipe 5 (closed) bound = 0xc6
I: DTU_SN: 88165250
I: added inverter HM12345678
W: WARNING! your NRF24 module can't be reached, check the wiring


Welcome to AHOY!

point your browser to http://192.168.1.137 (Station)
to configure your device

mDNS established: AHOY-DTU.local
I: [NTP]: 2024-03-16 12:43:30 UTC
Update Start: 240217_ahoy_0.8.83_5ebfe5a_esp32-wroom32-ethernet-de.bin
Update Success: 1225904B
I: Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
E (518) esp_core_dump_flash: No core dump partition found!
E (518) esp_core_dump_flash: No core dump partition found!
I: Initializing FS ..
I: .. done
I: Config Version: 11
I: Settings valid: true
I: Radio Config:
SPI Frequency = 1 Mhz
Channel = 76 (~ 2476 MHz)
Model = nRF24L01+
RF Data Rate = 250 KBPS
RF Power Amplifier = PA_LOW
RF Low Noise Amplifier = Enabled
CRC Length = 16 bits
Address Length = 5 bytes
Static Payload Length = 32 bytes
Auto Retry Delay = 1000 microseconds
Auto Retry Attempts = 9 maximum
Packets lost on
current channel = 0
Retry attempts made for
last transmission = 0
Multicast = Disabled
Custom ACK Payload = Disabled
Dynamic Payloads = Enabled
Auto Acknowledgment = Enabled
Primary Mode = TX
TX address = 0xe7e7e7e7e7
pipe 0 ( open ) bound = 0xe7e7e7e7e7
pipe 1 ( open ) bound = 0x5052168801
pipe 2 (closed) bound = 0xc3
pipe 3 (closed) bound = 0xc4
pipe 4 (closed) bound = 0xc5
pipe 5 (closed) bound = 0xc6
I: DTU_SN: 88165250
[ETH]: Got event...

ETH Started
I: added inverter HM12345678
E (1225) gpio: gpio_install_isr_service(450): GPIO isr service already installed
[ETH]: Got event...
ETH Connected
[ETH]: Got event...
ETH MAC: AA:BB:CC:DD:EE:FF, IPv4: 192.168.1.139
FULL_DUPLEX, 100Mbps
[WiFi] mDNS established: AHOY-DTU.local
ETH.linkUp()=down
ETH.localIP()=192.168.1.139
Go on? Yes...
I: [NTP]: 2024-03-16 12:45:09 UTC

I: com loop duration: 352ms


I: com loop duration: 351ms


I: com loop duration: 352ms

I: (#0) RX 30ms | 27 CH23 | 95 01
I: (#0) RX 72ms | 27 CH03 | 95 02
I: (#0) RX 119ms | 23 CH03 | 95 83
I: alarm ID incremented to 1

I: com loop duration: 180ms
`

Wenn ich noch was testen kann einfach melden, wobei ich jetzt erst mal weg muss und verm. erst ab morgen Nachmittag wieder kann...

Gruß, Joachim

@geronet1
Copy link
Contributor

geronet1 commented Mar 16, 2024

Hab auch grad wieder ein paar Bugs entdeckt:
Version 0.8.93 W5500 mit CMT: Kann nur 13 Inverter einstellen, dann ist der "add inverter" Knopf weg.
In der config.h steht aber
#define MAX_NUM_INVERTERS 16
Brauche aber 14 :-)

Löschen kann ich die vorhandenen auch nicht mehr..

@lumapu
Copy link
Owner

lumapu commented Mar 18, 2024

das ist komisch, schaue ich bei der nächsten Gelegenheit mal an.

@geronet1
Copy link
Contributor

Ich hab 16 Inverter in die Konfigurationsdatei von Hand eingetragen und hochgeladen, er zeigt sie auch alle an aber kommuniziert wohl nicht mit den letzten drei.. erst als ich die ersten 10 deaktiviert hab ging was.

@geronet1
Copy link
Contributor

geronet1 commented Mar 19, 2024

Außerdem hab ich die neuen HMT-1800-4T eingegeben, er meint aber der hat 6 Anschlüsse und nur 1500 W

Und ich habe zwei DTU mit W5500 im gleichen Subnetz laufen, die haben die gleiche MAC-Adresse :-(
-> gelöst mit #1512

@hans341
Copy link

hans341 commented Mar 20, 2024

Also ich habe jetzt noch mal die 0.8.95-eth aufgspielt und da gibt's in der Tat ne andere MAC-Adresse UND
auch bei mir ist der NRF24L01 weg. Spiele ich die 0.8.93 wieder auf, ist alles wieder da.....
2024-03-20 20_34_27-System – Mozilla Firefox

@geronet1
Copy link
Contributor

Siehe
#1506 (comment)

@Washee
Copy link

Washee commented Aug 8, 2024

Hat sich bei dem WT32-ETH01 etwas bewegt?
Ich habe mir die Tage ohne lange Recherche einen solchen besorgt, als ich gesehen habe, dass Ahoy auch Ethernet unterstützt... leider loopt bei mir der ESP nachdem ich Ethernet aktiviert habe.

Ich habe es mit der 0.8.83 und der aktuellen dev (0.8.130) probiert. Jeweils in der ESP32-wroom32-ethernet Variante.

Fehler sieht so aus:

E (1258) w5500.mac: emac_w5500_init(715): reset w5500 failed
E (1258) esp_eth: esp_eth_driver_install(214): init mac failed
ESP_ERROR_CHECK failed: esp_err_t 0x107 /ESP_ERR_TIMEOUT) at 0x4008cb38
file "network/AhoyEthernetSpi.h" line 99
func: void AhoyEthernetSpi::begin(int8_t, int8_t, int8_t int8_t, int8_t, int8_t)
expression: esp_eth_driver_install(&eth_config, &eth_handle)

abort() was called at PC 0x4008cb3b on core 1

Der WT32-ETH01 hat ja statt eines 5500ers einen LAN8720 Controller verbaut... wird der aktuell überhaupt unterstützt? Im Fehler steht immer wieder w5500.

@lumapu
Copy link
Owner

lumapu commented Aug 9, 2024

nein leider noch nicht, habe das Modul seit Monaten hier liegen, aber noch nicht geflasht. Machst du das mit einem USB zu serial Adapter?

@Washee
Copy link

Washee commented Aug 11, 2024

Genau, mit einem Serial Adapter. RX0 & TX0 müssen angeschlossen werden & der IO0 daneben muss noch mit GND verbunden werden. VCC+GND werden natürlich auch angeschlossen.
GND → GND
TX → RX0
RX → TX0
5v → 5V
IO0 → GND
Geflasht habe ich über die Weboberfläche.

Ich hatte hier eine Doku zu Rate gezogen: https://github.com/egnor/wt32-eth01/blob/main/README.md
Dort gibt es auch Code Snippets und ein kleines Programmierbeispiel.
ETH.begin(1, 16, 23, 18, ETH_PHY_LAN8720);

Leider bin ich in C nicht firm & finde mich in der Codebase auch nicht zurecht, deshalb kann ich nicht so viel helfen :(

@Washee
Copy link

Washee commented Sep 2, 2024

Ich habe im AhoyEthernetSpi.h einmal das verlängerte Snipet aus der verlinkten Readme ergänzt:

void begin() {
        DBGPRINTLN("Initializing Ethernet MAC for WirelessTag WT32-ETH01...");
        eth_mac_config_t mac_config = ETH_MAC_DEFAULT_CONFIG();
        mac_config.clock_config.rmii.clock_mode = EMAC_CLK_EXT_IN;
        mac_config.clock_config.rmii.clock_gpio = EMAC_CLK_IN_GPIO;
        mac_config.smi_mdc_gpio_num = 23;
        mac_config.smi_mdio_gpio_num = 18;
        mac_config.sw_reset_timeout_ms = 1000;  // from ETH.cpp
        esp_eth_mac_t *mac = esp_eth_mac_new_esp32(&mac_config);

        DBGPRINTLN("Initializing Ethernet PHY (LAN8720A) for WT32-ETH01...");
        eth_phy_config_t phy_config = ETH_PHY_DEFAULT_CONFIG();
        phy_config.phy_addr = 1;
        phy_config.reset_gpio_num = -1;
        esp_eth_phy_t *phy = esp_eth_phy_new_lan87xx(&phy_config);

        // Enable external oscillator (pulled down at boot to allow IO0 strapping)
        ESP_ERROR_CHECK(gpio_set_direction(GPIO_NUM_16, GPIO_MODE_OUTPUT));
        ESP_ERROR_CHECK(gpio_set_level(GPIO_NUM_16, 1));
        DBGPRINTLN("Starting Ethernet interface...");

        // Install and start Ethernet driver
        esp_eth_config_t eth_config = ETH_DEFAULT_CONFIG(mac, phy);
        esp_eth_handle_t eth_handle = nullptr;
        ESP_ERROR_CHECK(esp_eth_driver_install(&eth_config, &eth_handle));


    // Configure MAC address
    uint8_t mac_addr[6];
    ESP_ERROR_CHECK(esp_efuse_mac_get_default(mac_addr));
    mac_addr[5] |= 0x03; // derive ethernet MAC address from base MAC address
    ESP_ERROR_CHECK(esp_eth_ioctl(eth_handle, ETH_CMD_S_MAC_ADDR, mac_addr));

        esp_netif_config_t const netif_config = ESP_NETIF_DEFAULT_ETH();
        eth_netif = esp_netif_new(&netif_config);
        auto const eth_netif_glue = esp_eth_new_netif_glue(eth_handle);
        ESP_ERROR_CHECK(esp_netif_attach(eth_netif, eth_netif_glue));

    // Add to Arduino
    add_esp_interface_netif(ESP_IF_ETH, eth_netif);

        ESP_ERROR_CHECK(esp_eth_start(eth_handle));
}

In der AhoyEthernet.h habe ich die neue Methode nur quick & dirty in der begin()-Methode eingebaut:

virtual void begin() override {
        mMode = Mode::WIRELESS;
        mAp.enable();
        AhoyWifi::begin();

        if(!mConfig->sys.eth.enabled)
            return;
        //todo weiche einbauen!
        mEthSpi.begin();
        //mEthSpi.begin(mConfig->sys.eth.pinMiso, mConfig->sys.eth.pinMosi, mConfig->sys.eth.pinSclk, mConfig->sys.eth.pinCs, mConfig->sys.eth.pinIrq, mConfig->sys.eth.pinRst);
        ETH.setHostname(mConfig->sys.deviceName);
}

Mit dieser Codeänderung und mit der im ersten Post beschriebenen Verkabelung hat es bei mir geklappt.

Natürlich muss man das noch irgendwie eleganter machen.
Ich weiß leider nicht wie man das Device identifizieren kann um hier den Programmfluss sinnvoll zu steuern. Irgendein #ifdef

Eventuell hilft das weiter & man kann die Unterstützung für den WT32-ETH01 einbauen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests