I bought a W5100S ethernet hat that I want to combine with a raspberry pico W.
I wanted to run the example from the wiznet’s git to be able to ping the pico:
from machine import Pin,SPI
import network
import time
time.sleep(5)
led = Pin(25, Pin.OUT)
#W5x00 chip init
def w5x00_init():
spi=SPI(0,10000, mosi=Pin(19),miso=Pin(16),sck=Pin(18))
nic = network.WIZNET5K(spi,Pin(17),Pin(20)) #spi,cs,reset pin
print(‘b’)
nic.active(True)
print(‘e’)
nic.ifconfig((‘192.168.1.20’,‘255.255.255.0’,‘192.168.1.1’,‘8.8.8.8’))
while not nic.isconnected():
time.sleep(1)
print(nic.regs())
print(nic.ifconfig())
def main():
w5x00_init()
while True:
led.value(1)
time.sleep(1)
led.value(0)
time.sleep(1)
if name == “main”:
main()
However the pico becomes totally unreachable with either thonny and rshell. Even reloading the firmware is not enough.
I tried to find out, and apparently the line that was problematic is:
nic.active(True)
I tried aswell several firmwares and what I found out is that the latest version of micropython was not working, even downloaded from the micropython website:
https://micropython.org/resources/firmware/W5100S_EVB_PICO-20231005-v1.21.0.uf2
Version 1.20 was working:
https://micropython.org/resources/firmware/W5100S_EVB_PICO-20230426-v1.20.0.uf2
Do we have any idea why?
My goal would be to be able to use the wifi to create an hotspot that connect to the network I have with the ethernet.