-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature requests #24
Comments
Thanks for the feedback. Re point 2, that's a bit far out of scope because it needs mpy-cross, which requires compiling from source, and so would be a heavy dependency to force on everyone. Re point 1: if you want to try it please go ahead :) I'd start with the existing webrepl_cli.py program and add the miniterm.py features. |
Re point 1: already done by aivarannamaa: I did fix a small flushing issue and added "-s" silent flag: Description (inclusive aivarannamaa's suffix explanation for switching between modes and being able to interrupt remote endless loops) here: This is mostly aivarannamaa's code, so forking and doing a pull request here does not seem right to me. But webrepl_client.py is a very useful remote console addition to webrepl_cli.py copy commands for me, and I would like to see it being part of this repo (or console functionality being integrated into webrepl_cli.py). My first application is triggering servo bomb drop mechanism attached with ESP-01s running MicroPython to a flying drone, from mobile Pi ZeroW running webrepl_client.sh: |
I fixed the silent option in order to not output newly entered command a second time as seen in last screenshot: Now a (Micro)Python session looks like webepl session in browser besides the added suffixes: |
Added check for ws.sock for graceful endings in some situations (ungraceful see last screenshot), and try/except for graceful ending on CTRL-C: |
Now "\n" command suffix is superfluous in silent mode!
|
Now webrepl_client.py runs under python v2 as well as v3 as well as standalone:
|
I spent more work on getting webrepl_client.py pep8online.com compliant and provide help(). Because of all the work I changed my mind and created a pull request to add webrepl_client.py remote shell using Micropython WebREPL protocol. Documentation is provided as well:
|
Great tool. In case you were looking for some things to make it better, here are two thoughts I had while using it:
cli_repl: I don't like using a web page as a terminal. It's pretty slick, but I'm very good at using a terminal. I would like to be able to do the webREPL from the command line. Sort of how miniterm.py works, but over wifi. Maybe there's an easy way to do with with node.js, and the term.js? I'm not good enough with javascript to know.
put mpy: I found out rather quickly that importing .py files takes a lot of RAM. I ended up converting to .mpy bytecode files. It would be nice if the webrepl_cli.py had a -m flag to convert them while transferring them. Some reasonable additional subfeatures would be: a) deleting the .py version if pushing with -m, or deleting the .mpy if pushing without -m. b) having a nice error message, with some simple instructions in case the bytecode conversion script isn't installed or available. c) warn, or refuse to do the conversion with main.py and boot.py (in my experience, they don't work if they are the .mpy versions, maybe that's really the bug here).
I would promise to help, but the Internet is riddled with my false promises. I could probably work on 2) but tty stuff always gets the best of me, so 1) is probably a lot easier for one you.
Just my $0.02. Thanks for the work so far. It's a great tool for the kit.
The text was updated successfully, but these errors were encountered: