Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flashing CHIP on Raspberry Pi - usb_bulk_send() ERROR -7 #15

Closed
Superlub opened this issue Oct 15, 2019 · 3 comments
Closed

Flashing CHIP on Raspberry Pi - usb_bulk_send() ERROR -7 #15

Superlub opened this issue Oct 15, 2019 · 3 comments

Comments

@Superlub
Copy link

root@raspberrypi:/home/pi/Flash-CHIP/CHIP-tools# sunxi-fel -l
USB device 001:027 Allwinner A13 16254291:50303743:39383030:0d4267de

root@raspberrypi:/home/pi/Flash-CHIP/CHIP-tools# FEL='sudo sunxi-fel' FASTBOOT='sudo fastboot' SNIB=false ./chip-update-firmware.sh -gn
== Gui selected ==
== No Limit mode ==
== preparing images ==
== Local/cached probe files located ==
== Staging for NAND probe ==
Image Name: detect NAND
Created: Tue Oct 15 21:28:18 2019
Image Type: ARM Linux Script (uncompressed)
Data Size: 97 Bytes = 0.09 kB = 0.00 MB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 89 Bytes = 0.09 kB = 0.00 MB
waiting for fel...OK
usb_bulk_send() ERROR -7: Operation timed out

@53K70R29
Copy link

Could it be your USB cable is inadequate? Received this a couple of times then changed to a better cable and this solved it!

@Thore-Krug
Copy link
Owner

Its Power related, Pls use a Proper Power supply and cable

@Thore-Krug Thore-Krug pinned this issue Oct 18, 2019
@Superlub
Copy link
Author

I tried several USB cables on various Pi's and a VM virtualbox (Debian) on Windows 10.

All ending with the usb_bulk_send() error -7.

Maybe this is relevant:

https://github.com/linux-sunxi/sunxi-tools/blob/master/fel_lib.c
{
/*
* With no progress notifications, we'll use the maximum chunk size.
* Otherwise, it's useful to lower the size (have more chunks) to get
* more frequent status updates. 128 KiB per request seem suitable.
* (Worst case of "slow" transfers -> one update every two seconds.)
*/
size_t max_chunk = progress ? 128 * 1024 : AW_USB_MAX_BULK_SEND;

size_t chunk;
int rc, sent;
while (length > 0) {
	chunk = length < max_chunk ? length : max_chunk;
	rc = libusb_bulk_transfer(usb, ep, (void *)data, chunk,
				  &sent, USB_TIMEOUT);
	if (rc != 0)
		usb_error(rc, "usb_bulk_send()", 2);
	length -= sent;
	data += sent;

	if (progress)
		progress_update(sent); /* notification after each chunk */
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants