-
Notifications
You must be signed in to change notification settings - Fork 19
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
Follow-up for different options for file transfer. #12
Comments
Thanks much for the explanation! Also, I would be happy to help with testing / improving / brainstorming the changes in WebREPL. |
A quite fun extension could be to "automatically" prompt the user to install (official) packages, when they are searched for but are not in the path. |
For me the typical "mount" use-case is: I have some version of my application on the device and just want to tinker and test out some changes. So I modify only the local copy, and load it with |
I think I need to embed this workflow into ViperIDE. |
|
I'm skimming through the https://github.com/felixdoerre/webreplv2 , the JS file is there but no html. |
Yes, I've missed to commit that as well. I haven't changed much there so it didn't feel too important, I've added it now. I'm still thinking about what feature set would be best for the micropython-"included" webrepl-web-client. And I'm beginning to think that just having plain REPL access (with raw paste support), without file transfer might be best, and to leave more elaborate user interfaces to other projects. Then it would be as easy as overriding the "static_host" variable at runtime or even maybe selecting other webrepl-web-clients in the UI. Maybe we could have an "explicit" mpremote port allowing shared code, and then be the "included" webrepl client be a simple example on how to use it, and have it more tightly integrated into ViperIDE. That would allow you to have a micropython-compiler in the browser and get immediate feedback, at least for syntax errors. Btw, I haven't extensively tested Viper yet, but do you allow browser-saving the WebREPL password? For me, that was a very comfortable extension. And as it is saved in the context/origin/ip of device itself, it naturally allows saving passwords per device. |
I could definitely run |
I personally like it stored in the browser password manager, as I have multiple micropython-devices with unique webrepl passwords, so having that stored in the browser password manger is really comfortable, but sure, as a start its enough to have it only in the session. The WebREPL URL itself does not need to be stored, if the IDE runs in the device-origin, that URL is implicitly evident. |
Correct. Yes i think this will automatically become the case when ViperIDE switches from standard JS |
Maybe, WebREPL python module could handle an optional url query string, the backreference to the IDE. This way a single webrepl module would serve different tools. Not sure if it will work though |
I would be cautious to just echo back an arbitrary url, but maybe a selection of "known-good" tools or something similar to use the "official" client as jumping pad to other clients. I would probably also want to defer that handling to the webrepl-web-client if possible. If you have (a matching) |
Please check out the new way to connect to your board remotely: |
@felixdoerre ViperIDE now automatically runs |
Hi, this is follow-up for micropython/micropython#13786, to not unnecessarily clutter that issue.
So up-front I think I mixed up things in my initial comment, so to clarify the mechanisms
mpremote
uses:fs_get
(for direct file transfer e.g. inmpremote cp
): https://github.com/micropython/micropython/blob/42eab32a36f70840c7e670a61269fb795d43991b/tools/mpremote/mpremote/transport_serial.py#L391This logic uses the standard-python byte-array escaping mechanism. That would escape
0x04
but leave ascii characters unchanged, your logic forfs_put
already has that optimization and even tests two different options for an encoding. This works with the webrepl code as is.mpremote mount
: https://github.com/micropython/micropython/blob/42eab32a36f70840c7e670a61269fb795d43991b/tools/mpremote/mpremote/transport_serial.py#L719The mount protocol uses binary file transfer and prefixes packages with a length parameter. This requires a REPL stdout stream that is able to handle arbitrary bytes, as mount "protocol" is inherently binary. The stream is naturally segmented due to the individual read/write commands. For developing locally, I really like the
mpremote mount
functionality, as it allows virtually immediate "synchronization" without having to use on-device flash, and allowing to load development code directly into device RAM.When talking about the optimization, I think I mixed things up with the
mount
-logic.The text was updated successfully, but these errors were encountered: