英文:
esp32 softAP : Static IP for CLIENTS , bind MAC adress to IP adress
问题
SoftAP是否可以在不使用DHCP服务器的情况下为客户端分配固定IP地址?如果不能,是否有任何替代方案可以允许ESP32为特定MAC地址分配特定IP地址?
我有4个ESP32 dongles:一个通过softAP用作接入点,另外3个作为客户端连接到第一个。我想为每个dongle分配一个固定的IP地址。在客户端方面,我没有问题。但在接入点方面,当我检查已连接的站点列表时,它们的IP地址都为0.0.0.0。
英文:
Is it possible to use softAP to give fixed IP addresses to clients without using the DHCP server? If not, are there any alternatives to softAP that would allow the use of an ESP 32 to assign specific IP addresses to specific MAC addresses?
I have 4 ESP32 dongles: one is used as an Access Point via softAP, the other 3 connect as clients to the first one. I would like to assign a fixed IP to each dongle. On the client side I have no problem with this. But on the Access Point side, when I check the list of connected stations, they all have IPs equal to 0.0.0.0.
答案1
得分: 3
我怀疑 ESP IDF 中的功能缺失,通过 Arduino 也是如此。ESP IDF 中的 DHCP 服务器似乎在函数 dhcps_poll_set()
中按照连接的客户端的顺序顺序分配 IP 地址。
如常,如果你感兴趣的话,可以编写一个更好的 DHCP 服务器
英文:
I suspect that functionality is missing in ESP IDF and by extension in Arduino. The DHCP server in ESP IDF seems to allocate IP-s sequentially in order of clients connecting in function dhcps_poll_set()
.
As always, you can write a better DHCP server if you feel up to it
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论