If you are asking a question, please follow this template:
-
My goal is: Connect to an MQTT broker via Ethernet
-
My actions are: I’ve setup the configuration as follows:
- ["eth.enable", true]
- ["eth.clk_mode", 3]
- ["eth.ip", "192.168.128.41"]
- ["eth.netmask", "255.255.255.0"]
- ["eth.gw", "192.168.128.254"]
- The result I see is: The logs I see when booting the device:
...
[Jan 4 14:21:27.857] e[0;32mI (1411) esp_eth.netif.glue: 98:f4:ab:25:d3:8be[0m
[Jan 4 14:21:27.860] e[0;32mI (1421) esp_eth.netif.glue: ethernet attached to netife[0m
[Jan 4 14:21:27.866] esp32_eth.c:163 ETH: MAC 98:f4:ab:25:d3:8b; PHY: LAN87x0 @ 0
[Jan 4 14:21:27.875] esp32_eth.c:169 ETH: IP 192.168.128.41/255.255.255.0, GW 192.168.128.254
...
[Jan 4 14:21:45.883] mgos_net.c:93 ETH: connected
[Jan 4 14:21:45.886] mgos_net.c:104 ETH: ready, IP 192.168.128.41, GW 192.168.128.254, DNS 0.0.0.0, NTP 0.0.0.0
[Jan 4 14:21:45.894] mgos_mqtt_conn.c:435 MQTT0 connecting to broker.hivemq.com:1883
[Jan 4 14:21:45.902] mgos_mongoose.c:66 New heap free LWM: 197136
[Jan 4 14:21:45.908] mgos_mongoose.c:66 New heap free LWM: 197080
[Jan 4 14:21:55.143] mongoose.c:12126 Failed to resolve 'broker.hivemq.com', server 8.8.8.8
[Jan 4 14:21:55.149] mgos_mqtt_conn.c:188 MQTT0 TCP connect error (-1)
[Jan 4 14:21:55.155] mgos_mqtt_conn.c:214 MQTT0 Disconnect
What I see When trying to ping the device:
ping 192.168.128.41
PING 192.168.128.41 (192.168.128.41) 56(84) bytes of data.
From 192.168.128.30 icmp_seq=18 Destination Host Unreachable
From 192.168.128.30 icmp_seq=19 Destination Host Unreachable
From 192.168.128.30 icmp_seq=20 Destination Host Unreachable
From 192.168.128.30 icmp_seq=21 Destination Host Unreachable
From 192.168.128.30 icmp_seq=22 Destination Host Unreachable
From 192.168.128.30 icmp_seq=23 Destination Host Unreachable
From 192.168.128.30 icmp_seq=24 Destination Host Unreachable
From 192.168.128.30 icmp_seq=25 Destination Host Unreachable
From 192.168.128.30 icmp_seq=26 Destination Host Unreachable
From 192.168.128.30 icmp_seq=27 Destination Host Unreachable
From 192.168.128.30 icmp_seq=28 Destination Host Unreachable
From 192.168.128.30 icmp_seq=29 Destination Host Unreachable
...
- My expectation & question is: What am I missing? Why can the device not connect to the broker and why can I not ping the device?