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

    Always the same problem of file upload flash !!!!

    Scheduled Pinned Locked Moved LoPy
    lopyfirmware upgradfirmware updateserialflash
    20 Posts 5 Posters 3.1k Views 5 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.
    • J Offline
      james
      last edited by

      www/bootstrap/js/bootstrap.min.js 119K file size

      1 Reply Last reply Reply Quote 0
      • danD Offline
        dan
        last edited by

        Hi @james

        Have you tried using FTP? Could you try transferring the files there?

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

          @james It could problem of the accumulated file sizes. The flash file system has a size of 508k. The total flash size used is 3680k for all devices. The extra flash space on 8 MByte devices is not used, which is sad.

          1 Reply Last reply Reply Quote 0
          • J Offline
            james
            last edited by

            @robert-hh
            It seems strange,
            when I started with this project I took the OEM L01 and I was assured that the flash was handled throughout

            >>> os.getfree('/flash')
            3680
            

            also because there was a moment in which I managed to do it.
            the total firmware including the small web and 804kb

            @dan I have not tried in ftp, I could try even if I need to transfer files via serial; I use the wifi both as an ap client and as ap for the configuration.

            I need to understand the problem, I made a post even a while ago but nothing.

            excuse for my easy english
            regards
            James

            robert-hhR 1 Reply Last reply Reply Quote 0
            • J Offline
              james
              last edited by

              @robert-hh , @dan

              with the version

              Type "help()" for more information.
              >>> import os
              >>> os.uname()
              (sysname='LoPy', nodename='LoPy', release='1.17.3.b1', version='v1.8.6-849-83e2f7f on 2018-03-19', machine='LoPy with ESP32', lorawan='1.0.2')
              >>> os.listdir()
              ['main.py', 'sys', 'lib', 'cert', 'boot.py', 'www', 'SI7006A20.py', 'project.pymakr', 'hal.py', 'mqtt.py', 'simple.py', 'umqtt.py', 'xApp.py', 'xConfigureFile.py', 'xHTTPConfigure.py', 'xWebServer.py', 'xWebSocket.py']
              >>> os.chdir('www')
              >>> os.listdir()
              ['bootstrap', 'js', 'index.html']
              >>> os.chdir('bootstrap')
              >>> os.listdir()
              ['css', 'fonts', 'js']
              >>> os.chdir('css')
              >>> os.listdir()
              ['bootstrap.min.css']
              >>> 
              

              the file is actually there but it's failing, it always reloads with an error,
              could it be a problem related to the ram ????

              with the last error error error

              1 Reply Last reply Reply Quote 0
              • J Offline
                james
                last edited by

                @robert-hh , @dan
                in ftp is ok.
                file is correctly

                regards

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

                  @james OK. I just tested a image loaded with the Pycom updater, and that indeed uses the full flash. Only the images generated from the github repository seem to be generated with a smaller file system. I'm curious why.

                  J 1 Reply Last reply Reply Quote 0
                  • J Offline
                    james @robert-hh
                    last edited by

                    @robert-hh ,
                    Let's talk about the "L01", I do not know why this thing but until some time ago even those of the pycom updater saw the whole flash.
                    However, the problem of uploading files is driving me crazy, someone hypothesized some problems with the FTDI chip, but I think only with regard to the flash of micropython, also because the other files are uploaded safely.

                    Another thought is that they are css and js files and that some character in the file in serial transfer can give some problems, even if it should be a binary trafficking.

                    regards
                    James

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

                      @james said in Always the same problem of file upload flash !!!!:

                      Another thought is that they are css and js files and that some character in the file in serial transfer can give some problems, even if it should be a binary trafficking.

                      That's what i would suspect. Serial transfer might not be transparent. That's one of the reasons why I use ftp. It is reliable and well tested over decades.

                      J 1 Reply Last reply Reply Quote 0
                      • J Offline
                        james @robert-hh
                        last edited by

                        @robert-hh,

                        It is not always possible to transmit files via FTP, so if there were real transfer problems in the serial mode it would be a serious problem, and more serious than any other answer after the umpteenth post, at least in understanding what could be.

                        regards
                        James

                        1 Reply Last reply Reply Quote 0
                        • C Offline
                          cmisztur
                          last edited by

                          So what is the solution?
                          Seems like changes to my files are actually uploaded, but still end up with the error message.

                          Uploading project (main folder)...
                          Safe booting device... (see settings for more info)
                          Reading file status
                          [1/1] Writing file lib/sx1509.py
                          Failed to write file, trying again...
                          Failed to write file, trying again...
                          Filecheck failed
                          Upload done, resetting board...
                          
                          robert-hhR 1 Reply Last reply Reply Quote 0
                          • robert-hhR Offline
                            robert-hh @cmisztur
                            last edited by

                            @cmisztur Put aside pymakr and give a clean ftp client a try, to sort out the problem. If possible, use linux or mac command line ftp. Check beforehand, that teher is sufficient free space in the file system of your device. You can do so with import uos;uos.getfree("/flash")

                            C 1 Reply Last reply Reply Quote 0
                            • C Offline
                              cmisztur @robert-hh
                              last edited by

                              @robert-hh fine...

                              1 Reply Last reply Reply Quote 0
                              • nespressifN Offline
                                nespressif
                                last edited by

                                Hello, everybody,
                                I have the same problem, with pysense + sipy, updated to the last stable firmware, I have uninstalled and reinstalled pymakr in Atom and I always fail the flash of the same file of the project (pycoproc).

                                In my case it seems that these problems have come after upgrading to Ubuntu 18.04 lts.

                                I will try to flash with another computer that I have with ubuntu 16.04 and the latest version of pymakr.

                                Would I also like to know why this happens?

                                Regards

                                danD 1 Reply Last reply Reply Quote 0
                                • danD Offline
                                  dan @nespressif
                                  last edited by

                                  @nespressif Hi, what files are you trying to upload? Also, could you try using FTP?

                                  nespressifN 1 Reply Last reply Reply Quote 1
                                  • nespressifN Offline
                                    nespressif @dan
                                    last edited by

                                    @dan Hi, I'm uploading my project: boot.py, main.py and the lib directory with my own libraries and the pysense libraries. I always get an error when uploading the pycoproc.py library, but after the program works.

                                    I have uninstalled and reinstalled Pymakr in Atom and now I show the size of each file during uploading.

                                    I'll try via FTP and also from another computer with ubuntu 16.04 and I'll tell you.

                                    danD 1 Reply Last reply Reply Quote 0
                                    • danD Offline
                                      dan @nespressif
                                      last edited by

                                      @nespressif for me, I had the same issue with the bootstrap css as the original post, but when I decreased its size, I was able to upload it. If you upload larger files, FTP seems to work better.

                                      nespressifN 1 Reply Last reply Reply Quote 0
                                      • nespressifN Offline
                                        nespressif @dan
                                        last edited by

                                        @dan Hi, the files are not big, besides the errors the upload gives them in some pycom libraries. I have tried ubuntu 18 and 16, Atom and pymakr 1.4.2 and the last 1.4.4.

                                        Anyway the program works correctly even with errors in the upload, but it is annoying.

                                        I will try via ftp.

                                        Regards,

                                        1 Reply Last reply Reply Quote 0
                                        • nespressifN Offline
                                          nespressif
                                          last edited by

                                          Hi, I tried via ftp and it works perfectly.
                                          Regards

                                          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