Esp32如何使用C获取IP地址

问题描述 投票:-1回答:1

我想知道如何获得esp32 IP地址(我正在使用C),我需要它将http请求发送到板上运行的Web服务器。我还搜索了espressif文档,但没有找到对我有帮助的示例

c httprequest ip-address httpserver esp32
1个回答
0
投票
tcpip_adapter_ip_info_t ip;
tcpip_adapter_get_ip_info(0, &ip);

'0'表示STA接口

© www.soinside.com 2019 - 2024. All rights reserved.