Skip to content

Commit

Permalink
Resolved the build failure for m5-stack ipv6 only test
Browse files Browse the repository at this point in the history
  • Loading branch information
shripad621git committed Jun 21, 2024
1 parent 4048e57 commit d73dbbf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,9 +706,13 @@ def main() -> int:
if sys.platform == "darwin":
shell.run_cmd(
"sed -i '' 's/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/CONFIG_DISABLE_IPV4=y/g' sdkconfig ")
shell.run_cmd(
"sed -i '' 's/CONFIG_LWIP_IPV4=y/#\\ CONFIG_LWIP_IPV4\\ is\\ not\\ set/g' sdkconfig ")
else:
shell.run_cmd(
"sed -i 's/#\\ CONFIG_DISABLE_IPV4\\ is\\ not\\ set/CONFIG_DISABLE_IPV4=y/g' sdkconfig ")
shell.run_cmd(
"sed -i 's/CONFIG_LWIP_IPV4=y/#\\ CONFIG_LWIP_IPV4\\ is\\ not\\ set/g' sdkconfig ")

shell.run_cmd("idf.py build")
shell.run_cmd("idf.py build flashing_script")
Expand Down
2 changes: 2 additions & 0 deletions examples/platform/esp32/Rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,15 @@ class Esp32WiFi final : public WiFi
return pw::OkStatus();
}

#if CHIP_DEVICE_CONFIG_ENABLE_IPV4
pw::Status GetIP4Address(const pw_protobuf_Empty & request, chip_rpc_IP4Address & response) override
{
esp_netif_ip_info_t ip_info;
PW_TRY(EspToPwStatus(esp_netif_get_ip_info(esp_netif_get_handle_from_ifkey("WIFI_STA_DEF"), &ip_info)));
snprintf(response.address, sizeof(response.address), IPSTR, IP2STR(&ip_info.ip));
return pw::OkStatus();
}
#endif

pw::Status GetIP6Address(const pw_protobuf_Empty & request, chip_rpc_IP6Address & response) override
{
Expand Down
2 changes: 2 additions & 0 deletions scripts/build/builders/esp32.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ def generate(self):
if not self.enable_ipv4:
self._Execute(
['bash', '-c', 'echo -e "\\nCONFIG_DISABLE_IPV4=y\\n" >>%s' % shlex.quote(defaults_out)])
self._Execute(
['bash', '-c', 'echo -e "\\nCONFIG_LWIP_IPV4=n\\n" >>%s' % shlex.quote(defaults_out)])

if self.enable_insights_trace:
insights_flag = 'y'
Expand Down

0 comments on commit d73dbbf

Please sign in to comment.