dchristl / esp32_nat_router_extended

a simple ESP32 NAT Router with some additional features
292 stars 54 forks source link

More than two clients? #98

Closed Schorschlhuber closed 8 months ago

Schorschlhuber commented 9 months ago

Hello, thank's for your work and a happy new year! I've tried to connect more than two devices but the DHCP does only provide two adresses, so two devices share the IP 192.168.4.2 or 192.168.4.3.

Does the router only support 2 Clients?

dchristl commented 9 months ago

Hello @Schorschlhuber ,

wish you a Happy New Year, too. The router supports up to 255 clients as default. I think there will be some performance issues if all possible cliebnts will connect, but 10 devices should be no problem.

Kind Regards, Danny

Schorschlhuber commented 9 months ago

Very strange. The problem persists not only with two Tasmota-devices but also with my smartphone. All three devices get IP .3 and kick each other out. "Connected devices" shows three devices with two devices IP 0.0.0.0

After disconnect the two other devices for about an hour, the devices are getting new adresses .5 and .8.

Kind Regards, Schorschlhuber

Schorschlhuber commented 8 months ago

The problem sill exists even with other devices. It seems the DHCP offers the same IP to multiple devices. How long is the DHCP-Lease-Time? If the third devices connects, another will be kicked out.

tasmota2 tasmota

grafik

dchristl commented 8 months ago

That is really very strange. Perhaps there have been changes in functionality due to the framework update (esp-idf), causing it not to work anymore. The default DHCP server from the Soft-AP is used here, which I use as is without modifications. I will take a closer look, but unfortunately, I have little time for this project right now. If I remember correctly, the default lease time was 2 hours

Schorschlhuber commented 8 months ago

My workaround: set static IP per client > 172.16.4.10 That works without any problems.

dchristl commented 8 months ago

I've tried the latest version and have no problem to connect multiple devices. I've tested with an ESP32. The clients were 3 Smartphones and one notebook:

Bildschirmfoto vom 2024-01-08 12-36-32

Bildschirmfoto vom 2024-01-08 12-38-27

The documentation says that the maximum number of connections is 15 at max for the ESP32 and the ESP32 S2. The ESP32 C3 is limited to 10.

I unfortunately cannot reproduce the issue. Which chip are you using? Do you have another ESP32 for testing? Could you possibly connect via the serial connection and post the log when the third client attempts to connect?

dchristl commented 8 months ago

Please reopen, if the issue persist, but currently I can't do anything about it.