Closed wuhanstudio closed 5 years ago
With uos and ubinascii enabled, I can do:
But still download (Transfer from pyboard to PC) is not working
And the error code:
paste mode; Ctrl-C to cancel, Ctrl-D to finish
=== file_name="hello.txt"
=== with open("__download.py") as f:
=== exec(f.read(), globals())
===
ceback (most recent call last):
File "<stdin>", in <module>
File "<stdin>", in <module>
File "<string>", in <module>
File "<string>", in _download
OSError: 0
>>> #2
I've looked at the differences between __upload.py
and __download.py
since former is working while later is not, but there are not many differences. I suppose that ubinascii
has symmetric functions so if a2b_base64
is supported, b2a_base64
is also. In that case, there's just line 25 & 26 which might cause issues: https://github.com/BetaRavener/uPyLoader/blob/master/mcu/download.py#L25 .
I can't try to make it work for you as I lack the device, but you can modify the transfer scripts by commenting out lines that seem problematic until you pinpoint the issue and the script executes (it may produce error later on due to changed behavior but that's fine). You can use Path to custom transfer scripts
in the Settings to upload your edited transfer scripts or if you are running from source, simply editing scripts in mcu
folder will work.
Thanks a lot for your help. It's lucky that the working one is upload which makes it easier to upload/test scripts.
If I manage to find a solution later, I'll post it here. Thanks again for your suggestion.
Hello, recently I'm trying to use micropython on rt-thread, a burgeoning RTOS in China, through serial connection. Micropython has been released as a package on rt-thread and it works for now, while it failed to "Init transfer files" when I tried to use uPyloader to upload files, though "List Files" did work.
I think some modules required for mpy to communicate with uPyloader my be missing but I cannot figure it/them out.
Here's the list of available packages:
System Modules
uos, _thraed, uselect, uctypes, uerrno, ffi
Tools Modules
cmath, ubinascii, uhashlib, uheapq, ujson, ure, uzlib, urandom
Networkd Modules
usocket, ussl
Could you please help me figure out what packages have to be enabled? Thanks sincerely for your time.