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

    Pytrack firmware update

    Scheduled Pinned Locked Moved Issues & Bugs
    pytrackfirmware updatedfu-utilubuntu
    10 Posts 5 Posters 2.0k Views 6 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
      jeko
      last edited by

      Hi Pycomers !

      I am trying to upgrade my (newly) Pytrack firmware.
      I followed the procedure as described here.
      Here is what I get :

      $ sudo dfu-util -D pytrack_0.0.8.dfu 
      dfu-util 0.8
      
      Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
      Copyright 2010-2014 Tormod Volden and Stefan Schmidt
      This program is Free Software and has ABSOLUTELY NO WARRANTY
      Please report bugs to dfu-util@lists.gnumonks.org
      
      Match vendor ID from file: 04d8
      Match product ID from file: f014
      Opening DFU capable USB device...
      ID 04d8:f014
      Run-time device DFU version 0100
      Claiming USB DFU Runtime Interface...
      Determining device status: state = dfuIDLE, status = 0
      dfu-util: WARNING: Runtime device already in DFU state ?!?
      Claiming USB DFU Interface...
      Setting Alternate Setting #0 ...
      Determining device status: state = dfuIDLE, status = 0
      dfuIDLE, continuing
      DFU mode device DFU version 0100
      Device returned transfer size 64
      Copying data from PC to DFU device
      Download	[======================== ]  96%        15808 bytesdfu-util: Error sending completion packet
      

      The timing seems hard to catch with button pressure/release.

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

        Oh boy I did it ! Sounds like the timing is crucial and has to be determined experimentally haha ! Lets move on.

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

          @jeko I agree that this workflow is most unfriendly and curse prone:

          a) Remove the device from USB
          b) Push the button
          c) Plug in the device while the button is pushed
          d) Release the button
          e) Start the sudo DFU-util .... command within 6-7 seconds

          Even if you came to that point, your busted, because sudo asks for the password (better if so), and once you entered it, the e) time windwow is closed. So start over at a), and if you're fast enough, the sudo password is still valid.

          And: for me, the "make flash" command with the new expansion board does not work at all. Not only that it needs Python3, it does not switch the PIC to firmwareload mode. So I go back to the P2->GND method, or us my hand-assembled board with the espressif reset circuitry.

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

            Hi @jeko and @robert-hh, it might take a few tries, I'm glad you managed to do it. You don't need to run it with sudo, it should work without it

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

              @dan If I run it w/o sudo, I got the message:

              dfu-util: Cannot open DFU device 04d8:f014
              

              So I added a udev rule in a file called /etc/udev/rules.d/77-pycom.rules with the content:

              # Attribute for Pytrack PIC
              ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f014", MODE="0666"
              

              Just giving read/write access to everyone. Could be more specific.

              danD 1 Reply Last reply Reply Quote 0
              • danD Offline
                dan @robert-hh
                last edited by

                @robert-hh which OS are you using? I'll look into this when I have some time

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

                  @dan debian 8. But, as said below, it works now without sudo.

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    pwest @robert-hh
                    last edited by

                    @robert-hh
                    This solved my problem. Evidently my problem was that I was following the directions at https://docs.pycom.io/chapter/pytrackpysense/installation/firmware.html where the instructions for step e) are to run:
                    $ dfu-util -D pytrack_0.0.8.dfu
                    no mention of the sudo part... With sudo, it worked first try!

                    -Phil

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

                      Hi @pwest, I've added it to our documentation to avoid further confusion.

                      1 Reply Last reply Reply Quote 0
                      • kodarnK Offline
                        kodarn
                        last edited by

                        I came across this "bytesdfu-util: Error sending completion packet" error today when attempting to upgrade a Pycom Expansionboard 3.1 connected to an Ubuntu 18.04 LTS.

                        Running ls -la /dev showed that the serialport had restricted access, so a quick fix was:

                        sudoedit /etc/udev/rules.d/50-myusb.rules
                        

                        and insert the following:

                        KERNEL=="ttyUSB[0-9]*",MODE="0666"
                        KERNEL=="ttyACM[0-9]*",MODE="0666"
                        

                        then

                        sudo reboot
                        

                        After rebooting the firmware upgrade worked great (holding the s1 button when connecting the USB-cable; releasing s1 after one second; then running dfu-util within a few seconds).

                        sudo su -
                        dfu-util -D /home/user/Download/expansion31_0.0.11.dfu
                        
                        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