← index #11422PR #8957
Off-topic · high · value 1.193
QUERY · ISSUE

mpremote should not limit name shortcuts to 1st 4 devices

openby bulletmarkopened 2023-05-05updated 2025-09-05
enhancementtools

The mpremote help says you can use the following shortcuts:

  a0          connect to serial port "/dev/ttyACM0"
  a1          connect to serial port "/dev/ttyACM1"
  a2          connect to serial port "/dev/ttyACM2"
  a3          connect to serial port "/dev/ttyACM3"

  c0          connect to serial port "COM0"
  c1          connect to serial port "COM1"
  c2          connect to serial port "COM2"
  c3          connect to serial port "COM3"

  u0          connect to serial port "/dev/ttyUSB0"
  u1          connect to serial port "/dev/ttyUSB1"
  u2          connect to serial port "/dev/ttyUSB2"
  u3          connect to serial port "/dev/ttyUSB3"

That's good, but why limit them to 4? I had 5 devices connected so for the first 4 I could address easily, e.g. mpremote u3 but the 5th device I had to specify the full device path (because mpremote u4 is not accepted), i.e. I had to type mpremote connect /dev/ttyUSB4. Just seems like an unnecessary constraint and surely would be easy to fix.

This is using mpremote from master branch as of today (v1.20.0-50-g786013d46) .

CANDIDATE · PULL REQUEST

docs: Add details about connect command

closedby mikeyavorskyopened 2022-07-25updated 2023-10-02
docs

It's not immediately obvious from the documentation that mpremote connect accepts commands to execute on the device.

This PR adds an example of mpremote connect with a command other than repl and updates the supported commands list in the mpremote.rst, mpremote/README.md and mpremote/main.py files.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied