The CircuitPython script is performing OK until the line:
Code: Select all
size = sock.recv_into(packet)
To prepare for UDP packet reception the following commands are used:
(Note that WiFi is established. CPY is showing an IP address).
Code: Select all
pool = socketpool.SocketPool(wifi.radio)
sock = pool.socket(pool.AF_INET, pool.SOCK_DGRAM)
sock.bind((MCAST_GRP, MCAST_PORT)) # MCAST_GRP = '239.255.1.1', MCAST_PORT = 49707
packet_size = 61 # the packet frame size of a BECN (beacon) UDP packet.
packet = bytearray(packet_size)
size = sock.recv_into(packet) # <<<=== HERE THE SCRIPT HANGS FOREVER
The script idea is similar than the example in 'UDP Sender and Receiver in CircuitPython': https://gist.github.com/todbot/877b2037 ... id=4278796
Anyone have some idea? Or do I have to create an issue on Github Adafruit Circuitpython ?