Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    upload problem

    Scheduled Pinned Locked Moved GPy
    19 Posts 3 Posters 112 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K Offline
      kjm
      last edited by

      I figure the filezilla settings must be OK because it connects & shows the files on the gpy. The firmware version on this gpy is actually one of yours Rob, I was wondering if one of the utilities you have in your releases might be able to do an upload? If not can you explain a bit more how I'd dump to the uart & capture on the PC?

      robert-hhR C 2 Replies Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @kjm
        last edited by

        @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.

        1 Reply Last reply Reply Quote 0
        • C Offline
          crumble @kjm
          last edited by

          @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.

          K 1 Reply Last reply Reply Quote 0
          • K Offline
            kjm @crumble
            last edited by

            @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.

            robert-hhR 1 Reply Last reply Reply Quote 0
            • robert-hhR Offline
              robert-hh @kjm
              last edited by robert-hh

              @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.

              K 1 Reply Last reply Reply Quote 0
              • K Offline
                kjm @robert-hh
                last edited by

                @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?

                robert-hhR 1 Reply Last reply Reply Quote 0
                • robert-hhR Offline
                  robert-hh @kjm
                  last edited by

                  @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.

                  K 2 Replies Last reply Reply Quote 0
                  • K Offline
                    kjm @robert-hh
                    last edited by

                    @robert-hh

                    >>> ls('lib')
                       7621 onewire.py
                    
                    4,056k free
                    

                    awesome!

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      kjm @robert-hh
                      last edited by kjm

                      @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?

                      robert-hhR 1 Reply Last reply Reply Quote 0
                      • robert-hhR Offline
                        robert-hh @kjm
                        last edited by robert-hh

                        @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

                        K 1 Reply Last reply Reply Quote 0
                        • K Offline
                          kjm @robert-hh
                          last edited by

                          @robert-hh huh?

                          robert-hhR 1 Reply Last reply Reply Quote 0
                          • robert-hhR Offline
                            robert-hh @kjm
                            last edited by

                            @kjm Updated, see below. Just a glitch in the browser.

                            K 1 Reply Last reply Reply Quote 0
                            • K Offline
                              kjm @robert-hh
                              last edited by

                              @robert-hh So if I can find the right terminal environment

                              from pye_mp import pye; pye('main.py')
                              

                              should work?

                              robert-hhR 1 Reply Last reply Reply Quote 0
                              • robert-hhR Offline
                                robert-hh @kjm
                                last edited by

                                @kjm Yes. On Windows, teraterm is also a good choice.

                                K 1 Reply Last reply Reply Quote 0
                                • K Offline
                                  kjm @robert-hh
                                  last edited by

                                  @robert-hh Some rubbish characters

                                  dtl¬ðûZÓëBg
                                  

                                  in TeraTerm VT when I press the reset button on the GPY but it's a start I guess.

                                  robert-hhR 1 Reply Last reply Reply Quote 0
                                  • robert-hhR Offline
                                    robert-hh @kjm
                                    last edited by robert-hh

                                    @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.

                                    K 1 Reply Last reply Reply Quote 0
                                    • K Offline
                                      kjm @robert-hh
                                      last edited by kjm

                                      @robert-hh Nice & it's got a scroll slider which is more than I can say for pymakr.

                                      1 Reply Last reply Reply Quote 0

                                      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
                                      • 1 / 1
                                      • First post
                                        Last post

                                      Pycom on Twitter

                                      Pycom