Page 1 of 2

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

Posted: Wed Nov 28, 2018 6:47 pm
by Qetesh
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

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

Posted: Fri Nov 30, 2018 7:16 am
by newb
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'.

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

Posted: Fri Nov 30, 2018 9:11 am
by devnull
you need to use the /dev/tty device not the /dev/cu

i.e.

Code: Select all

/dev/tty.SLAB_USBtoUART

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

Posted: Thu Dec 06, 2018 12:41 pm
by Qetesh
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...

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

Posted: Thu Dec 06, 2018 2:36 pm
by dhylands
I seem to recall that certain versions of MacOSX had issues with USB serial ports.

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

Posted: Thu Dec 06, 2018 2:42 pm
by Qetesh
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.

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

Posted: Thu Dec 06, 2018 3:06 pm
by kevinkk525
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?

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

Posted: Thu Dec 06, 2018 3:43 pm
by Qetesh
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.

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

Posted: Thu Dec 06, 2018 7:09 pm
by Roberthh
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 192 times

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

Posted: Thu Dec 06, 2018 7:14 pm
by Qetesh
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.