Does WebREPL have input size limit?

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
User avatar
aivarannamaa
Posts: 171
Joined: Fri Sep 22, 2017 3:19 pm
Location: Estonia
Contact:

Does WebREPL have input size limit?

Post by aivarannamaa » Thu Jan 02, 2020 8:03 am

I'm trying to implement WebREPL connection in Thonny IDE (https://github.com/thonny/thonny/blob/m ... nection.py). It is used in raw mode.

It is mostly working, but only when I submit small code snippets to the WebREPL. When submitting programs longer than 10-20 lines, I don't get the "OK" confirmation. Things start working again when I'm sending Ctrl+A.

I tried submitting in chunks and using delays between chunks but it did not help.

I tried Paste mode in official WebREPL client, and it seems to truncate pasted code. Is this a known bug or feature?
Aivar Annamaa
https://thonny.org

Christian Walther
Posts: 169
Joined: Fri Aug 19, 2016 11:55 am

Re: Does WebREPL have input size limit?

Post by Christian Walther » Thu Jan 02, 2020 11:49 am

It’s a known limitation: https://github.com/micropython/micropython/issues/2497

Also note that the current WebREPL protocol is not 8-bit-safe. That’s probably okay if you only transfer program text, but it won’t work for pushing arbitrary file content through the REPL stream (file transfer operations are not affected). I’ve been meaning to work on this, opening an issue and proposing solutions, but haven’t gotten anywhere yet.

User avatar
aivarannamaa
Posts: 171
Joined: Fri Sep 22, 2017 3:19 pm
Location: Estonia
Contact:

Re: Does WebREPL have input size limit?

Post by aivarannamaa » Thu Jan 02, 2020 12:04 pm

Thank you, Christian! I'll continue the discussion under https://github.com/micropython/micropython/issues/2497
Aivar Annamaa
https://thonny.org

Post Reply