RP2040-HAT-Micropython fail import network

We are trying to check the network functionalities from micropython on the W5100S-EVB-Pico. We have followed the instructions on:


He have followed exactly same steps that in https://www.youtube.com/watch?v=86opIykPE-U

The only step we haven’t followed from the getting started is the “2. Patch” step. What we should do there?

All has build successfully and we can access to the board through Thonny. However, when trying to run the Ping sample:


We get the error: ImportError: no module named ‘network’

Then I go to /libraries/lib/wiznet5k directory and I see that is empty.

What we are missing?

Kind Regards

I will provide basic network connection Python code. After calling the network module, you can use network.WIZNET5K() to perform Ethernet communication.

import network
import socket

# Initialize WIZnet W5500 Ethernet interface
# For W5500-EVB-Pico, specific pin configuration for SPI and CS is not required as it's predefined on the board
nic = network.WIZNET5K()

# Configure static IP
# Replace with your network details
nic.ifconfig(('', '', '', ''))

# Server details
server_ip = ''  # Replace with the server's IP
server_port = 5000           # Replace with the server's port

# Create a socket object
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

# Connect to the server
s.connect((server_ip, server_port))
print("Connected to server")

# Send a message to the server
s.send(b'Hello, Wiznet!')

# Receive a response from the server
data = s.recv(1024)
print("Received data:", data)

# Close the socket

This may not be the answer you were looking for, but I hope it clears up some of your questions about how to use WIZNET5K.