Having issue with example and pinging gateway times out
Squirrelcoding opened this issue · 1 comments
This is probably more suited for a discussion than an issue but there isn't a discussions page so I'll describe my issue here!
I got most of the example running just fine, except for when it comes to the wifi part. On the monitor section of the readme, towards the end you can see that there are messages like this:
(8551) esp_idf_svc::ping: From 192.168.10.1 icmp_seq=1 ttl=64 time=14ms bytes=64
I (9531) esp_idf_svc::ping: Ping success callback invoked
I (9531) esp_idf_svc::ping: From 192.168.10.1 icmp_seq=2 ttl=64 time=1ms bytes=64
I (10531) esp_idf_svc::ping: Ping success callback invoked
I (10531) esp_idf_svc::ping: From 192.168.10.1 icmp_seq=3 ttl=64 time=2ms bytes=64
I (11531) esp_idf_svc::ping: Ping success callback invoked
I (11531) esp_idf_svc::ping: From 192.168.10.1 icmp_seq=4 ttl=64 time=0ms bytes=64
I (12531) esp_idf_svc::ping: Ping success callback invoked
I (12531) esp_idf_svc::ping: From 192.168.10.1 icmp_seq=5 ttl=64 time=1ms bytes=64
However, when I do it I get messages like this:
I (9489) esp_idf_svc::ping: Ping timeout callback invoked
I (9489) esp_idf_svc::ping: From ??? icmp_seq=1 timeout
I (10489) esp_idf_svc::ping: Ping timeout callback invoked
I (10489) esp_idf_svc::ping: From ??? icmp_seq=2 timeout
I (11489) esp_idf_svc::ping: Ping timeout callback invoked
I (11489) esp_idf_svc::ping: From ??? icmp_seq=3 timeout
I (12489) esp_idf_svc::ping: Ping timeout callback invoked
I (12489) esp_idf_svc::ping: From ??? icmp_seq=4 timeout
I (13489) esp_idf_svc::ping: Ping timeout callback invoked
And it finally displays the message
Error: Pinging gateway <my IP> resulted in timeouts
Instead of using the network at my house due to other issues, I am using my computer's hotspot as a wifi source.
To recap
- Everything else in the example works just great
- My ESP32 is connected to my computer's hotspot rather than a network.
Ok, I found the solution; the issue wasn't with the ESP32 itself but rather with my computer's firewall, just as I had suspected. I am running WSL so the issue was with Window's firewall. All I did was add a new rule in Windows to allow incoming connections, but instead of only TCP I selected the options for all protocols, which probably isn't the best idea but it works!