0

MU won't connect to my Circuit Playground Express [on M1 Mac
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

MU won't connect to my Circuit Playground Express [on M1 Mac

by stellata on Wed May 05, 2021 8:02 am

Hi!

I managed to connect my new Circuit Playground Express atsamd21, but MU won't let me connect to serial..

I put the latest firmware on it. adafruit-circuitpython-circuitplayground_express-en_US-6.2.0.uf2
The board mounts as CIRCUITPY, as it should.

I can see the board in the terminal.
Code: Select all | TOGGLE FULL SIZE
% ls /dev/tty.*
/dev/tty.usbmodem1301


And I can use it in screen:
Code: Select all | TOGGLE FULL SIZE
screen /dev/tty.usbmodem1301

Code: Select all | TOGGLE FULL SIZE
Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit CircuitPlayground Express with samd21g18
>>>


When mounted (also after reboot) and starting MU, I can successfully save to the CIRCUITPY-volume, but in the right bottom I see the chip with a cross, and i can't connect to serial.
Screenshot 2021-05-05 at 13.53.57.png
Screenshot 2021-05-05 at 13.53.57.png (316.34 KiB) Viewed 158 times


OS X 11.2.3 on M1 MacBook Air
MU Mu 1.1.0.beta.4

Do you have any idea where I got it wrong?

Cheers!
Stellata

MU Log:
Code: Select all | TOGGLE FULL SIZE

Starting Mu 1.1.0.beta.4
2021-05-05 13:50:30,479 - root:266(run) INFO: uname_result(system='Darwin', node='Stellata.domain_not_set.invalid', release='20.3.0', version='Darwin Kernel Version 20.3.0: Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101', machine='x86_64', processor='i386')
2021-05-05 13:50:30,479 - root:267(run) INFO: Python path: ['/', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python38.zip', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/lib-dynload', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/site-packages', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/site-packages/setuptools-49.6.0-py3.8.egg', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/site-packages/pip-20.2.2-py3.8.egg', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/site-packages/IPython/extensions']
2021-05-05 13:50:30,479 - root:268(run) INFO: Language code: en_NL
2021-05-05 13:50:30,479 - mu.settings:220(load) WARNING: No settings file found at /Users/stella/Library/Application Support/mu/settings.json; skipping
2021-05-05 13:50:30,794 - mu.virtual_environment:480(ensure_and_create) INFO: Added log handler.
2021-05-05 13:50:30,794 - mu.virtual_environment:491(ensure_and_create) DEBUG: Checking virtual environment; attempt #1.
2021-05-05 13:50:30,794 - mu.virtual_environment:542(ensure_path) INFO: Virtual Environment found at: /Users/stella/Library/Application Support/mu/mu_venv-38-20210505-123056
2021-05-05 13:50:30,794 - mu.virtual_environment:555(ensure_interpreter) INFO: Interpreter found at: /Users/stella/Library/Application Support/mu/mu_venv-38-20210505-123056/bin/python
2021-05-05 13:50:30,994 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output: 38
2021-05-05 13:50:30,994 - mu.virtual_environment:585(ensure_interpreter_version) INFO: Both interpreters at version 38
2021-05-05 13:50:30,997 - mu.virtual_environment:611(ensure_pip) INFO: Pip found at: /Users/stella/Library/Application Support/mu/mu_venv-38-20210505-123056/bin/pip
2021-05-05 13:50:31,000 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: pygame
2021-05-05 13:50:31,557 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output: pygame 2.0.1 (SDL 2.0.14, Python 3.8.5)
Hello from the pygame community. https://www.pygame.org/contribute.html
2021-05-05 13:50:31,558 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: numpy
2021-05-05 13:50:32,089 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-05 13:50:32,090 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: pgzero
2021-05-05 13:50:32,122 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-05 13:50:32,123 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: flask
2021-05-05 13:50:32,337 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-05 13:50:32,337 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: qtconsole
2021-05-05 13:50:32,380 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-05 13:50:32,380 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: esptool
2021-05-05 13:50:32,438 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-05 13:50:32,438 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: adafruit_board_toolkit
2021-05-05 13:50:32,472 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-05 13:50:32,472 - mu.virtual_environment:496(ensure_and_create) INFO: Valid virtual environment found at /Users/stella/Library/Application Support/mu/mu_venv-38-20210505-123056
2021-05-05 13:50:32,472 - mu.settings:169(save) DEBUG: Saving to /Users/stella/Library/Application Support/mu/venv.json
2021-05-05 13:50:32,473 - mu.virtual_environment:509(ensure_and_create) DEBUG: Emitter: <bound PYQT_SIGNAL display_text of StartupWorker object at 0x11c588b80>; Splash Handler; <SplashLogHandler (INFO)>
2021-05-05 13:50:32,550 - mu.logic:758(__init__) INFO: Setting up editor.
2021-05-05 13:50:32,551 - mu.logic:778(__init__) INFO: Log directory: /Users/stella/Library/Logs/mu
2021-05-05 13:50:32,551 - mu.logic:779(__init__) INFO: Data directory: /Users/stella/Library/Application Support/mu
2021-05-05 13:50:32,551 - mu.logic:793(setup) INFO: Available modes: python, circuitpython, microbit, esp, web, pyboard, debugger, pygamezero, lego, pico
2021-05-05 13:50:32,551 - mu.modes.base:61(get_default_workspace) INFO: Using workspace /Users/stella/mu_code from settings file
2021-05-05 13:50:32,612 - mu.modes.base:61(get_default_workspace) INFO: Using workspace /Users/stella/mu_code from settings file
2021-05-05 13:50:32,612 - mu.logic:1521(change_mode) INFO: Workspace directory: /Users/stella/mu_code
2021-05-05 13:50:32,612 - mu.logic:867(restore_session) DEBUG: <SessionSettings from /Users/stella/Library/Application Support/mu/session.json>
2021-05-05 13:50:32,618 - mu.logic:978(_load) INFO: Loading script from: /Volumes/CIRCUITPY/print8.py
2021-05-05 13:50:32,621 - mu.logic:316(read_and_decode) DEBUG: Trying to decode with utf-8
2021-05-05 13:50:32,621 - mu.logic:319(read_and_decode) INFO: Decoded with utf-8
2021-05-05 13:50:32,621 - mu.logic:332(read_and_decode) DEBUG: Detected newline '\n'
2021-05-05 13:50:32,621 - mu.logic:1077(_load) DEBUG:   print( 8 )

2021-05-05 13:50:32,711 - mu.logic:889(restore_session) INFO: Loaded files.
2021-05-05 13:50:32,711 - mu.logic:892(restore_session) INFO: User defined environment variables: []
2021-05-05 13:50:32,711 - mu.logic:897(restore_session) INFO: Minify scripts on micro:bit? False
2021-05-05 13:50:32,763 - mu.logic:1521(change_mode) INFO: Workspace directory: /Volumes/CIRCUITPY
2021-05-05 13:53:50,476 - mu.interface.main:942(show_message) DEBUG: Could not find an attached device.
2021-05-05 13:53:50,477 - mu.interface.main:943(show_message) DEBUG: Please make sure the device is plugged into this computer.

It must have a version of MicroPython (or CircuitPython) flashed onto it before the REPL will work.

Finally, press the device's reset button and wait a few seconds before trying again.
2021-05-05 13:53:59,598 - mu.modes.base:474(toggle_repl) INFO: Toggle REPL on.
2021-05-05 13:56:26,896 - mu.logic:1394(show_admin) INFO: Showing admin with logs from /Users/stella/Library/Logs/mu/mu.log
2021-05-05 13:56:26,896 - mu.virtual_environment:788(installed_packages) INFO: Discovering installed third party modules in venv.
2021-05-05 13:56:27,273 - mu.virtual_environment:193(run) DEBUG: Process output: Package                Version
---------------------- -------
adafruit-board-toolkit 1.0.1
appnope                0.1.2
backcall               0.2.0
bitstring              3.1.7
cffi                   1.14.5
click                  7.1.2
cryptography           3.4.7
decorator              5.0.7
ecdsa                  0.16.1
esptool                3.0
Flask                  1.1.2
ipykernel              5.5.3
ipython                7.22.0
ipython-genutils       0.2.0
itsdangerous           1.1.0
jedi                   0.18.0
Jinja2                 2.11.3
jupyter-client         6.1.12
jupyter-core           4.7.1
MarkupSafe             1.1.1
numpy                  1.20.1
parso                  0.8.2
pexpect                4.8.0
pgzero                 1.2
pickleshare            0.7.5
pip                    21.1.1
prompt-toolkit         3.0.18
ptyprocess             0.7.0
pycparser              2.20
pygame                 2.0.1
Pygments               2.8.1
pyserial               3.5
python-dateutil        2.8.1
pyzmq                  22.0.3
qtconsole              4.7.4
QtPy                   1.9.0
reedsolo               1.5.4
setuptools             56.0.0
six                    1.15.0
tornado                6.1
traitlets              5.0.5
wcwidth                0.2.5
Werkzeug               1.0.1
wheel                  0.36.2
2021-05-05 13:56:27,274 - mu.virtual_environment:797(installed_packages) INFO: []
2021-05-05 13:56:35,465 - mu.logic:1440(show_admin) INFO: No admin settings changed.
2021-05-05 13:58:34,971 - mu.logic:1394(show_admin) INFO: Showing admin with logs from /Users/stella/Library/Logs/mu/mu.log
2021-05-05 13:58:34,972 - mu.virtual_environment:788(installed_packages) INFO: Discovering installed third party modules in venv.
2021-05-05 13:58:35,258 - mu.virtual_environment:193(run) DEBUG: Process output: Package                Version
---------------------- -------
adafruit-board-toolkit 1.0.1
appnope                0.1.2
backcall               0.2.0
bitstring              3.1.7
cffi                   1.14.5
click                  7.1.2
cryptography           3.4.7
decorator              5.0.7
ecdsa                  0.16.1
esptool                3.0
Flask                  1.1.2
ipykernel              5.5.3
ipython                7.22.0
ipython-genutils       0.2.0
itsdangerous           1.1.0
jedi                   0.18.0
Jinja2                 2.11.3
jupyter-client         6.1.12
jupyter-core           4.7.1
MarkupSafe             1.1.1
numpy                  1.20.1
parso                  0.8.2
pexpect                4.8.0
pgzero                 1.2
pickleshare            0.7.5
pip                    21.1.1
prompt-toolkit         3.0.18
ptyprocess             0.7.0
pycparser              2.20
pygame                 2.0.1
Pygments               2.8.1
pyserial               3.5
python-dateutil        2.8.1
pyzmq                  22.0.3
qtconsole              4.7.4
QtPy                   1.9.0
reedsolo               1.5.4
setuptools             56.0.0
six                    1.15.0
tornado                6.1
traitlets              5.0.5
wcwidth                0.2.5
Werkzeug               1.0.1
wheel                  0.36.2
2021-05-05 13:58:35,258 - mu.virtual_environment:797(installed_packages) INFO: []


stellata
 
Posts: 3
Joined: Wed May 05, 2021 7:46 am

Re: MU won't connect to my Circuit Playground Express

by mikeysklar on Thu May 06, 2021 5:20 pm

Hi Stellata,

It sounds like everything with your CPX and MacOS is working correctly.

As long as your device has it's original CIRCUITPY name MU should detect it. Since it is not my guess would be this is a MacOS BigSur issue which might require additional finessing.

Have you tried the two main suggestions in this post:

https://github.com/mu-editor/mu/issues/1147

(launching Mu)
Code: Select all | TOGGLE FULL SIZE
export QT_MAC_WANTS_LAYER=1
$ python run.py


a more elaborate virtual env setup:

Code: Select all | TOGGLE FULL SIZE
kurbonas: Here’s my best guide for everything you need to do:

Download Xcode and agree to the license. (Some of the tools you need are bundled with Xcode.)
In a terminal, type git clone https://github.com/mu-editor/mu.git
Move to the folder Mu downloaded to with cd mu
Type python3 -m venv ~/mu-venv to create a virtual environment.
Type source ~/mu-venv/bin/activate to activate the venv you created
Install the dependencies with pip3 install -e ".[dev]"
a. If that returns an error about SDL, follow these instructions:
b. Install Homebrew following the instructions at brew.sh
c. Run brew install sdl sdl_gfx sdl_image sdl_mixer sdl_ttf (I’m not sure which of those it actually needed)
d. Try running the pip3 command above again
Set the variable Qt needs with export QT_MAC_WANTS_LAYER=1
Run Mu with python3 run.py
If anything was unclear there, let me know. If you want to exit the virtual environment, type deactivate.

mikeysklar
 
Posts: 4508
Joined: Mon Aug 01, 2016 8:10 pm

Re: MU won't connect to my Circuit Playground Express

by adafruit2 on Fri May 07, 2021 12:31 pm

we know there's something Weird about M1 Macs - you can try an older version of Mu till we sort it out

tagging danh too

adafruit2
Site Admin
 
Posts: 20030
Joined: Fri Mar 11, 2005 7:36 pm

Re: MU won't connect to my Circuit Playground Express

by mgibbs189 on Fri May 07, 2021 1:13 pm

Just wanted to chime in... experienced the same issue.

Everything works fine except for the "Serial" feature in MU 1.1.0-beta4. Connecting via terminal works fine.

Macbook Air M1, Bug Sur 11.3
UF2 Bootloader v3.13.0
CircuitPython 6.2.0

Downgrading to MU 1.0.3 causes the app to freeze. After applying the fix linked below, MU loads and the "Serial" functionality works.

https://github.com/mu-editor/mu/issues/1147#issuecomment-790763468

mgibbs189
 
Posts: 2
Joined: Mon May 03, 2021 10:04 pm

Re: MU won't connect to my Circuit Playground Express

by stellata on Fri May 07, 2021 1:53 pm

Thank you both @mikeysklar and @adafruit2!

Installing XCode did not solve the issue..
But using just one older version, beta 1.1.0-beta.3 did the trick!
https://github.com/mu-editor/mu/release ... 1.0-beta.3

Thanks, I'm happy! :)
Stellata

stellata
 
Posts: 3
Joined: Wed May 05, 2021 7:46 am

Re: MU won't connect to my Circuit Playground Express

by stellata on Fri May 07, 2021 1:55 pm

mgibbs189 wrote:Just wanted to chime in... experienced the same issue.

Downgrading to MU 1.0.3 causes the app to freeze. After applying the fix linked below, MU loads and the "Serial" functionality works.

https://github.com/mu-editor/mu/issues/1147#issuecomment-790763468


Luckily for now i didn't have the issue with beta 3 So I'll just use it till beta 5 comes out!

stellata
 
Posts: 3
Joined: Wed May 05, 2021 7:46 am

Re: MU won't connect to my Circuit Playground Express

by danhalbert on Fri May 07, 2021 10:59 pm

This M1 issue is being tracked in https://github.com/mu-editor/mu/issues/1543.

danhalbert
 
Posts: 2425
Joined: Tue Aug 08, 2017 12:37 pm

Please be positive and constructive with your questions and comments.