Page 1 of 1

mpremote configuration

Posted: Sun Apr 24, 2022 1:56 pm
by andypiper
I'm trying to get myself more familiar with mpremote :)

On my Macs, the "first" serial port that shows up is Bluetooth, e.g.

Code: Select all

/dev/cu.Bluetooth-Incoming-Port None 0000:0000 None None
/dev/cu.UM34C None 0000:0000 None None
/dev/cu.usbmodem11101 df618c17a781282c 2e8a:0005 MicroPython Board in FS mode
(turning off BT does not cause that device to disappear)

Is there a way to tell mpremote (via the config file?) what the "default" / "fallback" port should be, so that I can do something like mpremote repl without having to specify a port?

Additionally, is there a way to specify help text for aliases set in the config file? I see the commands themselves are pulled in to the output from mpremote --help but it could be useful to define descriptive text to be shown there as well.

:arrow: general plea for more educational material on the use of mpremote...

Re: mpremote configuration

Posted: Mon Apr 25, 2022 11:24 am
by andypiper
... my goldfish brain now rediscovered that we've actually discussed this same issue on GitHub...

Re: mpremote configuration

Posted: Mon Apr 25, 2022 5:46 pm
by dhylands
If you want something in the meantime, I wrote a little python script called find_port.py, which you can find here: https://github.com/dhylands/dotfiles/bl ... nd_port.py

If you wrap your call to mpremote up in a bash script you can use find_port.py to find your serial port. Use something like

Code: Select all

$(find_port.py --vid 2e8a)
in your bash script where you want the port filled in.