Trouble with socket echo example using Zephyr configuration and W5500 ethernet shield

Hello,

After succesfully configuring the W5500 driver using Zephyr, I am trying a few examples in the given samples (socket echo). I am unable to send or receive / ping the W5500 Ethernet shield on the configured IP address.

I attached the pins to a serial analyzer and I can see initial communications happening after enabling CONFIG_ETH_W5500=y:

I have configured the prj.conf as following:

CONFIG_NEWLIB_LIBC=y
CONFIG_MAIN_STACK_SIZE=1200

# Networking config
CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=n
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_TCP=y
CONFIG_NET_UDP=y
CONFIG_NET_SHELL=y
CONFIG_NET_STATISTICS=y
CONFIG_SPI=y
CONFIG_NET_L2_ETHERNET=y
CONFIG_ETH_W5500=y
CONFIG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_LOG_BACKEND_SHOW_COLOR=n

CONFIG_NET_LOG=y

#CONFIG_NET_IF_LOG_LEVEL_DBG=y
#CONFIG_NET_L2_ETHERNET_LOG_LEVEL_DBG=y

CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y
CONFIG_NET_CONN_LOG_LEVEL_DBG=y
CONFIG_NET_CONTEXT_LOG_LEVEL_DBG=y

CONFIG_NET_TCP_LOG_LEVEL_DBG=y

# General config
CONFIG_NEWLIB_LIBC=y
CONFIG_MAIN_STACK_SIZE=1200

# Networking config
CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=n

# Network driver config
CONFIG_TEST_RANDOM_GENERATOR=y

# Network address config
CONFIG_NET_CONFIG_SETTINGS=y
CONFIG_NET_CONFIG_NEED_IPV4=y
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.168.1.200"
CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.168.1.210"

CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y

The main.c file includes the socket_echo.c

The logging output shows me this:

I see that it is binding to 0.0.0.0 instead of 102.168.1.200, which indicates that something is obviously wrong.

Any tips on what might be wrong?

Thanks in advance,

Sebastiaan

Parents Reply Children
No Data
Related