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.
I implemented the UDP transport and realized, that I can't simply add a
--portargument, 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:
So I propose to have a single argument
--transport, which accepts a URI:serial:///dev/ttyACM0?baudrate=115200&rtscts=1ble://[aa:bb:cc:dd:ee:ff]udp://127.0.0.1:1234udp://[::1]:1234And this could actually be implemented by
smpclient, rather thansmpmgr, sosmpclientdoesn't even need any knowledge about the transport anymore.Let me know your thoughts.