Skip to content

RFC: Use URIs for transport selection and config #35

@M1cha

Description

@M1cha

I implemented the UDP transport and realized, that I can't simply add a --port argument, because that's already used for the path to a serial port.

Also, with the current way, the more arguments we add, the harder it gets to detect what the user wants to do, which is related to this comment in the code:

# TODO: type of transport is inferred from the argument given (--port, --ble, --usb, etc), but
# it must be the case that only one is provided.

So I propose to have a single argument --transport, which accepts a URI:

  • serial:///dev/ttyACM0?baudrate=115200&rtscts=1
  • ble://[aa:bb:cc:dd:ee:ff]
  • udp://127.0.0.1:1234
  • udp://[::1]:1234

And this could actually be implemented by smpclient, rather than smpmgr, so smpclient doesn't even need any knowledge about the transport anymore.

Let me know your thoughts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions