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

    Pymakr Atom release v1.4.9 - Upload using zlib compression

    Scheduled Pinned Locked Moved Announcements & News
    atompymakr
    7 Posts 3 Posters 1.3k 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.
    • R Offline
      Ralph
      last edited by

      Pymakr for Atom v1.4.9 has just been released with an experimental feature that might be interesting to some.

      When updated to firmware >=1.20.0 and enabled 'fast upload' , pymakr will use bigger chunks and use zlib compression to speed up the upload process. Larger files will upload drastically faster. An 800kb file used to take about 5 minutes, which is now down to a little under 90 seconds.

      The same feature is almost ready in the VSCode plugin and will be released later this week.

      1 Reply Last reply Reply Quote 1
      • M Offline
        marcozennaro Pycom Ambassadors
        last edited by

        Hi! I just updated to the latest version of the plugin (1.4.9) and I now get an error:

        Failed to load the pymakr package
        Could not locate the bindings file. Tried:
        → /Users/marco/.atom/packages/pymakr/node_modules/serialport/build/serialport.node

        I am running Atom 1.27.2 on Mac OSX.

        Suggestions?

        Thanks,
        Marco

        1 Reply Last reply Reply Quote 0
        • R Offline
          Ralph
          last edited by

          HI @marcozennaro, Atom v1.27.2 is a bit outdated (latest is v1.34.0). Please update to one of the latest versions and try again.

          1 Reply Last reply Reply Quote 0
          • M Offline
            marcozennaro Pycom Ambassadors
            last edited by

            It works fine! Sorry!

            R 1 Reply Last reply Reply Quote 1
            • R Offline
              Ralph @marcozennaro
              last edited by

              @marcozennaro No worries, glad it works fine :)

              1 Reply Last reply Reply Quote 0
              • P Offline
                protean
                last edited by

                Is there any documentation of this stuff on a lower level? Let's say I want to use a tertiary serial device (for example, a modem) to push OOB device updates, without using Atom or VSCode. Is reversing the Pymakr plugin my only route to ensure compression support? I've been pushing OOB firmware updates with simple os.write() calls and such manually on the REPL, is it safe to assume y'all are just inlining zlib.compress/decompress w/ some intermediary string encoding of some kind?

                R 1 Reply Last reply Reply Quote 0
                • R Offline
                  Ralph @protean
                  last edited by

                  @protean Pymakr is indeed using the zlib.decompress() micropython function for this feature. Normal upload also still works of course, but this way is faster for large files. Let me give you some pointers on how to code it:
                  The zlib function on the micropython side is documented here. Pymakr is compressing the files before uploading (here using this python file), writing the compressed file to the board with os.write() like always, and then decompressing them right after that (here). It'll definitely make uploading bigger files faster. Just realise that for files under 4k, it's actually slower because the overhead of compressing/decompressing is bigger than the savings of compressing the file.

                  1 Reply Last reply Reply Quote 1

                  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