whitecatboard / Lua-RTOS-ESP32

Lua RTOS for ESP32
Other
1.2k stars 221 forks source link

PING command with strange results. #147

Closed oskarirauta closed 6 years ago

oskarirauta commented 6 years ago

There is a something wrong with PING command. I run a 10.0.0.0/255.255.0.0 network and my gateway's address is 10.0.0.1

Lua RTOS beta 0.1 powered by Lua 5.3.4

Executing /system.lua ...
Starting wifi ...
Executing /autorun.lua ...

/ > netstat
wf: mac address 30:ae:a4:1e:74:28
   ip address 10.0.0.144 / netmask 255.255.0.0
   gw address 10.0.0.1
  ip6 address fe80:0000:0000:0000:32ae:a4ff:fe1e:7428

en: mac address 00:00:00:00:00:00
   ip address 0.0.0.0 netmask 0.0.0.0
   gw address 0.0.0.0

When pinging it, I get strange results:

first run

/ > ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 32 data bytes
60 bytes from 246.47.8.64: icmp_seq=1 time=53.254 ms
60 bytes from 246.47.8.64: icmp_seq=2 time=2.282 ms
60 bytes from 246.47.8.64: icmp_seq=3 time=2.330 ms

second run

/ > ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 32 data bytes
60 bytes from 144.37.254.63: icmp_seq=1 time=2.223 ms
60 bytes from 144.37.254.63: icmp_seq=2 time=1.612 ms
60 bytes from 144.37.254.63: icmp_seq=3 time=4.006 ms

third run

/ > ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 32 data bytes
60 bytes from 10.0.0.1: icmp_seq=1 time=9.287 ms
60 bytes from 10.0.0.1: icmp_seq=2 time=3.485 ms
60 bytes from 10.0.0.1: icmp_seq=4 time=2.068 ms

... some attempts here with similar results ...

sixth run:

/ > ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 32 data bytes
60 bytes from 144.37.254.63: icmp_seq=5 time=8.498 ms
60 bytes from 144.37.254.63: icmp_seq=3 time=2.171 ms
60 bytes from 144.37.254.63: icmp_seq=4 time=2.107 ms

See from address.... It should say 10.0.0.1 because that's what I am pinging...

jolivepetrus commented 6 years ago

@oskarirauta,

This is solved in commit https://github.com/whitecatboard/Lua-RTOS-ESP32/commit/124ef89d4d9936aca7a8d1a62c61ba81e1ba3783

oskarirauta commented 6 years ago

Thanks. I'll test at next weekend :)