[Solved] Can't access REPL on macOS - Works on Windows

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
User avatar
Qetesh
Posts: 7
Joined: Wed Nov 28, 2018 4:18 pm
Location: Germany
Contact:

[Solved] Can't access REPL on macOS - Works on Windows

Post by Qetesh » Wed Nov 28, 2018 6:47 pm

Hi!
I flashed my first device with MicroPython today. I used a Wemos D1 Mini (ESP8266) and flashing worked as supposed. I used macOS 10.13 to flash and also verified the correct installation using esptool.py. I've also been using Arduino on this machine for months without any problems. But as soon as I try to access REPL through a terminal program - no matter if the macOS-native screen or picocom, I just get no response at all from the ESP.
The output just stays empty on screen (screen /dev/cu.Repleo-CH341-001314FD 115200) and picocom (picocom /dev/cu.Repleo-CH341-001314FD -b115200) just says "Terminal ready".
It works fine with PuTTY on windows so I can only assume that the installation of MicroPython on the ESP worked correct but I would prefer using my Mac as all my dev-tools are on macOS.

Thank you in advance for any helping ideas,

Qetesh

newb
Posts: 15
Joined: Wed Jan 10, 2018 8:19 pm
Location: Bulgaria

Re: Can't access REPL on macOS - Works on Windows

Post by newb » Fri Nov 30, 2018 7:16 am

Try to reset the module, while connected to the UART. I have same issue and I'm using Mac. I'm also using Esplorer (java based) as it has a proper interface and Micropython reference as well, unlike 'screen'.

User avatar
devnull
Posts: 290
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Re: Can't access REPL on macOS - Works on Windows

Post by devnull » Fri Nov 30, 2018 9:11 am

you need to use the /dev/tty device not the /dev/cu

i.e.

Code: Select all

/dev/tty.SLAB_USBtoUART

User avatar
Qetesh
Posts: 7
Joined: Wed Nov 28, 2018 4:18 pm
Location: Germany
Contact:

Re: Can't access REPL on macOS - Works on Windows

Post by Qetesh » Thu Dec 06, 2018 12:41 pm

Thank you for the replies so far - and sorry it took me so long to react but I wasn't at home for a few days...

> Try to reset the module, while connected to the UART. I have same issue and I'm using Mac. I'm also using Esplorer (java based) as it has a proper interface and Micropython reference as well, unlike 'screen'.

Tried that several times unfortunately without any change... and I also tried different programs to access it.

> you need to use the /dev/tty device not the /dev/cu

Also no difference :(

What I did notice: It works on my MacBook which runs macOS Mojave - my main workstation still runs on High Sierra as it can't run a newer version. I am even more confused now...

User avatar
dhylands
Posts: 2905
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Can't access REPL on macOS - Works on Windows

Post by dhylands » Thu Dec 06, 2018 2:36 pm

I seem to recall that certain versions of MacOSX had issues with USB serial ports.

User avatar
Qetesh
Posts: 7
Joined: Wed Nov 28, 2018 4:18 pm
Location: Germany
Contact:

Re: Can't access REPL on macOS - Works on Windows

Post by Qetesh » Thu Dec 06, 2018 2:42 pm

So I might just be out of luck with this machine :( I guess I will use the Macbook for now then unless someone still has any idea I could try.

kevinkk525
Posts: 216
Joined: Sat Feb 03, 2018 7:02 pm

Re: Can't access REPL on macOS - Works on Windows

Post by kevinkk525 » Thu Dec 06, 2018 3:06 pm

I did not follow this thread and have no knowledge of macOS but could it be possible to run linux in a virtualbox machine and pass the usb device to the VM and then interact inside linux with the serial port?

User avatar
Qetesh
Posts: 7
Joined: Wed Nov 28, 2018 4:18 pm
Location: Germany
Contact:

Re: Can't access REPL on macOS - Works on Windows

Post by Qetesh » Thu Dec 06, 2018 3:43 pm

That might be a workaround though my whole development environment is on macOS... And I could just use the windows machine then as well ;)
I am planning to replace this old iMac anyway at some point as it doesn't get updates anymore. So I will probably just use my Macbook till then.

User avatar
Roberthh
Posts: 1114
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Can't access REPL on macOS - Works on Windows

Post by Roberthh » Thu Dec 06, 2018 7:09 pm

Did you search for a suitable driver for the USB/UART chip of the Wemos D1 Mini? It is a CH340G. I faintly recall that on my stone age OS-X laptop I once had to install a driver for the ch340 device. I have it on my machine, found it by googling. I have attached it. Most of the Zip is a one page PDF.
CH340x.zip
(111.36 KiB) Downloaded 1 time

User avatar
Qetesh
Posts: 7
Joined: Wed Nov 28, 2018 4:18 pm
Location: Germany
Contact:

Re: Can't access REPL on macOS - Works on Windows

Post by Qetesh » Thu Dec 06, 2018 7:14 pm

I can access the D1 Mini through the Arduino Software and also through esptool.py on this mac so I would assume that I have a working driver. And I used the same driver on my macbook where also REPL works.

Post Reply