UDP Broadcast using WIZNET5K

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
blacky99
Posts: 3
Joined: Tue Mar 29, 2022 3:37 pm

UDP Broadcast using WIZNET5K

Post by blacky99 » Thu Mar 31, 2022 6:32 pm

Hello everyone, I don't know if is this the right place..

I am trying to use a WIZNET w5500 module on my raspberry pi.
I have found a working firmware that implements the WIZNET5K class ( https://github.com/Wiznet/RP2040-HAT-MicroPython )

The module turns on and I am able to receive an address via DHCP but when I try to initialize a UDP socket to transmit a broadcast package I received an error:

>

Code: Select all

>> import socket
>>> socket.SOL_SOCKET
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'SOL_SOCKET'
Why SOL_SOCKET isn't defined ? I also tried with usocket module with the same result:

Code: Select all

>>> import usocket
>>> usocket.SOL_SOCKET
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'SOL_SOCKET'

Post Reply