[SOLVED] REPL Doesn't Work

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
User avatar
ioukos
Posts: 33
Joined: Wed Oct 19, 2016 11:31 am
Location: Alsace, Europe

[SOLVED] REPL Doesn't Work

Post by ioukos » Wed Oct 19, 2016 11:50 am

Hello users,

I've just received a Wemos D1 Mini Pro, I've uploaded the official esp8266-20160909-v1.8.4.bin from http://micropython.org/download using the updated https://github.com/themadinventor/esptool from Linux.

Everything looks good, except the REPL that doesn't allow me to type commands/instructions in it. In an other hand I can read "print" output from a main.py, and even see the ">>>" prompt.

To sum up, I can read in REPL, but can't write.

Do you have any idea or suggestion ? thank You

I'll check with the new version 1.8.5 and nodemcu firmware.

PS : it doesn't seem to be a common problem as no results show up on google
Last edited by ioukos on Mon Oct 24, 2016 7:56 am, edited 1 time in total.

chrisgp
Posts: 41
Joined: Fri Apr 01, 2016 5:29 pm

Re: REPL Doesn't Work

Post by chrisgp » Wed Oct 19, 2016 3:26 pm

Hopefully someone has some experience with this problem and can give you a more actionable answer, but until then can you explain a bit more about your setup? Which program are you using to talk to the device (Putty on Windows, screen on mac or linux) and are you configuring it for 115000 baud (I'm guessing so based on getting output, but just wanted to verify).

Some things to try: 1.) Hit Ctrl-C in the terminal just to make sure some loop isn't preventing the REPL from processing data, 2.) Press the reset button on the board while hooked up to the terminal -- you should get some output that you can share.

User avatar
ioukos
Posts: 33
Joined: Wed Oct 19, 2016 11:31 am
Location: Alsace, Europe

Re: REPL Doesn't Work

Post by ioukos » Wed Oct 19, 2016 4:38 pm

Hi Chrisgp,

Thank you for your answer ;

So I use minicom -s on Linux with : 115200 8N1

1) Ctrl-c : doesn't work, I have the prompt ">>>" as I boot the board
2) Here is what I see when I reset the board :

Code: Select all

l��|���#4 ets_task(40100384, 3, 3fff6300, 4)
WebREPL daemon started on ws://192.168.4.1:8266
Started webrepl in setup mode
could not open file 'main.py' for reading

MicroPython v1.8.5-10-g0e69e6b on 2016-10-17; ESP module with ESP8266
Type "help()" for more information.
>>> 

I've tried with the last build of Micropython and I have the same problem, and here is my command to upload the firmware, do you think it's OK guys ? I'm not sure with the dio and 32m values.

Code: Select all

esptool.py write_flash -fm dio -fs 32m 0x00000 ~/micropython/esp8266-20161017-v1.8.5.bin
Last edited by ioukos on Thu Oct 20, 2016 7:14 am, edited 3 times in total.

User avatar
ioukos
Posts: 33
Joined: Wed Oct 19, 2016 11:31 am
Location: Alsace, Europe

Re: REPL Doesn't Work

Post by ioukos » Wed Oct 19, 2016 5:31 pm

Well, I did some experiments and it seems that it a problem with the CP2104 driver on Linux. It seems weird to me but REPL works perfectly fine on my Mac Book (with screen) and not on my Ubuntu 16.04... I'm trying to upgrade but I dont feel confident.

User avatar
deshipu
Posts: 1359
Joined: Thu May 28, 2015 5:54 pm

Re: REPL Doesn't Work

Post by deshipu » Wed Oct 19, 2016 6:38 pm

Can you try "screen /dev/ttyUSB0 115200" instead of minicom? Does that work better?

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

Re: REPL Doesn't Work

Post by dhylands » Thu Oct 20, 2016 1:34 am

Make sure you have flow control disabled.

User avatar
ioukos
Posts: 33
Joined: Wed Oct 19, 2016 11:31 am
Location: Alsace, Europe

Re: REPL Doesn't Work

Post by ioukos » Thu Oct 20, 2016 7:12 am

dhylands wrote:Make sure you have flow control disabled.
You were right ! I had to disable Hardware FC to make it work on the D1 mini pro. But not with the D1 mini.
deshipu wrote:Can you try "screen /dev/ttyUSB0 115200" instead of minicom? Does that work better?
You were right too ! It works, sorry.

Do you know where does this behaviour come from ? Is it because of the new UART Chip ?

Anyway, thank you,

How can I tag tag my post as RESOLVED ?

User avatar
platforma
Posts: 258
Joined: Thu May 28, 2015 5:08 pm
Location: Japan

Re: REPL Doesn't Work

Post by platforma » Thu Oct 20, 2016 11:03 am

picocom works well for me, with the same CP2104 driver!
You can prepend [Solved] to the title of your original post to mark it solved.

User avatar
deshipu
Posts: 1359
Joined: Thu May 28, 2015 5:54 pm

Re: REPL Doesn't Work

Post by deshipu » Thu Oct 20, 2016 3:39 pm

ioukos wrote: [...]
I had to disable Hardware FC to make it work on the D1 mini pro. But not with the D1 mini.
[...]
Do you know where does this behaviour come from ? Is it because of the new UART Chip ?
I think that is because the old chip didn't even have support for hardware flow control, so it was ignored on the software side, while the new chip has optional support for it, but it's not being used here.

Post Reply