upload problem
-
@kjm said in upload problem:
If not can you explain a bit more how I'd dump to the uart & capture on the PC?
No, none of the utilities are meant to do that. Because ftp works. For filezilla, check that the number of sessions is limited to 1.
Otherwise, you could simply read and print the logfile on the GPY, and have a little tool on you PC whch just writes whatever comes from the serial port to a file. On Linux, cp or cat could do that in principle, with the exception that the link is not closed. Otherwise you can write a little python script using pyserial to do that. Then you can also use a special character like 0x04 (Ctrl-D) or 0x1a (Ctrl-Z) as end-of-file mark.
But still, ftp would be my personal preference, and especially the ftp client on the GPY, because that one could run autonomously, e.g. uploading logs every x hours or on specific events.
P.S.: No problem with RAM size on the GPY. -
@kjm said in upload problem:
I figure the filezilla settings must be OK because it connects & shows the files on the gpy.
No. That shows that FTP Server is working and your filezilla settings are wrong. The amount of connections is not limited to 1. Otherwise FTP uses another connection to up/download a file. Download may work sometimes, if the load of the *Py is very low. So you may think you have the right settings, but it is not. Trust us, we have been there before you. This can happen even month after you had it working. And yes I thought about kermit and zmodem as well, but checking the settings a n-th time was the solution.
-
@crumble Yesterday was a rough day, couldn't get that log file out of the gpy no matter what I tried. Ended up reading it out line-by-line from the gpy in Atom. A tedious process for a 720k logfile. That's what I get for breaking my own rule of limiting the size of any logfile. Actually impressed that LittleFS managed to handle a file of that size without breaking.
-
@kjm You can always use a tool like putty with screen log enabled, or on Linux picocom, pipe'd with tee in a file, and log the screen output to a file.
When using my image, there should the module upysh be embedded. start it with:from upysh import *
cat("name of the logile")That will print the content of the logfile. Still ftp should work.
I have here an alternative ftp server, https://github.com/robert-hh/FTP-Server-for-ESP8266-ESP32-and-PYBD/blob/master/ftp_pycom.py
It starts an ftp server on port 5024. That one will also work with Windows command line ftp. Since it runs on the pycom device in foreground, you have to terminate it with Ctrl-C. -
@robert-hh said in upload problem:
from upysh import *
The cat is a nice feature Rob. Do you have anything in your image that shows file size as easily?
-
@kjm after importing * from upysh, there is a command 'man' to list all commands, there is 'ls' or 'ls (name)' to list files, and a few more unix shell like commands.
-
-
@robert-hh I tried to use that editor in your build
upysh is intended to be imported using: from upysh import * To see this help text again, type "man". upysh commands: pwd, cd("new_dir"), ls, ls(...), head(...), cat(...), hd(...) newfile(...), mv("old", "new"), rm(...), mkdir(...), rmdir(...) clear <dir> cert <dir> lib <dir> sys 29 boot.py 34 main.py 262 project.pymakr 4,056k free >>> from pye_mp import pye >>> pye('main.py')but the prompt vanishes after the pye('main.py') line. Should it work OK in Atom like upysh? If so can you see what I'm doing wrong?
-
@kjm The editor requires a terminal with vt100 support. The terminal window of pymakr may not be suitable for that. Try applications like Putty on Windows, screen or picocom on OS X or picocom or tio on Linux.
The documentation is in the repository: https://github.com/robert-hh/Micropython-Editor
-
@robert-hh huh?
-
@kjm Updated, see below. Just a glitch in the browser.
-
@robert-hh So if I can find the right terminal environment
from pye_mp import pye; pye('main.py')should work?
-
@kjm Yes. On Windows, teraterm is also a good choice.
-
@robert-hh Some rubbish characters
dtl¬ðûZÓëBgin TeraTerm VT when I press the reset button on the GPY but it's a start I guess.
-
@kjm You have to configure the UART port to 115200 baud 8N1. But rubbish on start after reset is normal. You should get a good prompt after that.
-
@robert-hh Nice & it's got a scroll slider which is more than I can say for pymakr.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login