since you can’t ping from your local network, possible causes are:
your hardware is not OK
you did not plug your device to a switch that is connected to a 192.168.128/24 network; or your host device (.30) has a different network mask.
your PHY config does not match your board, see here
BTW, you should run Wireshark on a machine connected to a hub or a monitoring port on a switch and see if there is actually any activity on your device
Later on you are going to need a DNS unless you trust Google to do name resolution
I’m a bit unsure about the PHY config. I’m using an Olimex esp32 Gateway (ESP32-GATEWAY - Open Source Hardware Board). As far as I understand, my configuration should work. can someone confirm?
I have a Olimex ESP32-POE which seems to be very similar to your board on the eth side.
It works very well for me with either DHCP or static IP.
Did you try to set it up with DHCP?
It doesn’t look like it’s getting any ip address from DHCP. That’s why I set it statically. I have tried with 3 different boards to rule out any hardware issues.
Never mind! DHCP works! I still can’t communincate with the device though. It won’t connect to the broker and won’t respond to ping. Wireshark doesn’t show any activity from the device
Please clarify this, did you actually see the DHCP transaction take place ?
If you are connected to a switch on a non-monitoring port you will only see your local port traffic and broadcasts. You need a hub or a switch with monitoring capability (and connect your Wireshark PC to that port)
Or you can run your Wireshark on the same machine that runs the DHCP server and preferably acts as a router
I got it working! The problem was that I was using UART1 for something else. Apparently that causes some kind of conflict. Ethernet started working when I switched to UART0 (UART2 didn’t seem to work either). I cannot find anything about UART blocking ethernet in the documentation.
If you observe the proper schematic for your board (revision specific, which you don’t say), and check the (default ?) UART pin assignment, my bet is that you will find that some pins for the UARTs you mention are clashing with Ethernet hardware.
Yes, I did not mention I was using UART because it didn’t seem relevant at first. The strange thing is though that pin assignment doesn’t matter. I am aware that some GPIOs are used by Ethernet so I have been avoiding assigning them for anything else. I am using GPIO 39 and 16 for UART0. I also had to set stdout uart to -1 (mgos_set_stdout_uart(-1);) since UART0 would otherwise be in use. So it seems like no matter what pins I use, UART1 and UART2 cannot be used together with ETH. I might still be missing something, I’m not sure, but the pin assignment wasn’t the problem.