Content-Length: 243061 | pFad | http://github.com/micropython/micropython/issues/17242

20 wiznet5k_send_ethernet: fatal error -5 · Issue #17242 · micropython/micropython · GitHub
Skip to content

wiznet5k_send_ethernet: fatal error -5 #17242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
masker opened this issue May 3, 2025 · 2 comments
Open

wiznet5k_send_ethernet: fatal error -5 #17242

masker opened this issue May 3, 2025 · 2 comments
Labels

Comments

@masker
Copy link

masker commented May 3, 2025

Port, board and/or hardware

Wiznet W5100S-EVB-Pico

MicroPython version

MicroPython v1.25.0 on 2025-04-15; W5100S-EVB-Pico with RP2040
also 1.24.1, and 1.24.0, but 1.23.0 doesn't give the error

Reproduction

MicroPython v1.25.0 on 2025-04-15; W5100S-EVB-Pico with RP2040

Type "help()" for more information.

import network
nic = network.WIZNET5K()
nic.ifconfig()
('192.168.1.137', '255.255.255.0', '192.168.1.254', '192.168.1.254')
nic.active(True)
wiznet5k_send_ethernet: fatal error -5
nic.isconnected()
True

Expected behaviour

Expected no error to be reported.
However, the error does not seem to affect the operation. The ethernet socket behaviour seems to be working ok.

Observed behaviour

wiznet5k_send_ethernet: fatal error -5
was printed out, but operation of ethernet seems to be working, however I can't be certain all functions are working correctly at this time

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

@masker masker added the bug label May 3, 2025
@Lobo-T
Copy link

Lobo-T commented May 20, 2025

I can confirm that this happens in MicroPython v1.26.0-preview.120 with a W5500

But it seems very random.
I've tried to see if there is any difference from a power on reset, soft reset. Explicitly resetting the W5500 before creating the WIZNET5K object.
Waiting between creating the object and calling Activate or not.
Nothing seems to make a difference, sometimes there's no error, somtimes there is an error.
If the error has first occured it might be there againg next time you run the script, but might dissappear on the third or fourth time.

Most often you get the wiznet5k_send_ethernet: fatal error -5 only once when calling active(True), but once it printed three times.

The interface still seems to work though.

Testscript:

from microdot import Microdot
from machine import Pin,SPI
import network
import time

spiBus = 0
spiCLK = 18
spiMOSI = 19
spiMISO = 16
ethCS = 17
ethRST = 28
ethINT = 20
pRST = Pin(ethRST,Pin.OUT)
staticIP = '10.0.250.55'

spinet = SPI(spiBus, 10_000_000, sck=Pin(spiCLK), mosi=Pin(spiMOSI), miso=Pin(spiMISO))
wiznet = network.WIZNET5K(spinet,Pin(ethCS),pRST,Pin(ethINT))

print("Activate")
wiznet.active(True)
print("Set IP")
wiznet.ifconfig((staticIP, '255.255.0.0', '10.0.250.1', '8.8.8.8')) #static
#ipconf = wiznet.ifconfig("dhcp") #dhcp
print(wiznet.ifconfig())

while True:
    print('Waiting for Ethernet connection...')
    if wiznet.isconnected():
        print('Connected to Ethernet')
        print(wiznet.ifconfig())
        break
    time.sleep(2)

app = Microdot()

webpage = '''
<html>
<head>
    <title>Wiznet test</title>
    <meta http-equiv="refresh" content="2">
</head>
<body>
    <h2>Wiznet test</h2>
    <p>Reloader om 2 sek</p>
</body>
</html>
'''

@app.route('/')
async def index(request):
    return webpage, {'Content-Type':'text/html'}

app.run(port=80,debug=True)

Result when connecting with a webbrowser:

MPY: soft reboot
Activate
wiznet5k_send_ethernet: fatal error -5
Set IP
('10.0.250.55', '255.255.0.0', '10.0.250.1', '8.8.8.8')
Waiting for Ethernet connection...
Waiting for Ethernet connection...
Connected to Ethernet
('10.0.250.55', '255.255.0.0', '10.0.250.1', '8.8.8.8')
Starting async server on 0.0.0.0:80...
GET / 200
GET / 200
GET / 200
GET / 200
GET / 200
GET / 200
GET / 200

I can't remember running into this when the driver was first created some years ago.
But if it just works anyway, I might have been lucky and not noticed.

I think @andrewleech made the driver. Is it OK to tag him in here?

@andrewleech
Copy link
Contributor

I did write the driver yes, but haven't actually used it since really! I don't know what this error means really, I'm not sure if the wiznet C drivers have any more information about them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/micropython/micropython/issues/17242

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy