Skip to content

i75w_rp2350-v0.0.5 missing socket.inet_pton #43

@sjlongland

Description

@sjlongland

Hi,

I'm just experimenting with the stock firmware to make a remotely controlled network display. My plan is to have the device listen on a multicast group for UDP traffic and just send the text to be displayed to the group.

Means I don't have to set up IP addresses, they just have a configured UDP multicast group defined and just use that. I note the MicroPython build here is even dual-stack, so linked-local IPv6 multicast seems like the simple way forward.

I couldn't find any MicroPython-specific guides, but the API seems to suggest the standard Python library methods work. Digging around, I found this example:

https://svn.python.org/projects/python/trunk/Demo/sockets/mcast.py

So tried applying that to MicroPython after getting a unicast proof-of-concept working. I came unstuck because of this function:
https://docs.micropython.org/en/latest/library/socket.html#socket.inet_pton

MicroPython master,   on 2025-01-31; Interstate 75 W with RP2350
Type "help()" for more information.
>>> import sys
>>> sys.version
'3.4.0; MicroPython master,   on 2025-01-31'
>>> import socket
>>> socket.inet_pton
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'inet_pton'

The firmware image I used is this one (downloaded from the releases page yesterday):

4e78e0a8277a30b34a63c47c55b00df64846b5e21d90556943c7e4ec4ae357d3  /tmp/i75w_rp2350-v0.0.5-micropython-with-filesystem.uf2

Is there something I've missed in the documentation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions