Flash-CHIP icon indicating copy to clipboard operation
Flash-CHIP copied to clipboard

Flashing fails: usb_bulk_send() ERROR -7: Operation timed out

Open didier9 opened this issue 5 years ago • 24 comments

I get this message a few seconds after the waiting for fel...OK message. I use an external supply to power the CHIP as recommended. This CHIP was sick, I believe the original distribution must have been corrupted and the device did not enable the UART over USB and there was no evidence the device booted (no ssh even though it had been configured and was running before the device failed). When I connect the FEL pin to ground and connect the USB to a Windows 10 PC, the PC does detect a USB device (not a COM port), so that gave me hope the hardware was not completely toast. I use a Raspberry Pi B+ to install and run the tools. The first time I ran the Flash.sh tool, it did download and build a bunch of stuff (I also had to install git first). When it failed, I rebooted and retried a few times. After the first time it did not have to build anything and went into the "waiting for fel...OK" pretty quickly. I got the same error message each time though.

I do have a second CHIP that is working with the original Jessie distro, which I would like to upgrade since there is no software available for Jessie any longer, but I would rather try to save this one first...

Thanks for what looks like a great tool (if I can get it to work...) and thanks in advance for any further help. Didier Flash-1

didier9 avatar Jan 24 '20 03:01 didier9

Additional information, outputs from dmesg and lsusb: Flash-2

didier9 avatar Jan 24 '20 14:01 didier9

Also I had a scope on the 5V going to the CHIP (CHG-IN) and it is perfectly stable during the operation.

didier9 avatar Jan 24 '20 14:01 didier9

I'm having the same problem, also checked the voltage, and tried from different computers The problem happens when running

from Ubuntu VM on Windows 10 Host and running from a raspberry Pi 4 from ChromeOS laptop

lucasrainett avatar Jan 25 '20 12:01 lucasrainett

I saw this post from a little while ago: "Error -7 is a libusb problem which is mostly caused by bad cable" But as I posted earlier, I did check the voltage on the CHIP with an oscilloscope and it is stable (I use an external 2A lab supply to power the CHIP). The R-Pi is powered from a 2A USB supply (which I bought from Adafruit with my first R-Pi). I communicate with the R-Pi via ssh, there is no direct connection to the PC. The USB cable is the one that came with one of my Motorola phones and they are quite good.

didier9 avatar Jan 27 '20 00:01 didier9

I see this problem too.

subinsebastien avatar Feb 21 '20 17:02 subinsebastien

It's not necessarily the cable. Check your version of sunxi-tools. I encountered this problem with Debian 10 which has the current stable sunxi-tools version 4.1.2. I rolled back to version 4.1.1-1 and the script then worked for my pocketchip (don't forget to comment out sunxi-tools from the apt install line in the script).

scheckley avatar Feb 26 '20 13:02 scheckley

Rolling back to sunxi-tools fixed my "usb_bulk_send() ERROR -7: Operation timed out" issue as well.

dementio avatar Feb 26 '20 20:02 dementio

This should now be fixed, the script installs an older version of sunxi-tools, it was tested on ubuntu but don't know if it works on debian though it should.

ReubenBTalbott avatar Apr 14 '20 21:04 ReubenBTalbott

Hey! I have tried changing cables and ports on my computer. But I still get "usb_bulk_send () ERROR -7: Operation timed out".

My sunxi-tools version (1.4.2 + git20181114.6d598a-3).

I can't find 4.1.1-1 that is mentioned above.

I am on Debian Stable 10 Buster :)

coffe avatar Apr 26 '20 10:04 coffe

Hey! I have tried changing cables and ports on my computer. But I still get "usb_bulk_send () ERROR -7: Operation timed out".

My sunxi-tools version (1.4.2 + git20181114.6d598a-3).

I can't find 4.1.1-1 that is mentioned above.

I am on Debian Stable 10 Buster :)

I cannot find that version either and I am on the same version of sunxi-tools I'm on Ubuntu 20.04 LTS

Jonah6411 avatar May 07 '20 13:05 Jonah6411

Hey! I have tried changing cables and ports on my computer. But I still get "usb_bulk_send () ERROR -7: Operation timed out". My sunxi-tools version (1.4.2 + git20181114.6d598a-3). I can't find 4.1.1-1 that is mentioned above. I am on Debian Stable 10 Buster :)

I cannot find that version either and I am on the same version of sunxi-tools I'm on Ubuntu 20.04 LTS

does this work? https://debian.pkgs.org/9/debian-main-amd64/sunxi-tools_1.4.1-1_amd64.deb.html

scheckley avatar May 07 '20 15:05 scheckley

Hey! I have tried changing cables and ports on my computer. But I still get "usb_bulk_send () ERROR -7: Operation timed out". My sunxi-tools version (1.4.2 + git20181114.6d598a-3). I can't find 4.1.1-1 that is mentioned above. I am on Debian Stable 10 Buster :)

I cannot find that version either and I am on the same version of sunxi-tools I'm on Ubuntu 20.04 LTS

does this work? https://debian.pkgs.org/9/debian-main-amd64/sunxi-tools_1.4.1-1_amd64.deb.html

This fixes it for me on Debian 10 (Raspberry PI4)

Emzy avatar May 24 '20 16:05 Emzy

I confirm the fix.

bestouff avatar May 25 '20 14:05 bestouff

same issue, downgraded with a deb and comment out the package in the script to stop it updating again until i was done flashing my chip, happy to have it back working again!

TerraRoot avatar Jun 09 '20 15:06 TerraRoot

Confirming sunxi-tools downgrade fix.

edo9k avatar Feb 09 '21 14:02 edo9k

I had the same problem using a RPI4, installed the sunxi tool with no avail.

Reading the oficial Next Thing documentation it says:

"If you are using a computer with USB3 ports, it’s suggested that you attach a USB2-compliant hub and connect your CHIP to the hub, instead of directly to the USB3 port."

So I switched from the usb3 port to the usb2 port of my RPi4 and it worked perfectly fine.

pablonoel avatar May 23 '21 22:05 pablonoel

Here is how you downgrade sunxi-tools on newer versions of Ubuntu based distros.

  • Append deb http://de.archive.ubuntu.com/ubuntu/ bionic main universe to /etc/apt/sources.list
  • Do sudo apt update
  • Install the package: sudo apt install sunxi-tools=1.4.1-1
  • Mark hold to prevent upgrade: apt-mark hold sunxi-tools
  • To prevent any other complications Remove deb http://de.archive.ubuntu.com/ubuntu/ bionic main universe from /etc/apt/sources.list

Then you can flash.

dorin131 avatar Jul 31 '21 23:07 dorin131

Here is how you can downgrade sunxi-tools on Debian

  • Add a source that has the older version of sunxi-tools: nano /etc/apt/sources.list and append deb http://deb.debian.org/debian/ stretch main
  • Update apt's cache: sudo apt update
  • Install the package: sudo apt install sunxi-tools=1.4.1-1
  • Mark hold to prevent it from being upgraded: apt-mark hold sunxi-tools
  • To avoid complications you can remove stretch main from the sources.list again

wersimmon avatar Aug 07 '21 19:08 wersimmon

Hey! I have tried changing cables and ports on my computer. But I still get "usb_bulk_send () ERROR -7: Operation timed out". My sunxi-tools version (1.4.2 + git20181114.6d598a-3). I can't find 4.1.1-1 that is mentioned above. I am on Debian Stable 10 Buster :)

I cannot find that version either and I am on the same version of sunxi-tools I'm on Ubuntu 20.04 LTS

does this work? https://debian.pkgs.org/9/debian-main-amd64/sunxi-tools_1.4.1-1_amd64.deb.html

Downloading this deb file, and downgrading fixed the issue, but you must comment out the flash.sh script's apt install of the tools, as this will re-upgrade the package you just downgraded.

Running Flash.sh with the sunxi-tools 1.4.1-1 solved the issue for me!

TroyFletcher avatar Sep 27 '21 02:09 TroyFletcher