rstrouse / ESPSomfy-RTS

A controller for Somfy RTS shades and blinds
The Unlicense
442 stars 32 forks source link

Static IP does not work on ETH #268

Closed Jezza34000 closed 5 months ago

Jezza34000 commented 5 months ago

Hardware

ESP32 WT32-ETH01

Firmware version

v2.3.3

Application version

v2.3.3

What happened? What did you expect to happen?

Hi Robert, I notice the same problem as this issue : https://github.com/rstrouse/ESPSomfy-RTS/issues/193 The fixed IP address is only respected in Wifi, as soon as I switch to ETH it is assigned from the DHCP Static reservation by mac address is disabled on my Freebox (router)

How to reproduce it (setp by step)

1. Disable "Acquire IP adress autmatically (DHCP)"
2. Set static IP
3. Connect through LAN (=> IP is from DHCP)
4. Switch to Wifi  (=> IP is from ESPSomfy RTS's settings)

Logs

No response

rstrouse commented 5 months ago

I'll have a look at the ethernet library to see if there are any quirks in it. The interweb is riddled with puzzles regarding the netif for ethernet on esp32. Like all things interweb much of it is nonsensical.

rstrouse commented 5 months ago

Install the v2.4.0 pre-release.

I looked at the code in the ethernet libraries and it appears the initialization of the board resets everything to DHCP. So this means that it starts the DHCP module whether you want it or not. So not to be outdone, I set it back after the board initialization before it has a chance to start it up. I can see why all the confusion on the interweb. This is a departure from the Wifi adapter.

Jezza34000 commented 5 months ago

Unfortunately this does not solve the problem. ETH refuses to take its IP configuration

rstrouse commented 5 months ago

I'll have another look this evening.

rstrouse commented 5 months ago

Reinstall v2.4.0 pre-release and I believe I have the issue solved.

Jezza34000 commented 5 months ago

Tested and approuved : Fixed 2.4.0 Wifi => OK ETH => OK Many reboot => OK