Portenta H7 Ethernet module erratic behavior

I have a strange behavior of 2 portenta H7 with a vision module including an ethernet module.
The 1st time I uploaded the openmv firmware V3.9.4 the network link was always down and the link led on the eth module off.
I downgrade it to the V3.8 and the network interface starts to work and I manage to get an ip address from the TCP stack and to connect to a NT server via UDP socket.
Then after a reboot of the H7 the network link was down and never came back up.
I can’t test the wifi with the 3.8 version because the timeout parameter was not accepted by the function wlan.connect(SSID, KEY, timeout=60000)

I reflash the portenta with the arduino firmware, the network module and the wifi module work perfectly.
I then reflash the openMV with the latest 3.9.4 from open MP firmware form the openMV website and flash the Portenta with the firmware from the portenta folder.
The ethernet and wifi start to work again. I then continue my development, next step was to connect MQTT via TLS encryption, everything was working well until one last reboot and then the network link went down again and since then never came back up. It is working fine though with the arduino IDE firmware.
This is very strange… The hardware seems to work fine because it is working with arduino firmware.
Has anybody encountered this problem ?

I have updated the portenta with the new firmware V4 and the wifi start to work again. i still have no luck with the ethernet even if the ethernet is still working fine with the arduino firmware.
There is probably a method i’m missing for the ethernet like the wlan.deinit() for the wifi but for the lan. but the Lan doesn’t seem to have a deinit method.

Please post the script and I’ll test it.

Just the example script is enough.
The link led (amber) is off and i have a timeout error. Errno:110
When i do the same thing in C++ with arduino firmware the link led is on and the ethernet module got is IP from my dhcp

# Ethernet LAN HTTP client example.
import network, usocket
PORT = 80
HOST = "www.google.com"
lan = network.LAN()
# We should have a valid IP now via DHCP
# Get addr info via DNS
addr = usocket.getaddrinfo(HOST, PORT)[0][4]
# Create a new socket and connect to addr
client = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM)
# Set timeout
# Send HTTP request and recv response
client.send("GET / HTTP/1.1\r\nHost: %s\r\n\r\n"%(HOST))
# Close socket

Yes I found a bug and fixed it, ethernet was set in low-power mode. The fix will be included in the next release very soon.

Can’t wait to try it.

Maybe you can help test it ? I just made some fixes… Are you using both eth and wifi ?

I would love to.
I’m using wifi and ethernet.
The user will have choice between wifi and ethernet according to the local envt.

Okay, attaching a test firmware image, just need to upload it from Tools->Run Bootloader. Let me know if there’s any issue.
firmware.zip (1.1 MB)

I will try it today and report to you,

I have just try your firmware 4.01 and the ethernet client example work again. great.
I have upload back my main code using wifi as client and it work too…
Good job.
Thanks a lot for your help

I don’t know if it can help but i have noticed with the test firmware you have send, the connection to the wifi AP via wlan happen must faster compare to V4.

That’s good to know, we’re keeping these changes.